-
Notifications
You must be signed in to change notification settings - Fork 115
Description
In trying to deploy a project to the provided.al2 runtime on AWS via SAM, I've encountered a number of key differences between the published container base image and the AWS Lambda environment itself. So far, I've found differences in libraries and shared data - e.g. libmagic and its databases installed in the base images, but not in AWS, and the same for glib-2.0. I'm sure there are other differences too, it's just that I've not encountered them yet; it's a trial-and-error process to see how something built successfully in a published image fails in AWS Lambda.
I'm aware of the Maintenance policy in that (emphasis mine):
These images are similar to the AWS Lambda execution environment on the cloud to allow customers to easily packaging functions to the container image. However, we may choose to optimize the container images by changing the components or dependencies included.
Is there a better way than trial-and-error for ascertaining differences between published Lambda base images and AWS Lambda itself? Likewise, is there a rationale as to why certain libraries are present in one environment but not another?
So far, I've taken running an interactive shell to analyse AWS Lambda but needing to do this for every dependency seems to negate the purpose of having published base images, since you can't be be sure that anything present in the base image will be on Lambda. I appreciate there may be an aim "optimize" these published container images, but knowing what this entails is key to their usability.