Launch your instance - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Launch your instance

An instance is a virtual server in the Amazon Cloud. You launch an instance from an Amazon Machine Image (AMI). The AMI provides the operating system, application server, and applications for your instance.

When you sign up for Amazon, you can get started with Amazon EC2 for free using the Amazon Free Tier. You can use the free tier to launch and use a t2.micro instance for free for 12 months (in Regions where t2.micro is unavailable, you can use a t3.micro instance under the free tier). If you launch an instance that is not within the free tier, you incur the standard Amazon EC2 usage fees for the instance. For more information, see Amazon EC2 pricing.

You can launch an instance using the following methods.

Method Documentation

[Amazon EC2 console] Use the launch instance wizard to specify the launch parameters.

Launch an instance using the old launch instance wizard

[Amazon EC2 console] Create a launch template and launch the instance from the launch template.

Launch an instance from a launch template

[Amazon EC2 console] Use an existing instance as the base.

Launch an instance using parameters from an existing instance

[Amazon EC2 console] Use an AMI that you purchased from the Amazon Web Services Marketplace.

Launch an Amazon Web Services Marketplace instance

[Amazon CLI] Use an AMI that you select.

Using Amazon EC2 through the Amazon CLI

[Amazon Tools for Windows PowerShell] Use an AMI that you select.

Amazon EC2 from the Amazon Tools for Windows PowerShell

[Amazon CLI] Use EC2 Fleet to provision capacity across different EC2 instance types and Availability Zones, and across On-Demand Instance, Reserved Instance, and Spot Instance purchase models.

EC2 Fleet

[Amazon CloudFormation] Use a Amazon CloudFormation template to specify an instance.

AWS::EC2::Instance in the Amazon CloudFormation User Guide

[Amazon SDK] Use a language-specific Amazon SDK to launch an instance.

Amazon SDK for .NET

Amazon SDK for C++

Amazon SDK for Go

Amazon SDK for Java

Amazon SDK for JavaScript

Amazon SDK for PHP V3

Amazon SDK for Python

Amazon SDK for Ruby V3


To launch an EC2 instance into an IPv6-only subnet, you must use Instances built on the Amazon Nitro System.


When launching an IPv6-only instance, it is possible that DHCPv6 may not immediately provide the instance with the IPv6 DNS name server. During this initial delay, the instance may not be able to resolve public domains.

For instances running on Amazon Linux 2, if you want to immediately update the /etc/resolv.conf file with the IPv6 DNS name server, run the following cloud-init directive at launch:

#cloud-config bootcmd: - /usr/bin/sed -i -E 's,^nameserver\s+[\.[:digit:]]+$,nameserver fd00:ec2::253,' /etc/resolv.conf

Another option is to change the configuration file and re-image your AMI so that the file has the IPv6 DNS name server address immediately on booting.

When you launch your instance, you can launch your instance in a subnet that is associated with one of the following resources:

  • An Availability Zone - This option is the default.

  • A Local Zone - To launch an instance in a Local Zone, you must opt in to the Local Zone, and then create a subnet in the zone. For more information, see Local Zones

  • A Wavelength Zone - To launch an instance in a Wavelength Zone, you must opt in to the Wavelength Zone, and then create a subnet in the zone. For information about how to launch an instance in a Wavelength Zone, see Get started with Amazon Wavelength in the Amazon Wavelength Developer Guide.

  • An Outpost - To launch an instance in an Outpost, you must create an Outpost. For information about how to create an Outpost, see Get Started with Amazon Outposts in the Amazon Outposts User Guide.

After you launch your instance, you can connect to it and use it. To begin, the instance state is pending. When the instance state is running, the instance has started booting. There might be a short time before you can connect to the instance. Note that bare metal instance types might take longer to launch.

The instance receives a public DNS name that you can use to contact the instance from the internet. The instance also receives a private DNS name that other instances within the same VPC can use to contact the instance. For more information about connecting to your instance, see Connect to your Linux instance.

When you are finished with an instance, be sure to terminate it. For more information, see Terminate Amazon EC2 instances.