Wednesday, February 3, 2016

Amazon EC2 - Creating and setting up an instance on AWS

Setup AWS account

Set up AWS account at - https://aws.amazon.com/


Launch EC2 instance

On AWS console, 
  • Go to AWS services dropdown and select EC2 instance
  • Create and launch EC2 instance



Select Container and configure


  • I selected Amazon Linux
  • Using the configuration available as Free Tier.

Once setup & review is complete you are now provision your instance. And it will be ready to launch



Login to the instance


You can use Mac terminal or Putty on Windows to connect AWS instance.

Store pem file downloaded when creating instance. Make sure that the permissions are restrictive. Hence use 
$ chmod 400 aws.pem

Now use ssh command to connect to instance

ssh -i /path/my-key-pair.pem ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com

For more details on how to ssh, read here - http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html

2 comments: