-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
28 lines (24 loc) · 942 Bytes
/
deploy.sh
File metadata and controls
28 lines (24 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if [ -z "$deployed_environment" ]
then
echo "\$deployed_environment environment variable is unset!"
echo "Aborting deployment."
exit
fi
product_name=$focusmark_productname
echo Deploying into the $deployed_environment environment.
npm install
# Execute the SAM CLI Deploy command to upload the Lambdas to S3 and deploy them
sam_stack_name=$product_name-"$deployed_environment"-sam-api-projectserverless
sam_template_file='template.sam'
sam_s3_bucket_name=$product_name-$deployed_environment-s3-deployments
echo Deploying the $sam_stack_name stack.
cfn-linting $sam_template_file
sam deploy \
--template-file $sam_template_file \
--stack-name $sam_stack_name \
--s3-bucket $sam_s3_bucket_name \
--s3-prefix focusmark-$deployed_environment-sam-api_project \
--capabilities CAPABILITY_NAMED_IAM \
--parameter-overrides \
TargetEnvironment=$deployed_environment \
ProductName=$product_name