AWS Autoscaling Automation
This project contains three parts:
- A Python/Flask application with a single endpoint to generate load
- A Packer manifest to build a custom AMI containing the app above
- Terraform scripts to build the AWS infrastructure
- Set required environment variables
When completed, you can test autoscaling by hitting the endpoint continuously:
$ watch -n 5 curl 'http://YOUR_ELB_ADDRESS/killme'
Due to the grace period after creation, it is recommended to wait at least 5 min prior to autoscaling.
You can also change the CPU usage and length of time by using the query parameters
time, respectively. i.e.
$ curl 'http://YOUR_ELB_ADDRESS/killme?usage=0.99&time=20'
To remove all AWS resources created by this project, destroy via Terraform:
$ cd infra $ terraform destroy -auto-approve