AWS in Plain English

New AWS, Cloud, and DevOps content every day. Follow to join our 3.5M+ monthly readers.

Follow publication

Chaos Engineering with the AWS Fault Injection Service (FIS)

Randomly killing EC2 instances: A Terraform project

Martin Graeber
AWS in Plain English
4 min readJun 4, 2021

--

Photo by Charl Folscher on Unsplash

AWS recently made the Fault Injection Service (FIS) available in major regions. Time to do a Terraform project trying a new service.

Basic Setup

The Terraform code deploys an application load balancer addressing an auto scaling group of EC2 instances.

The auto scaling setting requires at least two EC2 instances running in the group. Each EC2 instance runs a web server that returns the instance ID of the EC2.

Some basic definitions in locals.tf:

Variables:

Provider and VPC:

Certificates to be used with the application load balancer:

The target group definition for the application load balancer, accessible via http/80, and a default health check on the root URL:

--

--

Published in AWS in Plain English

New AWS, Cloud, and DevOps content every day. Follow to join our 3.5M+ monthly readers.

Written by Martin Graeber

Senior Solution Architect | Entrepreneur | Trainer | Infrastructure as Code | Terraform | AWS SA Pro | Cloud Security

No responses yet

Write a response