resources: add s3 project bucket

This commit is contained in:
Austen Collins 2015-09-26 12:36:31 -07:00
parent ab18ff0fc0
commit 3a4d4e4acd
3 changed files with 34 additions and 0 deletions

View File

@ -9,6 +9,10 @@
"Type": "String",
"Default": "myapp.com"
},
"aaProjectBucket": {
"Type": "String",
"Default": "myapp.com"
},
"aaStage": {
"Type": "String"
},
@ -204,6 +208,16 @@
}
]
}
},
"ProjectS3Bucket" : {
"Type" : "AWS::S3::Bucket",
"Properties" : {
"AccessControl" : "Private",
"BucketName" : {
"Ref": "aaProjectBucket"
}
},
"DeletionPolicy" : "Retain"
}
},
"Outputs": {

View File

@ -488,6 +488,10 @@ exports.cfCreateResourcesStack = function(awsProfile, awsRegion, projRootPath, p
ParameterKey: 'aaStage',
ParameterValue: projStage,
UsePreviousValue: false,
}, {
ParameterKey: 'aaProjectBucket',
ParameterValue: projStage,
UsePreviousValue: false,
}, {
ParameterKey: 'aaDataModelPrefix',
ParameterValue: projStage,

View File

@ -214,6 +214,22 @@ exports.generateLambdaName = function(awsmJson) {
});
};
/**
* Generate ProjectBucket Name
* @param stage
* @param region
* @param projectDomain
* @returns {string}
*/
exports.generateProjectBucketName = function(stage, region, projectDomain) {
// Sanitize
stage = stage.trim().toLowerCase;
};
/**
* Gets all lambda functionName's
*