DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Google Cloud KMS vs. AWS KMS: Java Encryption Guide
  • Multi-Agent Orchestration on AWS With AgentCore Runtime and A2A
  • AWS 7R Migration Strategies: A Decision Framework for Engineering Teams
  • Understand the Sidecar Pattern by Deploying n8n to AWS Fargate

Trending

  • Applying Microservices Lessons to Multi-Agent AI Systems
  • Avoiding AI Debt as a Team
  • Every Generation Fears the Machine. Here Is How the AI Job Panic Usually Ends
  • How to Build a Scalable SaaS Product Architecture

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. How to Create EC2 Instance in AWS — Tutorial for Beginners

How to Create EC2 Instance in AWS — Tutorial for Beginners

This tutorial is for beginners which include how to create an account in AWS EC2 as well as how to create a new instance of ubuntu.

By 
Shital Kat
·
Oct. 26, 20 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
9.5K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

EC2 stands for, Elastic Compute Cloud.  It is a part of Amazon’s cloud-computing platform, Which allows users to rent virtual computers on which they can run their own computer applications. Creating and using the EC2 instance is very simple. Following are the steps:



Step 1: Create an Account in EC2

1.1) Go to and the following screen will get a display.  

1.2) Click on "Create an AWS Account"

amazon EC2

1.3) Start filling the account creation form. 

You will require your email Id, Phone Number, and Credit/Debit card details. AWS is free for 12 months, however, it is mandatory to fill in payment details to create an account. 

aws account

1.4) After filling in all the required information, your account will get created. Within 24 hours all the services (like EC2) will get activated on your account. (but mostly it take 5-10 minutes)

Step 2: Log in to EC2 Instance

2.1) Go to EC2's homepage, you will redirect to the login page. https://console.aws.amazon.com/ec2/v2/home

2.2) Select the Root User option, enter an email address, click on Next to enter a password.
aws sign in

Step 3: EC2 Home Page

3.1) After signing in you will redirect to the EC2 homepage. 

3.2) Else you can directly go to the Home Page Link - https://console.aws.amazon.com/ec2/v2/home

3.3) Else from any AWS page, click on service, and find EC2 option.

aws services

Step 4: Create an Instance

4.1) Click on Instance Tab
new EC2

4.2) Click on "Launch Instance > Launch Instances".
Launch Instance

4.3) Launch Instance Step 1 — "Choose an AMI "

Now choose the latest Ubuntu server here. Currently, the latest is 20.04

amazon machine image

4.4) Launch Instance Step 2 — "Choose Instance Type"

Select the one with Free tier eligible.choose an instance type

4.5) Launch Instance Step 3 — "Configure Instance"

Skip this step as of now. Also, skip the step "4. Add-Storage" and "5. Add Tags"

configure instance details

4.6) Launch Instance Step 6 — "Configure Security Group"

Add the ports which you wanted to Open to the outside world. I have added Port 8000 since I want to deploy my website to this port.

Also, I have added HTTP and HTTPS port.

0.0.0.0 means you can access these ports from anywhere. If you want to access your ports from a known IP address then mention those addresses here.

Click on the Review and Launch Button.
configure security group

4.7) Launch Instance Step 7 — "Review"

Review the information and click on the "Launch" button. You will get an option to create a new or select an existing Keypair. 

Download and save this file in a safe place. You will need this file while connecting with the instance via putty, WinSCP, Filezilla.
key pair

4.8) Click on the "Launch Instance" button. This is the final step. And your instance will be created.

Go to the instance Tab, and find your instance. Review the information and Rename the instance with any alias.

instances

Step 5: Connect to the Instance

5.1) Select the instance and Click on Actions > Connect
instances

5.2) You will redirect to a page. Your default username is "ubuntu". Click on connect.
connect to instances

5.3) Hurray! You will get connected to your instance. Enjoy!
ubuntu

AWS

Opinions expressed by DZone contributors are their own.

Related

  • Google Cloud KMS vs. AWS KMS: Java Encryption Guide
  • Multi-Agent Orchestration on AWS With AgentCore Runtime and A2A
  • AWS 7R Migration Strategies: A Decision Framework for Engineering Teams
  • Understand the Sidecar Pattern by Deploying n8n to AWS Fargate

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook