What Is Amazon EC2
What Is Amazon EC2
Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in
the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your need to
invest in hardware up front, so you can develop and deploy applications faster. You can
use Amazon EC2 to launch as many or as few virtual servers as you need, configure
security and networking, and manage storage. Amazon EC2 enables you to scale up or
down to handle changes in requirements or spikes in popularity, reducing your need to
forecast traffic.
Amazon EC2 enables you to run any compatible Windows-based solution on our high-
performance, reliable, cost-effective, cloud computing platform.
If you haven't signed up for AWS yet, or if you need assistance launching your first
instance, complete the following tasks to get set up to use Amazon EC2:
When you sign up for Amazon Web Services (AWS), your AWS account is
automatically signed up for all services in AWS, including Amazon EC2. You are
charged only for the services that you use.
With Amazon EC2, you pay only for what you use. If you are a new AWS customer, you
can get started with Amazon EC2 for free. For more information, see AWS Free Tier.
If you have an AWS account already, skip to the next task. If you don't have an AWS
account, use the following procedure to create one.
Note
This might be unavailable in your browser if you previously signed into the AWS
Management Console. In that case, choose Sign in to a different account, and
then choose Create a new AWS account.
Part of the sign-up procedure involves receiving a phone call and entering a PIN
using the phone keypad.
Note your AWS account number, because you'll need it for the next task.
Services in AWS, such as Amazon EC2, require that you provide credentials when you
access them, so that the service can determine whether you have permission to access
its resources. The console requires your password. You can create access keys for
your AWS account to access the command line interface or API. However, we don't
recommend that you access AWS using the credentials for your AWS account; we
recommend that you use AWS Identity and Access Management (IAM) instead. Create
an IAM user, and then add the user to an IAM group with administrative permissions or
grant this user administrative permissions. You can then access AWS using a special
URL and the credentials for the IAM user.
If you signed up for AWS but have not created an IAM user for yourself, you can create
one using the IAM console. If you aren't familiar with using the console, see Working
with the AWS Management Console for an overview.
To create an IAM user for yourself and add the user to an Administrators group
1. Use your AWS account email address and password to sign in as the AWS
account root user to the IAM console at https://console.aws.amazon.com/iam/.
Note
5. Choose Next: Permissions.
7. Choose Create group.
10. In the policy list, select the check box for AdministratorAccess. Then
choose Create group.
11. Back in the list of groups, select the check box for your new group.
Choose Refresh if necessary to see the group in the list.
12. Choose Next: Review to see the list of group memberships to be added to the
new user. When you are ready to proceed, choose Create user.
You can use this same process to create more groups and users, and to give your
users access to your AWS account resources. To learn about using policies to restrict
users' permissions to specific AWS resources, go to Access Management and Example
Policies.
To sign in as this new IAM user, sign out of the AWS console, then use the following
URL, where your_aws_account_id is your AWS account number without the hyphens
(for example, if your AWS account number is 1234-5678-9012, your AWS account ID
is 123456789012):
https://your_aws_account_id.signin.aws.amazon.com/console/
Enter the IAM user name (not your email address) and password that you just created.
When you're signed in, the navigation bar displays
"your_user_name @ your_aws_account_id".
If you don't want the URL for your sign-in page to contain your AWS account ID, you
can create an account alias. From the IAM console, choose Dashboard in the
navigation pane. From the dashboard, choose Customize and enter an alias such as
your company name. To sign in after you create an account alias, use the following
URL:
https://your_account_alias.signin.aws.amazon.com/console/
To verify the sign-in link for IAM users for your account, open the IAM console and
check under IAM users sign-in link on the dashboard.
AWS uses public-key cryptography to secure the login information for your instance.
You specify the name of the key pair when you launch your instance, then provide the
private key to obtain the administrator password for your Windows instance so you can
log in using RDP.
If you haven't created a key pair already, you can create one using the Amazon EC2
console. Note that if you plan to launch instances in multiple regions, you'll need to
create a key pair in each region. For more information about regions, see Regions and
Availability Zones.
1. Sign in to AWS using the URL that you created in the previous section.
2. From the AWS dashboard, choose EC2 to open the Amazon EC2 console.
3. From the navigation bar, select a region for the key pair. You can select any
region that's available to you, regardless of your location. However, key pairs are
specific to a region; for example, if you plan to launch an instance in the US East
(Ohio) Region, you must create a key pair for the instance in the US East (Ohio)
Region.
4. In the navigation pane, under NETWORK & SECURITY, choose Key Pairs.
Tip
The navigation pane is on the left side of the console. If you do not see the pane,
it might be minimized; choose the arrow to expand the pane. You may have to
scroll down to see the Key Pairs link.
6. Enter a name for the new key pair in the Key pair name field of the Create Key
Pairdialog box, and then choose Create. Use a name that is easy for you to
remember, such as your IAM user name, followed by -key-pair, plus the region
name. For example, me-key-pair-useast2.
7. The private key file is automatically downloaded by your browser. The base file
name is the name you specified as the name of your key pair, and the file name
extension is .pem. Save the private key file in a safe place.
Important
This is the only chance for you to save the private key file. You'll need to provide
the name of your key pair when you launch an instance and the corresponding
private key each time you connect to the instance.
Amazon VPC enables you to launch AWS resources into a virtual network that you've
defined. If you have a default VPC, you can skip this section and move to the next
task, Create a Security Group. To determine whether you have a default VPC,
see Supported Platforms in the Amazon EC2 Console. Otherwise, you can create a
nondefault VPC in your account using the steps below.
Important
If your account supports EC2-Classic in a region, then you do not have a default VPC in
that region. T2 instances must be launched into a VPC.
2. From the navigation bar, select a region for the VPC. VPCs are specific to a
region, so you should select the same region in which you created your key pair.
For more information about Amazon VPC, see What is Amazon VPC? in the Amazon
VPC User Guide.
Security groups act as a firewall for associated instances, controlling both inbound and
outbound traffic at the instance level. You must add rules to a security group that enable
you to connect to your instance from your IP address using RDP. You can also add
rules that allow inbound and outbound HTTP and HTTPS access from anywhere.
Note that if you plan to launch instances in multiple regions, you'll need to create a
security group in each region. For more information about regions, see Regions and
Availability Zones.
Prerequisites
You'll need the public IPv4 address of your local computer. The security group editor in
the Amazon EC2 console can automatically detect the public IPv4 address for you.
Alternatively, you can use the search phrase "what is my IP address" in an Internet
browser, or use the following service: Check IP. If you are connecting through an
Internet service provider (ISP) or from behind a firewall without a static IP address, you
need to find out the range of IP addresses used by client computers.
Tip
Alternatively, you can use the Amazon VPC console to create a security group.
However, the instructions in this procedure don't match the Amazon VPC
console. Therefore, if you switched to the Amazon VPC console in the previous
section, either switch back to the Amazon EC2 console and use these
instructions, or use the instructions in Set Up a Security Group for Your VPC in
the Amazon VPC Getting Started Guide.
2. From the navigation bar, select a region for the security group. Security groups
are specific to a region, so you should select the same region in which you
created your key pair.
3. Choose Security Groups in the navigation pane.
5. Enter a name for the new security group and a description. Use a name that is
easy for you to remember, such as your IAM user name, followed by _SG_, plus
the region name. For example, me_SG_uswest2.
6. In the VPC list, select your VPC. If you have a default VPC, it's the one that is
marked with an asterisk (*).
Note
If your account supports EC2-Classic, select the VPC that you created in the
previous task.
Warning