aws-samples / amazon-dynamodb-labs

Hands on workshop and design scenarios for Amazon DynamoDB
https://catalog.workshops.aws/dynamodb-labs
Apache License 2.0
163 stars 111 forks source link

Update Step3.en.md #117

Open brentroady opened 3 months ago

brentroady commented 3 months ago

Python runtime given throws an exception when creating the lambda function (InvalidParameterValueException). Update to the new runtime version.

Issue #, if available:

Description of changes: Running the lamba create-function results in the following error

:~/workshop $ aws lambda create-function \
--function-name ddbreplica_lambda --zip-file fileb://ddbreplica_lambda.zip \
--handler ddbreplica_lambda.lambda_handler --timeout 60 --runtime python3.7 \
--description "Sample lambda function for dynamodb streams" \
--role $(cat ~/workshop/ddb-replication-role-arn.txt)

An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: The runtime parameter of python3.7 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (python3.12) while creating or updating functions.

This change updates the example to use the recommended Python runtime.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

switch180 commented 2 months ago

Thank you for finding this and reporting it. We will add to this commit some other changes for the lab guide and merge it in.