Experimenting with AWS FIS on multiple EC2 instances with a terminate action
In this section of the chapter, we will first deploy a sample application on EC2 instances, which will be part of the Autoscaling group. There will be a load balancer on top of the EC2 instance to handle the traffic. We will use FIS to terminate the EC2 instance and validate that the application is still accessible and that new EC2 instances are spinning up automatically and will serve the request shortly.
Perform the following steps to implement the experiment using AWS FIS:
- Create an IAM role,
AmazonSSMRoleForInstanceQuickSetup
, and attach theAmazonSSMManagedInstanceCore
AWS managed policy. Then, go to the AWS EC2 console and click on Launch configurations in the bottom-left corner. Then, click on Create launch configuration.
- Provide the configuration information to create a launch configuration, as follows...