Skip to content

Kristina-Pianykh/terraform-aws-test-infrastructure

Repository files navigation

Toy AWS Infrastructure with terraform

Deploy Terraform

Destroy Terraform

tfsec

A simple setup for requesting a service that saves a request data to an Amazon RDS Database. The service is fronted with a public-facing Application Load Balancer that forwards a request to the service hosted on EC2 instances. The CPU load on the instances is regulated via an Autoscaling Group policy that spins up more EC2s if a threshold on average CPU utilization is exceeded. The request data is then encueued to an SQS buffer in the form of a message to prevent data loss in case the RDS Database is overloaded. The security policies ensure that messages are read by the RDS service only. The Database allows access for one local IP address for debugging purposes. Drag Racing

It's deployed via Github Workflows (on push) or locally with the terraform_deploy.sh script.

To destroy the infrastructure, trigger the workflow Terraform Destroy in the GitHub UI.

Testing

Test the Autoscaling

  • connect to an EC2 instance via AWS Console
  • Install the stress testers with:
sudo amazon-linux-extras install epel -y
sudo yum install stress -y
  • Run the stress tester with:
stress -c <cpu_cores>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published