Skip to content

Commit a535aec

Browse files
authored
zip with packaging added to create lambda function in deployment shell script (#40)
1 parent 2febcad commit a535aec

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

deployment/awslocal/deploy.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ awslocal sns subscribe \
1414
--protocol email \
1515
--notification-endpoint [email protected]
1616

17+
(cd lambdas/presign; rm -f lambda.zip; zip lambda.zip handler.py)
1718
awslocal lambda create-function \
1819
--function-name presign \
1920
--runtime python3.11 \
@@ -29,6 +30,7 @@ awslocal lambda create-function-url-config \
2930
--function-name presign \
3031
--auth-type NONE
3132

33+
(cd lambdas/list; rm -f lambda.zip; zip lambda.zip handler.py)
3234
awslocal lambda create-function \
3335
--function-name list \
3436
--runtime python3.11 \
@@ -44,7 +46,15 @@ awslocal lambda create-function-url-config \
4446
--function-name list \
4547
--auth-type NONE
4648

47-
49+
(
50+
cd lambdas/resize
51+
rm -rf package lambda.zip
52+
mkdir package
53+
pip install -r requirements.txt -t package --platform manylinux2014_x86_64 --only-binary=:all:
54+
zip lambda.zip handler.py
55+
cd package
56+
zip -r ../lambda.zip *;
57+
)
4858
awslocal lambda create-function \
4959
--function-name resize \
5060
--runtime python3.11 \

0 commit comments

Comments
 (0)