Chaos Engineering

Introduction to Real life Application

Pre requisite to Deploy Application Cloud 9 Deprecation

In this lesson, you’ll provision an EC2-based development environment with all the tools required to deploy our pet adoption website using the AWS Cloud Development Kit (CDK). We’ll cover:

  1. Manual setup of an EC2 instance
  2. Automating that setup with a CloudFormation template
  3. Alternatives to the deprecated AWS Cloud9 environment

The image outlines the prerequisites for setting up architecture and deploying an application, including choosing your environment, deploying an EC2 instance, and deploying the application with CDK.

1. Create the IAM Role

First, create an IAM role named FIS-workshop-admin with the following managed policies:

Policy NamePurpose
AmazonEC2FullAccessFull control of EC2 resources
AmazonSSMManagedInstanceCoreSystems Manager Session Manager permissions

Warning

The role name must be exactly FIS-workshop-admin. All subsequent CDK and CloudFormation scripts expect this exact name.

2. Launch and Configure the EC2 Instance

When launching your EC2 instance:

  1. Attach the FIS-workshop-admin IAM role
  2. Choose an instance type (e.g., t3.medium)
  3. Select your VPC and subnets
  4. Enable SSH access or plan to use AWS Systems Manager Session Manager

3. Connect & Prepare Your Environment

Once your instance is up:

# Update the OS
sudo yum update -y

# Install Git
sudo yum install -y git

Clone the workshop repository and bootstrap the environment:

git clone https://github.com/aws-samples/fis-workshop-experiments.git
cd fis-workshop-experiments

# Install Docker, kubectl, Node.js, AWS CDK, and other dependencies
bash bootstrap.sh

This script installs:

  • Docker Engine
  • Kubernetes CLI tools (kubectl, eksctl)
  • Node.js and npm
  • AWS CDK Toolkit (npm install -g aws-cdk)

4. Automate with CloudFormation (Optional)

Skip steps 1–2 by deploying our CloudFormation template. It creates both the IAM role and EC2 instance in one stack:

aws cloudformation deploy \
  --template-file infrastructure/dev-environment.yaml \
  --stack-name fis-workshop-dev \
  --capabilities CAPABILITY_NAMED_IAM

Cloud9 Deprecation & Alternative IDEs

AWS no longer provides preconfigured Cloud9 environments for new accounts as of July 2024. You can continue with your custom Cloud9 IDE, or choose one of these alternatives:

The image announces the deprecation of Cloud 9 IDE as of July 2024 and informs that the account does not have access to the Cloud9 service, suggesting alternatives like AWS Toolkits and AWS CloudShell.

All scripts and detailed instructions are available in the fis-workshop-experiments GitHub repository.


References

Watch Video

Watch video content

Previous
Introduction to Our Real Life Application