start-instances is an AWS Lambda function for use with Lambder.
- python-lambder
This lambda function starts any EC2 instances that match the following:
- instance is stopped
- instance is tagged with Key: 'LambderStart'
It is usually paired with lambder-stop-instances and used to run instances only during business hours to save money.
- Clone this repo
cp example_lambder.json lambder.json
- Edit lambder.json to set your S3 bucket
lambder function deploy
Schedule the function with a new event. Rember that the cron expression is based on UTC.
lambder events add \
--name StartInstances \
--function-name Lambder-start-instances \
--cron 'cron(0 12 ? * MON-FRI *)'
- Parameterize the tag in the input event object