@@ -12,11 +12,12 @@ SAM ?= AWS_ENDPOINT_URL=$(AWS_ENDPOINT_URL) \
1212 AWS_DEFAULT_REGION=us-east-1 \
1313 sam
1414FUNCTION_NAME ?= HelloWorldFunctionPython
15+ LAMBDA_RUNTIME ?= python3.13
1516
1617# Changing architecture (arm64 or x86_64) requires rebuilding the Java package in Docker
1718ARCH ?= x86_64
1819DOCKER_PLATFORM ?= linux/$(ARCH )
19- IMAGE ?= public.ecr.aws/sam/build-python3.13 :latest-$(ARCH )
20+ IMAGE ?= public.ecr.aws/sam/build-$( LAMBDA_RUNTIME ) :latest-$(ARCH )
2021
2122all : usage
2223
@@ -36,7 +37,7 @@ build-docker: ## Build the Lambda function zip in Docker
3637
3738# TODO: package dependencies in requirements.txt
3839# TODO: run tests before build
39- build-local : # # Build the Lambda function zip locally (JDK required)
40+ build-local : # # Build the Lambda function zip locally (Python required)
4041 cd hello_world && zip -r hello_world_python.zip .
4142
4243build-sam : # # Build the Lambda function via AWS SAM
@@ -50,7 +51,7 @@ deploy: deploy-aws ## Deploy the Lambda function (default AWS CLI)
5051deploy-aws : # # Deploy the Lambda function via AWS CLI
5152 $(AWS ) lambda create-function \
5253 --function-name $(FUNCTION_NAME ) \
53- --runtime python3.13 \
54+ --runtime $( LAMBDA_RUNTIME ) \
5455 --role arn:aws:iam::000000000000:role/lambda-role \
5556 --handler app.lambda_handler \
5657 --zip-file fileb://hello_world/hello_world_python.zip \
0 commit comments