- Signing up is very easy, just go to aws.amazon.com. I signed in with my personal Amazon account, and created an AWS account.
- I will probably be using EC2, and RDS - An EC2 instance (VM) to host server-side web applications (Java) and RDS for the database. I will probably use EBS as well, so I can have some durable filesystem storage for the EC2 instance.
- I started with the "Basic" free tier. You need to enter your CC information though, in case you go over the limitations of the free tier. Since I'm mostly just going to be creating VMs for learning, mostly likely I won't be keeping too many instances running.
The free tier
Currently the AWS free usage tier gives you the following for one year:- EC2 (virtual machines) - 750 hours/month on a 't2.micro' instance that is Amazon Linux, RHEL, or SLES
- EBS (file system storage) - 30GB, 2 million I/O ops, 1G of snapshot storage
- RDS (Relational db) - 750 hours/month on a 'micro' instance, 20G of storage, 20G of backup, 10M I/O ops
What's a t2.micro instance?
T2 is Amazons instance type that is optimized for 'burstable performance'. A t2.micro instance has:- 1 CPU and 1G of RAM.
- Only EBS for durable storage (i.e. anything not on EBS will be lost when the machine is shut down).
You probably shouldn't start and stop instances too often. The billing granularity is hourly, so if you start an instance, you might as well keep it running for an hour. If you stop an instance, you might as well keep it stopped for at least an hour.
Also, if you start and stop an instance three times in an hour, Amazon will bill you for three hours. So, you need to think about whether you really need to shut down or not. This makes sense because Amazon probably doesn't want everybody to be constantly starting and stopping machines all the time.
See this page for more.
It is also a good idea to enable billing alerts.
Launching an Instance
Go to the AWS console, click on EC2. Click 'Launch Instance'.- Chose a machine image - Make sure you check the 'Free tier only' box if you want to stay in the free tier. I chose Amazon Linux.
- Choose an instance type - t2.micro is the only free tier instance type, so I chose that.
- Configure instance - leave the defaults
- Add storage - leave the defaults
- Tag instance - leave the defaults
- Configure Security Group - Since I'm doing this for the first time, I created a new security group called "Administrators". I chose 'My IP' for SSH access. Should be good enough for today, and I suppose that I can change that access rule via the AWS console later to add new IP addresses. Click 'Review and launch'
Boot from General Purpose (SSD) prompt: keep the default choice. Click Next. - Review - This should all look okay, so just go ahead and launch it.
Create a new key pair: Select 'Create a new key pair' and enter the key pair name. You'll need to download the private key (.pem file) and store it somewhere. I put my in a Google Drive folder so I could get to it later.
Connect to the new Linux instance with SSH
See this page for Windows/Putty and this page for Linux/OSX ssh.
You'll need the private key, the instance id, and the public DNS address of the instance.
Amazon Linux
This linux distro is in the Red Hat family - it uses yum and rpm. Many packages are available to install. I saw that mine had a Java 7 JRE installed, and that the yum repo had Tomcat 7 available, as well as MySQL and other things.
What's next?
- Set up Tomcat, enable HTTPS access from the outside.
- Set up MySQL on RDS - Connect Tomcat to MySQL.
- Look into making my own machine images (AMIs) that have everything pre-installed and set up.
I may also consider doing the same thing with Open Shift, to compare and contrast the costs and ease of use.
No comments:
Post a Comment