AWS VM Creation

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Here are detailed steps to create a virtual machine (EC2 instance) in AWS using a free

account:

Step 1: Sign in to AWS Console

1. Open your web browser and go to the AWS Management Console.


2. Click on the "Sign in to the Console" button.
3. Sign in with your AWS account credentials.

Step 2: Navigate to EC2 Dashboard

1. After signing in, you'll be on the AWS Management Console.


2. In the top left corner, click on the "Services" dropdown.
3. Under "Compute," click on "EC2."

Step 3: Launch an Instance

1. In the EC2 Dashboard, click the "Launch Instance" button.

Step 4: Choose an Amazon Machine Image (AMI)

1. In the "Choose an Amazon Machine Image (AMI)" step, you can select an AMI from
the list. You can use the default "Amazon Linux 2 AMI" for this example.

Step 5: Choose an Instance Type

1. In the "Choose an Instance Type" step, select an instance type. The "t2.micro"
instance type is eligible for the AWS Free Tier.

Step 6: Configure Instance Details

1. In the "Configure Instance Details" step, you can keep the default settings for now. If
you have specific requirements, you can adjust settings like the number of instances,
network settings, etc.

Step 7: Add Storage

1. In the "Add Storage" step, specify the amount of storage you need. The default
settings are typically sufficient for basic usage.

Step 8: Add Tags (Optional)


1. In the "Add Tags" step, you can add tags to your instance for better organization.
Tags are optional but can be useful for managing resources.

Step 9: Configure Security Group

1. In the "Configure Security Group" step, create a new security group or use an existing
one. Security groups act as firewalls, and you need to configure rules for inbound
and outbound traffic. For simplicity, you can create a new security group with SSH
(port 22) open for inbound traffic.

Step 10: Review Instance Launch

1. Review all your configuration settings in the "Review Instance Launch" step. Ensure
everything is set up as you want it.

Step 11: Launch Instance

1. Click the "Launch" button.


2. You'll be prompted to select or create a key pair. Choose "Create a new key pair,"
give it a name, and click "Download Key Pair." Keep the private key file (.pem) in a
secure location.

Step 12: Access Your Instance

1. Once the instance is running, go back to the EC2 Dashboard.


2. In the Instances section, select your instance.
3. Click the "Connect" button to get instructions on how to connect to your instance.
Use the key pair you downloaded to authenticate.

LOAD BALANCING in AWS


load balancing in AWS involves using the Elastic Load Balancer (ELB) service. Below
are detailed steps to configure load balancing in AWS using a free account:

Step 1: Sign in to AWS Console

1. Open your web browser and go to the AWS Management Console.


2. Sign in with your AWS account credentials.

Step 2: Navigate to EC2 Dashboard

1. After signing in, click on the "Services" dropdown in the top left corner.
2. Under "Networking & Content Delivery," click on "EC2."

Step 3: Create Instances (if not already done)

1. Launch EC2 instances that you want to load balance. Follow the steps mentioned
earlier to create EC2 instances.

Step 4: Create a Security Group for Instances

1. In the EC2 Dashboard, under "Network & Security," click on "Security Groups."
2. Create a security group that allows traffic between the instances and the load
balancer. For simplicity, you can allow all traffic within the security group.

Step 5: Create an Elastic Load Balancer (ELB)

1. In the EC2 Dashboard, under "Load Balancing," click on "Load Balancers."


2. Click the "Create Load Balancer" button.
3. Choose "Application Load Balancer" as the load balancer type.

Step 6: Configure Load Balancer

1. In the "Configure Load Balancer" section:


 Give your load balancer a name.
 Create a new listener (e.g., HTTP on port 80).
 Assign the security group you created earlier to the load balancer.

Step 7: Configure Security Settings

1. In the "Configure Security Settings" section, you can leave the default settings for
now (SSL/TLS settings are optional for HTTPS).

Step 8: Configure Routing

1. In the "Configure Routing" section:


 Create a new target group.
 Define a target group name.
 Choose the protocol (e.g., HTTP) and port (e.g., 80) for the instances.
 Add the instances you want to include in the target group.

Step 9: Register Targets

1. In the target group configuration, click on the "Targets" tab.


2. Click on the "Edit" button and add the EC2 instances you want to include in the
target group.

Step 10: Health Checks

1. Configure health checks in the "Health checks" section. Adjust settings as needed
based on your application.

Step 11: Register Targets

1. In the target group configuration, click on the "Targets" tab.


2. Click on the "Edit" button and add the EC2 instances you want to include in the
target group.

Step 12: Review and Create

1. Review your configuration settings and click the "Create" button.

Step 13: Access Load Balancer DNS Name

1. Once the load balancer is created, go to the "Load Balancers" section in the EC2
Dashboard.
2. Select your load balancer and find the "DNS name" in the description. This is the
address you'll use to access your application.

You might also like