File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1- # python3.8 lambda base image
2- FROM public.ecr.aws/lambda/python:3.8
1+ # python3.12 lambda base image
2+ FROM public.ecr.aws/lambda/python:3.12
33
44# copy requirements.txt to container
5- COPY requirements.txt ./
5+ COPY requirements.txt ${LAMBDA_TASK_ROOT}
66
77# installing dependencies
88RUN pip3 install -r requirements.txt
99
1010# Copy function code to container
11- COPY app.py ./
11+ COPY app.py ${LAMBDA_TASK_ROOT}
1212
1313# setting the CMD to your handler file_name.function_name
1414CMD [ "app.handler" ]
Original file line number Diff line number Diff line change 1010def handler (event , context ):
1111
1212 # TODO implementation
13-
13+
1414 return {
1515 'headers' : {'Content-Type' : 'application/json' },
16- 'statusCode' : 200 ,
17- 'body' : json .dumps ({"message" : "Lambda Container image invoked!" ,
16+ 'statusCode' : 200 ,
17+ 'body' : json .dumps ({"message" : "Lambda Container image invoked!" ,
1818 "event" : event })
19- }
19+ }
You can’t perform that action at this time.
0 commit comments