SAM Build support for Provided runtime
See original GitHub issueDescribe your idea/feature/enhancement
I am trying to use NodeSource’s N|Solid Lambda Layer with SAM. This is a replacement for Node.js and therefore uses the provided
runtime. Everything else with my function is identical to the Node.js runtime. I have a package.json
that included dependencies for my application.
When running sam build
I get the follow error:
$ sam build
2019-04-04 13:26:52 Found credentials in shared credentials file: ~/.aws/credentials
2019-04-04 13:26:52 Building resource 'Function'
Build Failed
Error: 'provided' runtime is not supported
I can’t use SAM to build and deploy my Node.js functions when they use a provided runtime.
I would like sam build
to support the provided
runtime.
Proposal
Obviously, the provided
runtime is a little tricky for building because the runtime could be anything and there’s no way to know from the template.yaml
file.
My proposal would be to add an optional flag to the sam build
command called --builder
. With this flag you could tell sam build
which builder to use regardless of runtime. This way we can still use the provided
runtime, but still use sam build
to package our Node.js applications.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:13 (10 by maintainers)
I just did a quick test on a local build of the CLI and this seems to work as expected. Might be worth adding some additional logging to let the user know it’s auto selected.
@gkrizek This is a great usecase for
.samrc
(#975) - basically a config file that changes the default behavior for SAM CLI. I like the rc file over command line arguments because you can setup how SAM CLI behaves (in this case “sam build”) one time, check into your repository, and be reused across your team without learning a new flag and typing it every time.Thoughts?