Getting Started with Amazon EC2
Why Amazon EC2?
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. Amazon EC2 offers many options that help you build and run virtually any application. With these possibilities, getting started with EC2 is quick and easy to do. This page provides you with the resources to get you started with EC2 instances.
Steps for Amazon EC2
Log in to your AWS account
Log in to the AWS Management Console and set up your root account. If you don’t already have an account, you will be prompted to create one.
With the AWS Free Tier, you can get 750 hours/month of select EC2 instances for free.
Launch your instance
Identify which instance type is best for your workload. For your first instance, we recommend a low-cost, general-purpose instance type—t2.micro—and Amazon Machine Image (AMI)—Amazon Linux 2 AMI—which are both free-tier eligible.
Open the Amazon EC2 dashboard and choose “Launch Instance” to create your virtual machine.
Configure your instance
Here are some guidelines when setting up your first instance:
- Security group: Create your own firewall rules or select the default VPC security group.
- Storage: EC2 offers both magnetic disk and SSD storage. We recommend starting with Amazon EBS gp2 volumes.
- Choose "Launch Instances" to complete the setup.
* Note: We will use the key pair file (.pem) later.
Connect to your instance
After launching your instance, you can connect to it and use it the way you'd use a computer sitting in front of you. There are several ways to connect to the console depending on the operating system. We recommend using EC2 Instance Connect, an easy-to-use browser-based client.
- Select the EC2 instance that you created and choose "Connect.“
- Select “EC2 Instance Connect.”
- Choose “Connect.” A window opens, and you are connected to your instance.
Terminate your instance
Amazon EC2 is free to start (learn more), but it is important that you terminate your instances to prevent additional charges. The EC2 instance and the data associated will be deleted.
Select the EC2 instance, choose "Actions," select "Instance State," and then select "Terminate."
Tutorials
Get hands-on experience with these 10-minute tutorials and technical documents.
Amazon Lightsail
Lightsail is an easy-to-use cloud platform ideal for simpler workloads, quick deployments, and getting started on AWS. If you’re new to the cloud, Lightsail provides you with everything that you need to build an application or website, plus a cost-effective monthly plan. Watch these hands-on Lightsail tutorials to quickly bring your projects to life and ramp up to AWS infrastructure. To decide if Lightsail or EC2 is for you, take a look at this side-by-side comparison of the cloud solutions.