https://github.com/marcelog/aws-lambda-start-stop-instances
Sample code for a serverless Lambda useful to Start and Stop EC2 instances
https://github.com/marcelog/aws-lambda-start-stop-instances
Last synced: 10 months ago
JSON representation
Sample code for a serverless Lambda useful to Start and Stop EC2 instances
- Host: GitHub
- URL: https://github.com/marcelog/aws-lambda-start-stop-instances
- Owner: marcelog
- License: apache-2.0
- Created: 2017-02-25T19:21:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-31T15:41:06.000Z (about 9 years ago)
- Last Synced: 2025-04-04T12:35:54.900Z (about 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 16
- Watchers: 3
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About
This is the example code that goes with the article at [http://marcelog.github.io/articles/aws_lambda_start_stop_ec2_instance.html](http://marcelog.github.io/articles/aws_lambda_start_stop_ec2_instance.html).
This Lambda code is used to start and stop EC2 instances.
See the article mentioned above for the details.
Cheers :)
# Using it
```
$ npm install
$ zip -r ec2_start_stop.zip *
```
Read the article for the details.
```json
{
"action": "start",
"instanceId": "i-xxxx"
}
```
Action can be one of `stop` or `start`.
# License
The source code is released under Apache 2 License.
Check [LICENSE](https://github.com/marcelog/aws-lambda-start-stop-instances/blob/master/LICENSE) file for more information.