Connect from your client machine into the VPC lab environment using an AWS Cloud9 EC2 instance:
AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug code with just a browser. The execution environment for this Cloud9 environment is an EC2 instance in a public subnet in the lab VPC. Cloud9 includes a code editor, debugger, and terminal. You will use the Cloud9 terminal to reach the sales application and reports engine EC2 instances hosted on private subnets in the lab VPC to validate the desired security configuration.
You have completed the following connection:
Let’s setup SSH configuration on the Cloud9 instance using the first terminal tab. Run these commands from the Cloud9 instance:
aws s3 cp s3://ee-assets-prod-us-east-1/modules/7dbaeba0ef084e64a3566ebed6cb8bd2/v1/prepcloud9forssh.sh ./prepcloud9forssh.sh; chmod 700 prepcloud9forssh.sh; ./prepcloud9forssh.sh
Output from the shell commands should look as follows:
As directed in the output, run the following ssh command to connect to the Sales App EC2 instance running in a private subnet in the VPC
ssh ec2-user@salesapp -i vpce.pem
Output from making the SSH connection to the Sales App should look as follows:
Open a second terminal in Cloud 9 (Repeat step 4 of the ‘Connect to Cloud9 IDE and setup SSH’ instructions). In the second terminal tab establish a connection to the Reports Engine EC2 instance running in a private subnet in the VPC by running the following command:
ssh ec2-user@reportsengine -i vpce.pem
Output from making the SSH connection to the Reports Engine should look as follows:
Leave the tab with the SSH connection to the Reports Engine EC2 instance. We will return to this tab to perform testing later.