-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-function.sh
More file actions
executable file
·36 lines (30 loc) · 986 Bytes
/
update-function.sh
File metadata and controls
executable file
·36 lines (30 loc) · 986 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
29
30
31
32
33
34
#!/bin/bash
ARN=$(cat .layer.arn.txt)
. 00-vars.sh
echo "Updating function"
aws lambda update-function-code \
--function-name "${FUNCTION_DB}" \
--zip-file "fileb://${OUTPUT_DIR}/function.zip" \
--region ${AWS_REGION}
aws lambda update-function-configuration \
--function-name "${FUNCTION_DB}" \
--region "${AWS_REGION}" \
--environment "Variables={SECRET_NAME=${SECRET_DB}}" \
--layers "${ARN}"
aws lambda publish-version \
--function-name "${FUNCTION_DB}" \
--description "extension test" \
--region ${AWS_REGION}
aws lambda update-function-code \
--function-name "${FUNCTION_WEB}" \
--zip-file "fileb://${OUTPUT_DIR}/function.zip" \
--region ${AWS_REGION}
aws lambda update-function-configuration \
--function-name "${FUNCTION_WEB}" \
--region "${AWS_REGION}" \
--environment "Variables={SECRET_NAME=${SECRET_WEB}}" \
--layers "${ARN}"
aws lambda publish-version \
--function-name "${FUNCTION_WEB}" \
--description "extension test" \
--region ${AWS_REGION}