Open p4tr1ckc4rs0n opened 2 years ago
Also where are the docs for the MetaData section?
Good question. I would expect it to be in https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md but I don't see it there. Probably because Metadata
is a generic feature of CloudFormation templates: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html which then implies that SAM has extended its format informally.
Here are the docs I found for SAM CLI Metadata
: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-build.html
I "solved" this by pulling the following base image that is specific to my target architecture (linux/amd64) and specifying that in my Dockerfile.
FROM public.ecr.aws/lambda/python:3.8-x86_64
Couldn't figure out how to get SAM to respect DockerBuildArgs
🤷 .
Thanks for the documentation links - nothing on DockerBuildArgs
though :(.
I'm building a lambda base image on apple M1 via the SAM template like so:
Building and deploying the stack along with the lambda docker image is fine however I get this error when invoking the function:
I suspect this is an issue with the platform because when i run the image locally (on my apple M1) with the --platform set to "linux/amd64" it errors with the following:
How do I get SAM to build a docker image as linux/amd64 or at least respect the DockerBuildArgs? Also where are the docs for the
Metadata
section?