Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions python-test-samples/async-lambda-dynamodb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ clean: ##=> Deletes current build environment and latest build
rm -rf ./.aws-sam/ ./venv/

checkOSDependencies:
python3 --version || grep "3.9" || (echo "Error: Requires Python 3.9" && exit 1)
python3 --version | grep "3.13" || (echo "Error: Requires Python 3.13" && exit 1)

all: clean build

install: checkOSDependencies
${PIP} install virtualenv
python3 -m venv venv
python3 -m virtualenv venv
source venv/bin/activate && ${PIP} install pytest boto3 backoff

deps:
source ./venv/bin/activate && ${PIP} install -r tests/integration/requirements.txt
Expand Down
3 changes: 2 additions & 1 deletion python-test-samples/async-lambda-dynamodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The SAM CLI is an extension of the AWS CLI that adds functionality for building
To use the SAM CLI, you need the following tools.

- SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html)
- Python 3 - [Install Python 3](https://www.python.org/downloads/)
- Python 3.13 - [Install Python 3.13](https://www.python.org/downloads/)
- Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community)

This project uses the `make` build automation tool to provide convenient commands for building, deploying and testing this sample application. To view the available commands make sure this utility is installed and run the `make` command in the terminal from the same directory as the `Makefile`.
Expand Down Expand Up @@ -72,3 +72,4 @@ Run these four commands in sequence.
- `exit` - Close the virtual environment shell

[[top]](#asynchronous-integration-test-with-lambda-event-listener-and-dynamodb)

5 changes: 2 additions & 3 deletions python-test-samples/async-lambda-dynamodb/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Globals: # https://docs.aws.amazon.com/serverless-application-model/latest/devel
Function:
Timeout: 15
MemorySize: 256
Runtime: python3.9
Runtime: python3.13
Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
# Embed Lambda Powertools as a shared Layer
# See: https://awslabs.github.io/aws-lambda-powertools-python/latest/#lambda-layer
Layers: #
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:9
- !Sub arn:aws:lambda:${AWS::Region}:017000801446:layer:AWSLambdaPowertoolsPython:76
Environment:
Variables:
DESTINATION_BUCKET:
Expand Down Expand Up @@ -162,4 +162,3 @@ Outputs:
Value: !Ref AsyncTransformTestResultsTable