Skip to content

Commit

Permalink
Merge pull request #42 from srcecde/dev
Browse files Browse the repository at this point in the history
Update to lambda container image config
  • Loading branch information
srcecde authored Mar 26, 2024
2 parents 953bc16 + d4f9552 commit 042e0d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
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})
    }
}

0 comments on commit 042e0d6

Please sign in to comment.