Wednesday, May 4, 2016

Setting up to Host a Web app on AWS

Once the account is setup, first task is to create an IAM user. If one has signed up for AWS but not yet created the IAM account, then that can be done using the IAM console. 

The basic concept is to create Group and add users to the Group. 

1. Sign in to the IAM console which is at https://console.aws.amazon.com/iam/
2. Now Create Group from the options Groups, Create New Group, From the list of policies, assign a policy such as AdministratorAccess 
3. Now create Users and add the users to Group. Users, Create New Users, also check generate Access key for each user option, Create. 
4. Now choose Groups and add users to group. Choose Security Credentials for each user and under sign in credentials, choose manage password. Select assign custom passoword and apply. 

now logout and login with the created user. To do this, the sign in URL will be of the form https://your_aws_account_id.signin.aws.amazon.com/console/

The next step is to create a Key pair. 
AWS uses the public key cryptography to secure login information to the instance. A linux has no password, instead use key value pair. One need to specify the name of the key pair when launching the instance and then provide the private key when login using SSH. 

Using AWS console, one can create key pair. 

Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
From the navigation bar, in the region selector, click US West (Oregon).
In the navigation pane, click Key Pairs.
Click Create Key Pair.
Enter a name for the new key pair in the Key pair name field of the Create Key Pair dialog box, and then click Create. Choose a name that is easy for you to remember.

Below was the name given for the key pair in the console. The file was downloaded with the below name assistedaccesspair.pem 
Now we needed to give change mode of this file, which can be done using the command chmod 400 assistedaccesspair.pem 

Now we need to configure the Virtual Private Cloud. 

Amazon VPC allows the AWS resources to be deployed into the VPC if desired. To test if we have a VPC, below steps to be followed. 

Normally, the setup will have a default VPC, to check if we have default VPC, below steps can be followed. 

Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.
In the navigation bar, verify that US West (Oregon) is the selected region.
In the navigation pane, click Your VPCs.
One of the following is true:
The list is empty, so you do not have a default VPC.
The list has a default VPC (a VPC with a CIDR block of 172.31.0.0/16).
The list has one or more non-default VPCs (a VPC with a CIDR block that is not 172.31.0.0/16).


Did not create another VPC as was okay with the default VPC.

references:

No comments:

Post a Comment