Set Environment variables for the custom build Makefile targets
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
### Describe your idea/feature/enhancement
So, with the new `provided.al2` runtime for example, we need to use the `makefile` build mode, which is great and allows for us to have custom code to build the executables. The problem we are facing is that we want to be able to build some stacks with `architecture: x86_64` and some with `architecture: arm64` but when `sam build` calls the Makefile to build the function, we get no information on what `architecture` we are supposed to build for.
`Building codeuri: services/queue/cmd/one runtime: go1.x metadata: {} architecture: x86_64 functions: ['LambdaOne']`
### Proposal
It will be extremely helpful if AWS Sam was setting some environment variables for at least the architecture but I can also see the same for any `metadata` as well that is part of the function. This will allow the Makefile target to make the proper decisions on how to build the executable.
### Additional Details
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.