Skip to content

Commit 042e0d6

Browse files
authored
Merge pull request #42 from srcecde/dev
Update to lambda container image config
2 parents 953bc16 + d4f9552 commit 042e0d6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lambda/container-image/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
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
88
RUN 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
1414
CMD [ "app.handler" ]

lambda/container-image/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
def 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+
}

0 commit comments

Comments
 (0)