What is EC2?
Amazon Elastic Compute Cloud or AWS EC2 provides on-demand scalable computing capacity in the cloud space. The EC2 reduces the hardware effort and deploys the application faster. so the ec2 is a virtual server; you can deploy as many servers as you want. The best part of using ec2 is it automatically manages the capacity like when the traffic is low it reduces the capacity of the servers.
The features that EC2 provides.
The Amazon ec2 provides some high-level features.
Instances - It is nothing but just the virtual server.
AMI(Amazon machine images) - These are the preconfigured templates that contain OS and additional software.
Types in Instances - You can set the various configurations in the instances like CPU, memory type, storage, networking capacity, and graphics.
Wide range - It provides multiple regions support available in different time zones and wavelength zones.
Elastic IP addresses - It provides static IPv4 addresses for dynamic cloud computing.
Here is a simple architecture of how the ec2 works
Before moving forward let's talk about one imp thing.
What is IAM?
IAM - It stands for identity and access management which basically acts as an authenticator
where you can check and allow who can use its resources and in what way.
It provides a multi-factor authenticator.
Now let's see how to create an EC2 instance
To launch an instance you have to follow some steps :
This is what the AWS console looks like.
The first step is to log in to the AWS console and navigate to the service.
Select the EC2 service and click on launch instance.
Then you have to choose a server (e.g.:Ubuntu,macOS, Windows, RedHat) as the AMI(Amazon Machine image).
To create the instance you have to create a public and private key which is used to securely connect to the EC2 instance via SSH.
Then you need to use the SSH command to connect to your EC2 instance using the IP address.
Then you can the simple git command in your terminal to put your application on the AWS server.