JamesBranam's Blog
AWS Experience Part 2: Accessing the Cloud
Hi all,
Today I'll be write more about my experiences with Amazon Web Services. Before I continue, I'd like to provide some background information.
I signed up for Amazon Web Services. I used the Fedora LAMP AMI to create a server instance. The main reason for choosing this AMI was its inclusion of MySQL and Apache, a nice little package indeed. I ran into a few problems at first. Because I am based in Europe, I am allowed to use only the EU-West region, and the default in the US-East region. The drop down list is rather small, and i took a couple of unsuccessful instances to figure out that this was the problem. When I say "unsuccessful instances," I mean that the nothing appeared in the browser when I copied the public DNS to the browser's address bar. I attached an EBS volume to the server instance and it was OK.
Now for more on the command line.
I spent a lot of time messing around with the commands in the EC2 toolkit, which is provided by AWS. I was able to change the region by entering
export EC2_URL=http://eu-west-1.ec2.amazonaws.comAs a matter of fact, I had to do this to get the URL to work.
Other things worth noting:
To see which instances are running, do a
ec2-describe-instances
To run an instance:
ec2-run-instances ami-amiid -k kepairnameThen came the issue of accessing the cloud. AWS documentation is very lacking, so after a bit of googling, this is how I did it:
ssh -i ~/.ssh/my-key.pem root@host-nameThe host name is the same as the public DNS.
I did it. I was in the cloud. Then I was able to create a MySQL database.
I'll write more tomorrow.
Cheers!
--James
Posted at 09:52AM May 13, 2009 by branajam in NetBeans |