Showing posts with label How to connect a domain name to an EC2 instance. Show all posts
Showing posts with label How to connect a domain name to an EC2 instance. Show all posts

Sunday, January 19, 2014

{Workaround}how to get access to the server, when Amazon EC2 private key lost

1. Login to your AWS Management Console.

2. Select  EC2 from the Services | set your Region in the drop-down list | Click the Instances link in left side bar.

3. Right click on the instance name. The Instance Management context menu will appear. Select Create Image.

1

4. Enter the name and description. This is for your use, not Amazon’s.Click the Create Image button. A confirmation message appears. Behind the scene, EBS volume is copied to a snapshot.

2

5. Find your new AMI. AMI link is in the left navigation bar. Right Click on it and select the Launch (Follow the wizard).

3

6. In the last step, select the “Create a new key pair” instead of using the existing key pair,provide the name to your key pair and then click Download Key Pair Button.

4

7. Convert the downloaded key (for Putty use)  by using the following Tutorial.

8. Connect to the instance with the converted key and verify your data/setting.

5

Hope this will help you!

Please Remember me in your prayers!

Monday, June 17, 2013

How to connect a domain name to an EC2 instance

Launch an EC2 instance and set up the web server (In my case, I setup the Ubuntu12.04 instance and install the Apache web server on it):



At this point my website is up and running but with the long amazon url(i.e. ec2-53-245-237-89.compute-1.amazonaws.com):



Each EC2 server is assigned a dynamic IP. If a server has to be restarted, it is given a new dynamic IP and we have to remember this new long string each time to access our web server.

To overcome this problem, we can create free domain with www.dot.tk and map it with our web server. For this, allocate an Elastic IP and associate it with the instance.



Then right click on the Elastic IP and select the “Associate“, and choose the instance that we created above:





Now we have an elastic IP which is a number that looks like 175.141.242.55. Copy this number because we will use it in next step:



Login to the dot.tk site and navigate to this panel:



Add the elastic IP against the “A Record” entries:



Finally, we need to wait sometime (few minutes to an hour) for it all to propagate through.After that our domain should now start resolving to the web server we have on EC2:



Hope this will help you!