Connect with Session Manager

Connect to the instance with Session Manager

  1. In the EC2 console, open Instances, select SID-security-instance and choose Connect.
  2. On the Session Manager tab (shown as SSM Session Manager), choose Connect.

Connect with Session Manager

  1. A browser terminal opens. Load the lab variables and list the bucket:
cd ~ && source /etc/profile.d/sid-lab.sh && echo $bucket && aws s3 ls s3://$bucket --recursive

The instance prints the bucket name and the test object app1/file1.

Session Manager shell

If the session is closed later, reconnect and run cd ~ && source /etc/profile.d/sid-lab.sh again before the next commands. The file sets $bucket and the default Region for the AWS CLI.