Build only the function I want to test
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
SAM CLI now supports building a single function instead of the whole template, as of [v0.16.0](https://github.com/awslabs/aws-sam-cli/releases/tag/v0.16.0). Currently the toolkit will run `sam build` when debugging and invoking the function. This will build the whole template and increase the time for a customer to debug/invoke. If instead, the toolkit passes the Functions LogicalID from the template to the build command `sam build MyFunction`, build will only build that function. This should only be used in the debug/invoke cases and the full template will still need to be built before package/deploy to ensure all functions are built before uploading to the cloud.
Contributor guide
Research direction
Start at the debug and invoke paths that currently run `sam build`, and trace how the function's logical ID is obtained from the template. Done means debug/invoke builds only the requested function, while package/deploy continues to build the full template; verify both paths with the existing test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- cloud, devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100