Install and Configure Tools

In the Cloud9 workspace, run the following commands:

Install and setup prerequisites

# Pull down the git repo
cd ~/environment
git clone

# Install prerequisite packages
sudo yum -y install jq nodejs python36

# Install SSM session manager plugin
curl "" -o "session-manager-plugin.rpm"
sudo yum install -y session-manager-plugin.rpm

# Install aws-cdk
npm install -g --force aws-cdk@1.106.1

# Setting environment variables required to communicate with AWS API's via the cli tools
echo "export AWS_DEFAULT_REGION=$(curl -s | jq -r .region)" >> ~/.bashrc
echo "export AWS_REGION=\$AWS_DEFAULT_REGION" >> ~/.bashrc
echo "export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)" >> ~/.bashrc
source ~/.bashrc

#Install AWS Copilot cli
curl -Lo copilot && \
chmod +x copilot && \
sudo mv copilot /usr/local/bin/copilot &&\
copilot --help

cat << EOF > ~/.aws/config
output = json
role_arn = $(aws iam get-role --role-name ecsworkshop-admin | jq -r .Role.Arn)
credential_source = Ec2InstanceMetadata