Setting Up with Amazon EC2

If you’ve already signed up for Amazon Web Services (AWS), you can start using Amazon EC2 immediately. You can open the Amazon EC2 console, click Launch Instance, and follow the steps in the launch wizard to launch your first instance.

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:

 

1. Sign Up for AWS

2. Create an IAM User

3. Create a Key Pair

4. Create a Virtual Private Cloud (VPC)

5. Create a Security Group

 

Sign Up for AWS

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.

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.

To create an 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.

 

Create an IAM User

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 and 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. 

 

To create a group for administrators

To create an IAM user for yourself, add the user to the administrators group, and create a password for the user

 

To sign in as this new IAM user, sign out of the AWS console, then use the following URL, whereyour_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, click Dashboard in the navigation pane. From the dashboard, click 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.

 

 

Create a Key Pair

AWS uses public-key cryptography to secure the login information for your instance. A Linux instance has no password; you use a key pair to log in to your instance securely. You specify the name of the key pair when you launch your instance, then provide the private key when you log in using SSH.

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.

To create a key pair

 

To connect to your instance using your key pair

To connect to your Linux instance from a computer running Mac or Linux, you’ll specify the .pem file to your SSH client with the -i option and the path to your private key. To connect to your Linux instance from a computer running Windows, you can use either MindTerm or PuTTY. If you plan to use PuTTY, you’ll need to install it and use the following procedure to convert the .pem file to a .ppk file.

 

(Optional) To prepare to connect to a Linux instance from Windows using PuTTY

Create a Virtual Private Cloud (VPC)

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. 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.

 

To create a nondefault VPC

 

Create a Security Group

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 SSH. 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.

Prerequisites

You’ll need the public IP address of your local computer, which you can get using a service. To locate another service that provides your IP address, use the search phrase “what is my IP address.” 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.

 

To create a security group with least privilege

 

 

Source By: <docs.aws.amazon.com>

To Become AWS Certified please Check out the Link;

 

Exit mobile version