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
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • AWS Managed Database Observability: Monitoring DynamoDB, ElastiCache, and Redshift Beyond CloudWatch
  • Architecting Petabyte-Scale Hyperspectral Pipelines on AWS
  • Why SAP S/4HANA Landscape Design Impacts Cloud TCO More Than Compute Costs
  • We Went Multi-Cloud and Almost Drowned: Lessons From Running Across AWS, GCP, and Azure

Trending

  • Building a Skill-Based Agentic Reviewer with Claude Code: A Practical Guide Using Skills.MD, MCP Servers, Tools, and Tasks
  • One Query, Four GPUs: Tracing a Distributed Training Stall Across Nodes
  • Context Is the New Schema
  • Why SAP S/4HANA Landscape Design Impacts Cloud TCO More Than Compute Costs
  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 user avatar
Shital Kat
·
Oct. 26, 20 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
9.2K Views

Join the DZone community and get the full member experience.

Join For Free

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

  • AWS Managed Database Observability: Monitoring DynamoDB, ElastiCache, and Redshift Beyond CloudWatch
  • Architecting Petabyte-Scale Hyperspectral Pipelines on AWS
  • Why SAP S/4HANA Landscape Design Impacts Cloud TCO More Than Compute Costs
  • We Went Multi-Cloud and Almost Drowned: Lessons From Running Across AWS, GCP, and Azure

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • 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