Skip to main content
Previously, we deployed our application build environment on EC2 using the AWS Console. In this tutorial, we’ll automate that process with AWS CloudFormation. The template (FISAdminSetup.yaml) is in the GitHub repo (see README).

CloudFormation Template Overview

This template:
  • Defines two parameters:
    • DefaultVPCId: Your default VPC ID
    • LatestAl2023AmiId: Latest Amazon Linux 2023 AMI ID (kernel 6.1)
  • Creates an IAM role (fisworkshop-admin) for EC2 & Systems Manager
  • Provisions an EC2 instance with security group, instance profile, and user data
All dependencies (Node.js, Docker, AWS CDK, kubectl, Helm, eksctl) are installed automatically via EC2 user data.

Deploying the CloudFormation Stack

  1. Open the CloudFormation console.
  2. Click Create stack > With new resources (standard).
  3. Upload the FISAdminSetup.yaml template.
  4. Click Next.
The image shows an AWS CloudFormation interface where a user is preparing a template for creating a stack, with options to choose an existing template, use a sample, or build from an application composer. The user has uploaded a template file named "FISAdminSetup.yaml".
  1. Configure stack details:
    • Stack name: FIS-Admin-Setup
    • DefaultVPCId: Select your default VPC
    • LatestAl2023AmiId: Confirm or override the AMI
  2. Click Create stack and wait until the status is CREATE_COMPLETE.

Provisioned Resources

Verify the EC2 instance in the console:
The image shows an AWS EC2 instance summary page, displaying details such as instance ID, public and private IP addresses, instance state, and type.

Connect & Verify Installed Tools

SSH into the instance and run:

Prepare the FIS Workshop Environment

Clone the AWS Fault Injection Simulator workshop:

Verify AWS Region & IAM Role

If the IAM role validation fails, stop here. Ensure fisworkshop-admin is correctly attached before proceeding.

Install Dependencies & Bootstrap CDK

Deploy the FIS Workshop Stacks

  1. Build your service Docker image:
  2. Deploy the main FIS CDK stack (replace with your ARNs):
  3. Retrieve the Petstore site URL:
  4. Deploy FIS serverless & observability components (may take up to 30 minutes).
Your CloudFormation-based environment is now ready for the AWS Fault Injection Simulator workshop!

References

Watch Video