AWS - Create EBS, Launch instance and attach

To Launch an instance in AWS, and create EBS and attach it to the instance, you can follow these steps :


STEP 1 : Create a key pair in AWS.

In AWS console, in EC2 service, you can create your key pair as shown in picture below:



Enter the key pair name, choose putty if you want to ppk,  enter the desired tag and create.
key will be saved in your system too.

STEP 2 : Create a security group

In EC2 service, you can add security group.


Click on Create security group to create a security group.
add security group name and description. in inbound rule type, for now you can allow all traffics.
then create.

STEP 3 : Launch an instance using above key pair and security group.


to launch an instance, go to EC2 service in your aws account.


Click on launch instance.



Select Amazon Linux or any other instance under free tier so that you won't be charged by aws.

In step 2 : choose instance type - t2 micro. As its only instance eligible under free tier.


Then configure instance details. In subnet choose ap-south-1a as your instance and EBS must be in same availability zone.


you can add tags also. I've added name for my instance in tag.


Now select the security group that was created in step 2.
Then review and launch.



It will ask for key pair for the instance. you can choose the existing key pair option and select the created keypair that we created in step 1. you can also create a new keypair if you want to.
then launch instance.
Done....

You can check your instance in EC2 service. Select instances.
From there you can check details about your instance like instance id, IP, instance status etc.

STEP 4 : Create an EBS volume of size 1 GB.

In EC2 instance, there is an option for Elastic Block Storage. Choose VOLUMES.


Select Create Volume.


Here you can choose the size of the volume. Select Availability zone ap-south-1a, same as we selected for instance.
you can add tags also. Then create volume.

DONE. Your volume is created.

STEP 5 : Attach the above created EBS volume to the instance created in previous step.

For this, select the EBS volume created, go to actions  and select ATTACH VOLUME.


Select the instance you want to attach your EBS. It will only show those instance that are in same availability zone as in EBS. That's why we selected ap-south-1a for both EBS volume and instance.



Select Attach.
DONE.

You can check this in instance storage details.

Hope you like this :)


Comments

Popular posts from this blog

Automation Using Python

Chat Server using UDP

NETWORK TOPOLOGY