File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -93,12 +93,13 @@ if [[ ! $(aws cloudformation describe-stacks --stack-name "$STACK_NAME" --region
9393 CFN_DEPLOY_COMMAND=" create-stack"
9494 CFN_WAIT_COMMAND=" stack-create-complete"
9595 CFN_CLI_INPUT_YAML_FILE=" $INFRASTRUCTURE_DIR /environments/$ENVIRONMENT -cfn-create-args.yaml"
96-
96+ UPDATE_LAMBDA= " false "
9797else
9898 info " The stack $STACK_NAME exists, updating ..."
9999 CFN_DEPLOY_COMMAND=" update-stack"
100100 CFN_WAIT_COMMAND=" stack-update-complete"
101101 CFN_CLI_INPUT_YAML_FILE=" $INFRASTRUCTURE_DIR /environments/$ENVIRONMENT -cfn-update-args.yaml"
102+ UPDATE_LAMBDA=" true"
102103fi
103104
104105CLI_INPUT_YAML=$( sed " s#BUCKET_URL_PLACEHOLDER#$BUCKET_URL #g" " $CFN_CLI_INPUT_YAML_FILE " )
@@ -112,6 +113,13 @@ aws cloudformation wait $CFN_WAIT_COMMAND \
112113 --stack-name " $STACK_NAME " \
113114 --region " $REGION "
114115
116+ info " Stack $STACK_NAME deployed"
117+
118+ if [[ $UPDATE_LAMBDA == " true" ]]; then
119+ info " Updating Lambda ..."
120+ bash " $CURRENT_DIR /build_and_update_lambda.sh" --stack-name " $STACK_NAME " --region " $REGION "
121+ fi
122+
115123info " Deployment completed!"
116124# -----------------------------
117125
You can’t perform that action at this time.
0 commit comments