@@ -44,7 +44,7 @@ An internal SES LocalStack testing endpoint (`/_localstack/aws/ses`) is configur
4444- [ LocalStack CLI] ( https://docs.localstack.cloud/getting-started/installation/#localstack-cli )
4545- [ LocalStack Web Application account] ( https://app.localstack.cloud/sign-up ) & [ Auth Token] ( https://docs.localstack.cloud/getting-started/auth-token/ )
4646- [ Docker] ( https://docs.docker.com/get-docker/ )
47- - [ Python 3.9 +] ( https://www.python.org/downloads/ ) & ` pip `
47+ - [ Python 3.11 +] ( https://www.python.org/downloads/ ) & ` pip `
4848- [ AWS CLI] ( https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html ) & [ ` awslocal ` wrapper] ( https://docs.localstack.cloud/user-guide/integrations/aws-cli/#localstack-aws-cli-awslocal )
4949- ` jq ` , ` zip ` & ` curl `
5050
@@ -95,11 +95,11 @@ pip install -r requirements-dev.txt
9595{{< /tabpane >}}
9696
9797{{< callout "tip" >}}
98- If you are encountering issues with the installation of the packages, such as Pillow, ensure you use the same version as the Python Lambdas (3.9 ) for Pillow to work.
99- If you're using <a href =" https://github.com/pyenv/pyenv " >pyenv</a >, install and activate Python 3.9 with the following commands:
98+ If you are encountering issues with the installation of the packages, such as Pillow, ensure you use the same version as the Python Lambdas (3.11.6 ) for Pillow to work.
99+ If you're using <a href =" https://github.com/pyenv/pyenv " >pyenv</a >, install and activate Python 3.11 with the following commands:
100100{{< command >}}
101- $ pyenv install 3.9.0
102- $ pyenv global 3.9.0
101+ $ pyenv install 3.11
102+ $ pyenv global 3.11
103103{{< / command >}}
104104{{< /callout >}}
105105
@@ -173,35 +173,35 @@ $ awslocal sns subscribe \
173173{{< command >}}
174174$ (cd lambdas/presign; rm -f lambda.zip; zip lambda.zip handler.py)
175175$ awslocal lambda create-function \
176- --function-name presign \
177- --runtime python3.9 \
178- --timeout 10 \
179- --zip-file fileb://lambdas/presign/lambda.zip \
180- --handler handler.handler \
181- --role arn:aws:iam::000000000000: role /lambda-role \
182- --environment Variables="{STAGE=local}"
176+ --function-name presign \
177+ --runtime python3.11 \
178+ --timeout 10 \
179+ --zip-file fileb://lambdas/presign/lambda.zip \
180+ --handler handler.handler \
181+ --role arn:aws:iam::000000000000: role /lambda-role \
182+ --environment Variables="{STAGE=local}"
183183$ awslocal lambda wait function-active-v2 --function-name presign
184184$ awslocal lambda create-function-url-config \
185- --function-name presign \
186- --auth-type NONE
185+ --function-name presign \
186+ --auth-type NONE
187187{{< / command >}}
188188
189189#### Create the Image List Lambda
190190
191191{{< command >}}
192192$ (cd lambdas/list; rm -f lambda.zip; zip lambda.zip handler.py)
193193$ awslocal lambda create-function \
194- --function-name list \
195- --handler handler.handler \
196- --zip-file fileb://lambdas/list/lambda.zip \
197- --runtime python3.9 \
198- --timeout 10 \
199- --role arn:aws:iam::000000000000: role /lambda-role \
200- --environment Variables="{STAGE=local}"
194+ --function-name list \
195+ --handler handler.handler \
196+ --zip-file fileb://lambdas/list/lambda.zip \
197+ --runtime python3.11 \
198+ --timeout 10 \
199+ --role arn:aws:iam::000000000000: role /lambda-role \
200+ --environment Variables="{STAGE=local}"
201201$ awslocal lambda wait function-active-v2 --function-name list
202202$ awslocal lambda create-function-url-config \
203- --function-name list \
204- --auth-type NONE
203+ --function-name list \
204+ --auth-type NONE
205205{{< / command >}}
206206
207207#### Build the Image Resizer Lambda
@@ -210,7 +210,7 @@ $ awslocal lambda create-function-url-config \
210210{{< tab header="macOS" lang="shell" >}}
211211cd lambdas/resize
212212rm -rf libs lambda.zip
213- docker run --platform linux/x86 * 64 -v "$PWD":/var/task "public.ecr.aws/sam/build-python3.9 " /bin/sh -c "pip install -r requirements.txt -t libs; exit"
213+ docker run --platform linux/x86_64 -v "$PWD":/var/task "public.ecr.aws/sam/build-python3.11 " /bin/sh -c "pip install -r requirements.txt -t libs; exit"
214214cd libs && zip -r ../lambda.zip . && cd ..
215215zip lambda.zip handler.py
216216rm -rf libs
@@ -220,7 +220,7 @@ cd ../..
220220cd lambdas/resize
221221rm -rf package lambda.zip
222222mkdir package
223- pip install -r requirements.txt -t package --platform manylinux_2_28_x86_64 --python-version 3.9 --no-deps
223+ pip install -r requirements.txt -t package --platform manylinux_2_28_x86_64 --python-version 3.11 --no-deps
224224zip lambda.zip handler.py
225225cd package
226226zip -r ../lambda.zip * ;
@@ -242,19 +242,19 @@ cd ../..
242242
243243{{< command >}}
244244$ awslocal lambda create-function \
245- --function-name resize \
246- --runtime python3.9 \
247- --timeout 10 \
248- --zip-file fileb://lambdas/resize/lambda.zip \
249- --handler handler.handler \
250- --dead-letter-config TargetArn=arn:aws:sns:us-east-1:000000000000: failed-resize-topic \
251- --role arn:aws:iam::000000000000: role /lambda-role \
252- --environment Variables="{STAGE=local}"
245+ --function-name resize \
246+ --runtime python3.11 \
247+ --timeout 10 \
248+ --zip-file fileb://lambdas/resize/lambda.zip \
249+ --handler handler.handler \
250+ --dead-letter-config TargetArn=arn:aws:sns:us-east-1:000000000000: failed-resize-topic \
251+ --role arn:aws:iam::000000000000: role /lambda-role \
252+ --environment Variables="{STAGE=local}"
253253$ awslocal lambda wait function-active-v2 --function-name resize
254254$ awslocal lambda put-function-event-invoke-config \
255- --function-name resize \
256- --maximum-event-age-in-seconds 3600 \
257- --maximum-retry-attempts 0
255+ --function-name resize \
256+ --maximum-event-age-in-seconds 3600 \
257+ --maximum-retry-attempts 0
258258{{< / command >}}
259259
260260#### Connect S3 bucket to Resizer Lambda
0 commit comments