https://github.com/rafalwilinski/serverless-develop
Deploy your functions to AWS Lambda as you code, in realtime
https://github.com/rafalwilinski/serverless-develop
aws aws-lambda deployment node nodejs plugin serverless
Last synced: 5 months ago
JSON representation
Deploy your functions to AWS Lambda as you code, in realtime
- Host: GitHub
- URL: https://github.com/rafalwilinski/serverless-develop
- Owner: RafalWilinski
- Created: 2017-09-16T07:35:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-19T12:15:12.000Z (over 8 years ago)
- Last Synced: 2025-05-08T21:02:18.268Z (11 months ago)
- Topics: aws, aws-lambda, deployment, node, nodejs, plugin, serverless
- Language: JavaScript
- Homepage: https://rwilinski.me
- Size: 1.4 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serverless Develop Plugin
[](http://www.serverless.com)
[](https://badge.fury.io/js/serverless-develop)
[](#contributing)
Deploy your functions to AWS Lambda as you code and get realtime feedback.
## What is this?
Right now, unpolished PoC, however, works.
## What problem does it solve?
Iterating with Serverless Framework is slow.
Plugins like [serverless-offline](https://github.com/dherault/serverless-offline) or [emulator](https://github.com/serverless/emulator) try to solve that problem by Emulating AWS Lambda environment locally. That solution is far from perfect because of different container, different environment, different IAM roles etc. etc. - Inconsistency.
This plugin, instead of running Lambdas offline, deploys your code to AWS Lambda as you type, in realtime. Welcome back to 2000's, where PHP FTP deployments were made every time `CMD+S` was hit.

## Installation
1. Run `npm install serverless-develop --save`
2. Add `serverless-develop` to your `serverless.yml` `plugins` section:
```yml
plugins:
- serverless-develop
```
3. Run `serverless develop`
## Configuration
`serverless-develop` can be configured by changing following variables in `serverless.yml` file.
```yml
custom:
develop:
middleware:
- npm run build # Runs `npm run build` before packaging
buildPath: build # Packages files from `build` directory
sourcePath: src # Points to source files directory
changeInterval: 0.2 # Specifies max amount of seconds between deployments
```
## How does it work?
1. Plugin builds individual artifacts, one for each function
2. After that, plugin watches files for changes
3. Once change is made, function checks affected functions, runs middleware (if any) and adds change to function's archive in `.serverless` directory
4. Deploy using raw AWS-SDK call without performing checks or updating CloudFormation
Note: Right now, [only JS is supported](https://github.com/RafalWilinski/serverless-develop/blob/master/index.js#L204).
## Examples:
- [Basic](https://github.com/RafalWilinski/serverless-develop/tree/master/examples/basic)
- [With Babel build pipeline](https://github.com/RafalWilinski/serverless-develop/tree/master/examples/babel)
## Integration with `serverless-webpack`
To be added...
## Credits and inspiration
Heavily inspired by [@keithwhor's](https://github.com/keithwhor) [article](https://medium.com/@keithwhor/rise-of-functions-as-a-service-how-php-set-the-serverless-stage-20-years-ago-ccb560c5f422) and [@mthenw thoughts](https://github.com/mthenw).
## Contributing
Awesome! All contributions are welcome.
## License
MIT