Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. EC2 offers many options that enable you to build and run virtually any application. With these possibilities, getting started with EC2 is quick and easy to do. This page provides you the resources to get you started with EC2 instances.
Familiarize Yourself with EC2 Instances
Log Into Your AWS Account
Log into 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 EBS gp2 volumes to start out with.
- Choose "Launch Instances" to complete the set up.
* 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 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 "Terminate".
Get hands-on with these 10 minute tutorials and technical documents.
Installing a LAMP Web Server on Amazon Linux
Learn how to install the Apache web server with PHP and MySQL support on your Amazon Linux instance (sometimes called a LAMP web server or LAMP stack) with this step-by-step tutorial. You can use this server to host a static website or deploy a dynamic PHP application that reads and writes information to a database.
Hosting a WordPress Blog with Amazon Linux
Learn how to install, configure, and secure a WordPress blog on your Amazon Linux instance with this step-by-step tutorial. Or get started in one click with a pre-configured Bitnami Wordpress image by Bitnami on the AWS Marketplace.
Explore more 10 minute tutorials
Learn how to remotely run commands on an EC2 Instance, train a deep learning model, and more. These step-by-step tutorials teach you different ways to innovate with EC2.
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 everything 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.
Enhance your Productivity with EC2
Using EC2 is just the beginning to making cloud computing easier for you. Tailor your EC2 experience with services that will extend your productivity through high performing block storage, tools that allow your application to scale based on demand, and fault-tolerant workloads for up to 90% off.
Amazon Elastic Block Store
EBS is an easy to use, high performance block storage service designed for use with EC2 for both throughput and transaction intensive workloads at any scale.
Amazon EC2 Auto Scaling
EC2 Auto Scaling helps you maintain application availability and allows you to automatically add or remove EC2 instances according to conditions you define.
Amazon EC2 Spot
EC2 Spot Instances offer spare compute capacity in the AWS cloud at steep discounts compared to On-Demand Instances.
User Guides and Resources
The flexibility of AWS allows you to design your application architectures the way you like, whether you want to host a website or analyze your data. Here are a few resources for you to get started quickly:
- Learn more about the AWS Free Tier
- Getting Started on AWS with SDKs
- Getting Started with AWS Webinar
- Launch a Windows Instance
- Launch a Linux Instance
- Migration to Amazon EC2
- AWS Quick Start Reference Deployments: AWS Quick Start reference deployments help you rapidly deploy fully functional enterprise software on the AWS cloud, following AWS best practices for security and availability.
- AWS Reference Architecture Center: Common reference architectures and best practices.
- AWS Partner Network: The AWS Partner Network (APN) is made up of a strong and growing community of companies that offer a wide range of products and services on the AWS platform.
Did you find what you were looking for? Please submit your feedback for this page.
There are many resources to help you learn how to build with Amazon EC2.
Instantly get access to the AWS Free Tier.
Get started building with Amazon EC2 in the AWS Console.