Skip to content
Merged
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
8 changes: 4 additions & 4 deletions lambda/container-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# python3.8 lambda base image
FROM public.ecr.aws/lambda/python:3.8
# python3.12 lambda base image
FROM public.ecr.aws/lambda/python:3.12

# copy requirements.txt to container
COPY requirements.txt ./
COPY requirements.txt ${LAMBDA_TASK_ROOT}

# installing dependencies
RUN pip3 install -r requirements.txt

# Copy function code to container
COPY app.py ./
COPY app.py ${LAMBDA_TASK_ROOT}

# setting the CMD to your handler file_name.function_name
CMD [ "app.handler" ]
8 changes: 4 additions & 4 deletions lambda/container-image/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
def handler(event, context):

# TODO implementation
   

return {
'headers': {'Content-Type' : 'application/json'},
        'statusCode': 200,
        'body': json.dumps({"message": "Lambda Container image invoked!",
'statusCode': 200,
'body': json.dumps({"message": "Lambda Container image invoked!",
"event": event})
    }
}