Use AWS CloudShell and run AWS CLI Commands

Lab Details

  1. This Lab walks you through the steps to use the AWS CloudShell to run CLI command to create an EC2 instance and SSH into that instance and install Apache web server.

  1. Duration: 45 minutes

  2. AWS Region: US East (N. Virginia) us-east-1


What is AWS Cloud Shell?

AWS CloudShell is a browser-based shell that makes it easy to manage, explore, and interact securely with your AWS resources. With CloudShell, you can quickly run scripts with the AWS Command Line Interface (AWS CLI), experiment with AWS service APIs using the AWS SDKs, or use a range of other tools

Advantages :

  1. CloudShell inherits the credentials of the user signed in to the AWS Management Console.

  2. A fully managed Amazon Linux 2 environment that has the latest versions of popular tools already installed and updated.

  3. With 1 GB of persistent storage per Region, you can store scripts, files, configuration preferences, etc in your home directory.

Architecture Diagram

Task Details

  1. Launching Lab Environment.

  2. Create an Environment in CloudShell.

  3. AWS CLI Command to create a KeyPair.

  4. AWS CLI Command to create a Security group.

  5. AWS CLI Command to launch an EC2 Instance.

  6. SSH into EC2 and install Apache.

  7. Deleting AWS Resources.