watch Option for SAM Build command
### Describe your idea/feature/enhancement When using `sam build` to build functions that will later be invoked through `sam local [invoke|start-lambda|start-api]`, you need to run `sam build` before each invoke. The reason for this requirement is because the build command places artifacts (code + dependencies + updated template) into a build folder. The `sam local [invoke|start-lambda|start-api]` use these built templates (this has updated locations to the built function code) by default but there is no way to update the built code without running `sam build` again. ### Proposal For the initial implementation of `sam build`, the `--watch` option [was out of scope](https://github.com/awslabs/aws-sam-cli/blob/develop/designs/sam_build_cmd.md#out-of-scope). The proposal is to add support for this option to all customers to enable building when source code changes. An alternative could be to make the `sam local` suite of commands build the function during invoke. The main concern with this is the speed at which you can now invoke (other build enhancements might be a requirement for this, speed, incremental builds, etc). ### Workaround All of the `sam local` command allow 'reloading' of the function code. This means for a given template, if you update the contents of a functions Code/CodeUri, SAM CLI will mount this updated content. So the current option for making interactions easier is to have two terminal windows open, one that builds and one that you local invoke with.
Posted by jfuss on Jan 8, 2019, 2:42 PM
Tags
Related issues
- Add 65536 size support for maps
- TypeScript 7.1 Iteration Plan
- nvim-treeconfig: upstream nvim-treesitter
- Add the "action" and "method" attributes to <button>
- [FEATURE] Support multiple Connector accounts (same connector, different accounts) in Claude and Claude Code on the web (claude.ai/code)
- > We were imposed GitHub for so many exercises!
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
support (Software)
Add 65536 size support for maps
TypeScript 7.1 Iteration Plan
nvim-treeconfig: upstream nvim-treesitter
Add the "action" and "method" attributes to <button>
[FEATURE] Support multiple Connector accounts (same connector, different accounts) in Claude and Claude Code on the web (claude.ai/code)
> We were imposed GitHub for so many exercises!
Add support for Visual Studio 2026 Integration
Support for Helm v4
watch Option for SAM Build command
### Describe your idea/feature/enhancement When using `sam build` to build functions that will later be invoked through `sam local [invoke|start-lambda|start-api]`, you need to run `sam build` before each invoke. The reason for this requirement is because the build command places artifacts (code + dependencies + updated template) into a build folder. The `sam local [invoke|start-lambda|start-api]` use these built templates (this has updated locations to the built function code) by default but there is no way to update the built code without running `sam build` again. ### Proposal For the initial implementation of `sam build`, the `--watch` option [was out of scope](https://github.com/awslabs/aws-sam-cli/blob/develop/designs/sam_build_cmd.md#out-of-scope). The proposal is to add support for this option to all customers to enable building when source code changes. An alternative could be to make the `sam local` suite of commands build the function during invoke. The main concern with this is the speed at which you can now invoke (other build enhancements might be a requirement for this, speed, incremental builds, etc). ### Workaround All of the `sam local` command allow 'reloading' of the function code. This means for a given template, if you update the contents of a functions Code/CodeUri, SAM CLI will mount this updated content. So the current option for making interactions easier is to have two terminal windows open, one that builds and one that you local invoke with.
Comments (0)
No comments yet. Start the discussion.