EC2 Overview

EC2 is short for Elastic Compute Cloud and offers a virtual machine in the cloud, but with a few tricks up its sleeve.

As with any virtual machine, you can connect a virtual network interface to it, as well as some storage. What most virtual machines can’t do, however, is auto-scaling: growing and shrinking your fleet of servers on-demand or completely automatically. EC2 has the unique ability that this is all built-in to the service.

Again, some things might sound familiar when you first have a look at the EC2 dashboard at AWS, but others might not. Here’s a rundown of some terms that you will come across:

Types of EC2 instance

SPOT Instances

Spot requests allow you to bid on spare Amazon EC2 computing capacity. Since Spot instances are often available at a discount compared to On-Demand pricing, you can significantly reduce the cost of running your applications, grow your application’s compute capacity and throughput for the same budget.

Regular or On Demand

An AWS EC2 Instance is nothing but a server in the cloud. Just like your physical server, it comes with varying specs for compute, memory, networking, and storage

Reserved Instances

Reserved instances is a pricing model based on a commitment. You can pay for your EC2 instances up-front and in return you will get a reduced hourly rate. Using Reserved Instances you can save up to 75% on your monthly EC2 expenditure.

AMI

AMIs (Amazon Machine Images) are a lot like snapshots in VMware. You can launch new EC2 instances from an AMI and you can even share your AMI with multiple AWS accounts.

Launch EC2 Instance

On the Amazon EC2 console, click on Launch Instance.

Choose Ubuntu AMI

Select Free Tier t2 micro

Configure Instance Details

Add Storage

Add a tag if you want to

Create Security Group


**Make sure port 22 is open.

Review your instance

Create Key pair and download

Login to your Instance

Select your instance
Use the chmod command to make sure your private key file isn’t publicly viewable.
chmod 400 /path_to_key/my_key.pem

Finally, SSH to your EC2 instance
ssh -i /path_to_key/my_key.pem user_name@public_dns_name

ELastic Block Storage

EBS is a virtual block device. You can think of it as a hard drive, although it’s really a bunch of software magic to link into another kind of storage device but make it look like a hard drive to an instance

EBS is just the name for the whole service. Inside of EBS you have what are called volumes. These are the “units” amazon is selling you. You create a volume and they allocate you X number of gigabytes and you use it like a hard drive that you can plug into any of your running computers (instances).

Types of EBS

Volumes: It can either be created blank or from a snapshot copy of the previous volume.

Types of EBS volumes and their Configurations:

Snapshots: snapshots of volumes: An exact capture of what a volume looked like at a particular moment in time, including all its data.
Create EBS Volume?

Migrate EBS volume from one zone to another?

EBS resize
Go to Volume. Select the volume you want to modify and click on Modify Volume

Set your size and click on Modify.

You will find the screen below.

Congrats you just Modify EBS volume.

Subscribe Now