Last active
February 25, 2019 10:15
-
-
Save WisaniShilumani/5f8a615b20ec0b3d15114171f33f24fe to your computer and use it in GitHub Desktop.
Cloudformation Deploy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME=my-sam-package | |
S3_BUCKET=my-sam-package | |
RESOURCES=services | |
ARCHIVE_NAME=resources.zip | |
TEMPLATE_FILE=sam.yaml | |
OUTPUT_TEMPLATE_FILE=sam-output.yaml | |
ENVIRONMENT=production | |
AWS_PROFILE=default | |
REGION=us-east-1 | |
STACK_NAME=${ENVIRONMENT}-${NAME} | |
aws s3 mb s3://${S3_BUCKET} \ | |
--region ${REGION} | |
aws cloudformation package \ | |
--template-file ${TEMPLATE_FILE} \ | |
--output-template-file ${OUTPUT_TEMPLATE_FILE} \ | |
--s3-bucket ${S3_BUCKET} \ | |
--region ${REGION} | |
${PROFILE} | |
aws cloudformation deploy \ | |
--template-file ${OUTPUT_TEMPLATE_FILE} \ | |
--stack-name ${STACK_NAME} \ | |
--capabilities ${CAPABILITIES} \ | |
--region ${REGION} \ | |
${PROFILE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment