"DevOps Odyssey: Journey to Day 2" - "AWS EC2 Instance Setup"

This article will guide you to get started with AWS EC2, and launch your first EC2 instance. Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, scalable computing capacity in the cloud. After this step-by-step tutorial, you will Launch your EC2 instance today.
What is AWS?
AWS, or Amazon Web Services, is a cloud computing platform provided by Amazon. It offers a wide range of cloud services and solutions that enable businesses and individuals to build, deploy, and manage various applications and IT resources without the need for physical infrastructure.
Why AWS?

Launch the first EC2 instance
First of all, Go to the AWS management console and login with root or IAM user. At At right corner look for the region where we are planning to create the new instance.

Then select EC2 by searching it on the global search box.

In the AWS Management Console on the Services menu, click EC2.
Click
Launch instances> Launch instances.
Give names and tags
First, give the name and tags to your instance. Tags enable you to categorize your AWS resources in different ways, for example, by purpose, owner, or environment.
Click Add Tag then configure:
Key: Name
Value: Web Server

Choose Application and OS Images
Then choose instance type as 2nd step.
An Amazon Machine Image (AMI) provides the information required to launch an instance, which is a virtual server in the cloud. AMI includes
A template for the root volume for the instance (for example, an operating system or an application server with applications)
Launch permissions that control which AWS accounts can use the AMI to launch instances
A block device mapping that specifies the volumes to attach to the instance when it is launched
We can also create our own AMI but the Quick Start list contains the most commonly-used AMIs.
Click select next Ubuntu.

Choose an Instance Type
Amazon EC2 provides a wide selection of instance types optimized to fit different use cases. Instance types comprise varying combinations of CPU, memory, storage, and networking capacity and give you the flexibility to choose the appropriate mix of resources for your applications.
Under Instance type, from the Instance type list, you can select the hardware configuration for your instance.
t2.micro instance has 1 vCPU and 1 GiB Memory.

Create Key Value Pair
- We use key pair to securely connect to our instance.

- Create a new key-pair if don't have any, then give it a name and select RSA. Finally, download the PEM or PPK file.
⚠️ Warning
Do not choose to Proceed without a key pair (Not recommended). If you launch your instance without a key pair, then you can't connect to it.
Configure network settings
- Network settings, choose
Edit. For the Security group name, you'll see that the wizard created and selected a security group for you.

- We can use this security group or alternatively you can select the security group that you created.
Configure Storage
Amazon EC2 stores data on a network-attached virtual disk called Elastic Block Store.

We will launch the Amazon EC2 instance using a default 8 GiB disk volume. This will be your root volume (also known as a 'boot' volume).
Summary
Review the summary and click Launch Instance and it's ready.

Check the instance launch

Instances
In the Instances tab can view the newly created instance as "running" state but the checkbox is unchecked and the connect tab is greyed out.

Inorder to enable the Connect tab, click the checkbox on the Instance name created, "Linux for Devops" to enable it.

Connect to Instance
When we hit the connect button, the Ec2 instance connect opens.
Verify the user name and choose Connect to open a terminal window.

When you hit connect it will open Ubuntu terminal in your browser like this.

Conclusion
AWS EC2 instance has been created successfully.


