aws-amplify / aws-amplify/amplify-cli
function hotswap for development
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Is this feature request related to a new or existing Amplify category?
function
### Is this related to another service?
function
### Describe the feature you'd like to request
When I execute `amplify push`, amplify-cli calls the CloudFormation API to update the Lambda Function.
Updating Lambda using CloudFormation is slow compared to updating using the `aws lambda update-function-code` command.
I want to send the code to Lambda faster during development and debugging.
### Describe the solution you'd like
I want the `amplify function watch` command.
When this command is executed, the files under `amplify/backend/function/*/src` are watched, and when a file change is detected, `lambda:UpdateFunctionCode`, `lambda:PublishLayerVersion`, `lambda:UpdateFunctionConfiguration` are executed.
### Describe alternatives you've considered
AWS CDK takes this approach. (see https://github.com/aws/aws-cdk/pull/15748)
Serverless Stack takes a different approach. (see: https://docs.serverless-stack.com/live-lambda-development)
Serverless Stack provides an intermediate server and connects the local environment and Lambda with WebSocket.
I like the AWS CDK approach because it's simple.
### Additional context
I implemented this feature as a [plugin](https://github.com/lambdasawa/amplify-function-hotswap-plugin). (currently Node.js only)
Recently, colleagues and I have started using this plugin at work.
For now, this plugin is working fine, so I think this approach will work.
### Is this something that you'd be interested in working on?
- [X] 👋 I may be able to implement this feature request
- [ ] ⚠️ This feature might incur a breaking change
Contributor guide
Assessment
This issue has not been assessed yet.