Amazon EC2

EC2 QUIz and assignments

By Abhinay Durishetty
6 mins read
Assignment: Launch an EC2 Instance and Connect with Session Manager

In this assignment, you will practice launching an Amazon EC2 instance with default settings and connecting to it using AWS Systems Manager Session Manager. This hands-on exercise will help you become familiar with the basics of launching EC2 instances and secure access.


Step 1: Launch an EC2 Instance

  • Log in to your AWS Management Console.
  • Navigate to the EC2 Dashboard.
  • Click on "Launch Instance."
  • In the "Choose an Amazon Machine Image (AMI)" step, select an Amazon Linux 2 AMI (or another suitable image of your choice).
  • In the "Choose an Instance Type" step, select an instance type (e.g., t2.micro).
  • In the "Configure Instance Details" step:
--> Keep the default settings for VPC and Subnet (using the default VPC and subnet).
--> Enable "Auto-assign Public IP" to ensure the instance can communicate over the internet.

  • In the "Add Storage" step, accept the default storage settings.
  • Continue through the "Add Tags" and "Configure Security Group" steps, keeping the default settings or customizing them as needed.
  • In the "Review and Launch" step, review your instance configuration, and then click "Launch."
  • Create a new key pair or use an existing one to securely access the instance. Download the private key file (.pem) and save it to a secure location.

Step 2: Connect to the EC2 Instance Using Session Manager

  • Go to the AWS Systems Manager Console.
  • In the navigation pane, choose "Session Manager" under "Instances & Nodes."
  • Click on the "Start session" button.
  • In the "Start a session" dialog, select the EC2 instance you just launched from the list of available instances.
  • Click the "Start session" button to initiate the session.

Step 3: Test the Session

You will now have a secure shell (SSH) session to your EC2 instance using Session Manager. You can run commands and interact with the instance directly through the AWS Management Console.

Execute some basic commands (e.g., ls, pwd, sudo yum update) to verify that you have successfully connected to the EC2 instance.

Step 4: Terminate the EC2 Instance

  • Once you have completed your tasks on the EC2 instance, make sure to terminate it to avoid incurring additional charges.

Confirm that you were able to successfully create an EC2 instance with default options and connect to it using Session Manager.
Take note of any issues you encountered and how you resolved them, if applicable.

What have you learnt about EC2?

Which EC2 instance type is optimized for applications that require a balance of compute, memory, and network resources?

a) Compute-Optimized
b) Memory-Optimized
c) Storage-Optimized
d) General-Purpose
d) General-Purpose

What is an Amazon Machine Image (AMI) in EC2?

a) A virtual private server in the cloud

b) A type of load balancer

c) A pre-configured virtual machine template

d) An Elastic IP address

b) A type of load balancer
You are about to develop an IO-intensive application where a large volume of data is continuously generated from multiple IO devices. This data needs to be processed, stored, and analyzed in real-time. Which type of EC2 instance do you suggest for this application at the development phase?

Considering the IO-intensive nature of the application and the need for real-time data processing and analysis, which type of EC2 instance would be most suitable for this scenario?

a) Compute-Optimized Instances

b) Memory-Optimized Instances

c) Storage-Optimized Instances

d) I/O-Optimized Instances

d) I/O-Optimized Instances

In an IO-intensive application where a significant amount of data is generated and real-time processing and analysis are required, I/O-Optimized Instances would be the most suitable choice. These instances are specifically designed to handle high levels of input/output operations per second (IOPS) and are ideal for applications that require fast and efficient data transfer to and from storage devices. They provide the necessary disk performance and low-latency access to handle the data-intensive workloads effectively.

Instance Class: I3
Instance Types: