Skip to content

Breaking: Change lambda task root directory #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

aplr
Copy link
Contributor

@aplr aplr commented Mar 15, 2024

This PR changes the task root of the lambda function to use LAMBDA_TASK_ROOT, documented in the AWS documentation instead of a custom one.

The previous custom task root /app caused issues with creating and running the base image for newer lambda runtime versions.

This introduces a breaking change, as evaluation functions using the base layer need to copy their code to LAMBDA_TASK_ROOT. However, this only takes effect when deliberately choosing the new image hosted on github packages.

@aplr aplr changed the title Fix task root Change lambda task root directory Mar 15, 2024
@aplr aplr changed the title Change lambda task root directory Breaking: Change lambda task root directory Mar 15, 2024
@KarlLundengaard
Copy link
Contributor

For clarification "However, this only takes effect when deliberately choosing the new image hosted on github package", how is the deliberate choice made here? Does it mean manually updating the Dockerfile for the evaluation function, or is is this change part of the deployment procedure (i.e. updating and redeploying the evaluation function would mean choosing the new image)?

@aplr
Copy link
Contributor Author

aplr commented Mar 18, 2024

"Deliberately" here means, that you have to write FROM ghcr.io/lambda-feedback/baseevaluationfunctionlayer:3.8 instead of FROM rabidsheep55/python-base-eval-layer in your app/Dockerfile.

Therefore both re-deploys, and even re-builds will not be affected at all, as long as you don't consciously change the base image.


This is only hypothetic as I turned off pushes to rabidsheep55/python-base-eval-layer.

However, for clarification, if the base layer is rebuilt w/ python 3.8 and pushed to rabidsheep55/python-base-eval-layer, it might well be that re-deploys will lead to failing evaluation functions. I suspect that the behaviour of AWS lambda's python base image has changed in the past 6 months since the last build.

@aplr
Copy link
Contributor Author

aplr commented Mar 18, 2024

Btw, python 3.8 will be deprecated from the 14th of October by AWS Lambda, and will cease to function in January 2025.

https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

@KarlLundengaard
Copy link
Contributor

Ok, thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants