April 10, 2013, 10:24 AM — The best way to think of the free tier to Amazon Web Services is as a stepping-stone. It's a way to get your feet wet with the basic mechanisms of AWS and EC2; to understand Amazon's way of handling virtual machine instances, storage, data, and networking; and to create something that can eventually be hosted on a full-blown, for-pay AWS instance. It's also a way to learn how to manage and constrain AWS usage -- if you're not careful you may end up paying for your "free" AWS usage after all.
In this article, we'll look at what the free tier offers you and on what terms, then take a closer peek at what's possible or practical within those constraints. In the long run, any serious AWS user will want to take fuller advantage of what the Amazon cloud has to offer -- but why not make the most of the free resources in the meantime? The free tier is a great way to find one's legs with AWS, start some projects, and maybe even build a functional application or three.
[ Also on InfoWorld: How to get started with Amazon EC2 | From Amazon to Windows Azure, see how the elite 8 public clouds compare in InfoWorld Test Center's review. | For the latest news and happenings, subscribe to the Cloud Computing Report newsletter. ]
As a side note, one of the more ominous statements in Amazon's documentation about the free tier is this little warning: "We may stop accepting new registrations for the Offer at any time." This may be boilerplate CYA on Amazon's part, but if you're thinking about setting up a free-tier account, you might as well do it now and get in on the action while it's available.
What do you get for your $0 a month?The AWS Free Usage Tier provides you with a level of usage for many AWS components that is often just enough to get up and running. But even if it doesn't give you all the resources you might want to create something truly useful, you can certainly create something functional. Just don't expect it to scale well for unrestricted public use. Here's a rundown of some of the most useful AWS components and what you get with them on the free tier.
Amazon maintains a catalog of AMIs (Amazon Machine Images), which let you run a slew of different Linux and Windows systems -- among them Ubuntu Server 12.04 and 12.10, Microsoft Windows Server 2008 and 2012, and Amazon's own Amazon Linux AMI.
Not every AMI is eligible to be run on the free tier (even when you use a micro instance), but the ones that can be are clearly marked. The AWS Marketplace also features tons of third-party application appliances and server available as AMI instances -- but again, not all can be run on the free tier.
A broad range of machine instances is available for AWS. Those eligible for the free tier are marked with a gold star.
Storage. An EC2 instance isn't much use without storage space. On the free tier you're allowed 30GB of Elastic Block Storage, 5GB of Amazon S3 storage, 2 million I/Os, and 1GB of snapshot storage.
Note the limits on I/O usage. This is where things can get complicated, because Amazon charges for I/O. Outside of the free tier, Amazon charges 10 cents per 1 million I/O requests per month, and the amount of I/O used by a given instance can vary widely depending on what you're using it for. (We'll offer tips on managing this later.)
Databases. Among Amazon's Relational Database Services (RDS), you have your pick of MySQL, Oracle BYOL, or Microsoft SQL Server Express, each with 750 hours of usage per month, 20GB of storage, 10 million I/Os, and 20GB of backup storage. For those who prefer NoSQL, Amazon offers it in the form of DynamoDB, but with only 100MB of storage on the free tier. Here again, estimating I/O can be tricky, but there's more than enough available to experiment with a low-traffic, database-driven site and not run into major overage.
Data transfer. This part is easy: 15GB of outbound bandwidth across all AWS functions -- period. For perspective, my personal site with some 5,000 visitors per month consumes about 1.2GB of bandwidth in that time. For a relatively simple -- or nonpublic -- website, 15GB should be more than enough.
What are the limits? Now the bad news. Amazon has attached tight strings to the way the free tier works. Aside from the usage limits outlined above, there are a bunch of other restrictions.
Core services are free for only 12 months. Most of the key AWS services -- including EC2, S3, and RDS -- are restricted to 12 months of free use after your initial sign-up. After that, it's pay as you go at the usual rates. On the plus side, some of the other services -- DynamoDB, Simple Workflow, Simple Queue Service, Simple Notification Service, Amazon Elastic Transcoder, and CloudWatch -- are still eligible for the free tier after the first year.
Expect your CPU (and bandwidth) to be throttled. Micro instances are designed to supply maximum CPU in intermittent bursts. They don't supply a full, continuous instance of what Amazon calls a "compute unit" -- you need to move up to the M1 Small instance to get that. This makes a micro instance "well suited for lower throughput applications and websites that require additional compute cycles periodically," as Amazon's documentation puts it.
If you run applications that occasionally spike the CPU at 100%, they should be fine. Apps that peg the CPU at 100% for long periods of time will run briefly at 100%, then be throttled. Note that the internal statistics for a throttled machine will still report the CPU as running at 100%, so don't be fooled.
You can monitor usage statistics through Amazon's EC2 Dashboard, but you'll get better granularity of stats from inside the running machine.
Windows Server instances on the free tier may be a tight fit. Depending on what you plan to do, the amount of memory apportioned to a Windows Server instance may not be enough to run anything terribly ambitious. If you're not doing more than serving up static Web pages, it should be fine. I was able to install MySQL/Apache instances on such a machine (via the AMPPS Web stack) and run it with about 20% RAM free.
On the plus side, if you're using a database via an AWS-hosted database instance (RDS), the database is launched entirely apart from the machine you're running. With RDS, you don't have to worry about running a database server on the actual instance you're using (and thus gobbling up that much more memory with it).
You don't get a consistent IP address by default. Because of the way AWS provisions addresses, instances do not come with a static IP address or a consistent private DNS name automatically. This makes it tough to host a free site for use by the outside world without some DNS trickery, as resetting the instance you're using will cause its IP address to also reset.
Fortunately, this limitation is easy to overcome. If you want a machine to be consistently reachable by the general public, you can use EC2 Elastic IP Addresses to provision a static IP for a free instance. Bear in mind that if you reserve an address and don't actually associate it with an instance, you'll be charged a small fee.
Best practices with the free tier Clearly, the free tier has many gotchas. The resource limits make it all too easy to run up charges if you're not careful. As you strive to make the most of your micro instance, keep these guidelines in mind.
Keep an eye on your billing. It should go without saying, but check in regularly with your AWS account activity page to see if you're running up charges you're not aware of. By default Amazon doesn't warn you if you've exceeded the free tier; you're just silently billed for any usage that isn't covered. If you want to be alerted to what your estimated usage is going to be and create alarms to warn you if you might exceed your budget, Amazon provides a billing alert system for your use. However, the number of alarms and notifications you can generate is limited by the free tier.
Keep an eye on your I/O usage. If you're using the server for yourself, you're not likely to run up a big I/O usage bill. But if you make your server public, that could change everything -- dramatically.
Figuring out the I/O usage for your instances isn't difficult, but it requires diligence and scrutiny. The EC2 management console provides monitoring tools, although the ones in the free tier aren't as granular as you otherwise get. You can't poll a free instance at more than five-minute intervals, whereas you get one-minute polling with for-pay instances.
You can also poll I/O usage from within the instance itself, using the OS's own tools. Here's one way to do it on Linux. In Windows you can use the Disk Transfers/Sec performance counter.
You can track your service charges through Amazon's reporting system, which also allows you to download the gory details in CSV/XML formats.
Assign an elastic address to save yourself a lot of headache. An elastic address doesn't add a significant amount to your bill, and it allows for easier connections to your system. This goes double for Windows instances, because the Remote Desktop connection tool stores the connection address and password together. Each time your site is provisioned with a new IP address, you have to create an entirely new Remote Desktop connection to reach it.
Back up items in the cloud. You never know when the server you'll be working with may bomb on you or have to be re-initialized. It's better to have any pertinent data already in Amazon's cloud instead of needing to be tediously re-uploaded. An EBS Snapshot is one really convenient way to do this, although you get only 1GB of snapshot storage on the free tier. Alternatively, you can attach an EBS volume and back up files directly to it, the way you'd perform backups from a conventional system to an external drive.
Where from here? Once you've gotten the hang of AWS in the free tier, you'll probably be itching to try something higher up the food chain. The next step up from the micro instances is the M1 Small instance, with twice the memory and a full compute-unit's worth of CPU. Most M1 instances start at around $15 a month.
If you're a penny-pincher who doesn't need a server running 24/7, consider a spot instance. With spot instances, you bid for computing capacity by specifying a maximum price you're willing to pay per hour. If the current price per hour for spot instances goes over that amount (it fluctuates based on supply and demand), your instance will stop running.
Finally, if you want to run something sporadically, such as a backup server, check out the reserved instances. A reserve instance lets you pay a one-time fee for a fixed length of time -- one to three years -- and obtain a significantly discounted hourly usage fee. As of this writing, a single M1 Small Linux instance can be had for as little as $61 a year, plus an hourly rate of 3.4 cents -- or around $354 for the whole year assuming 100% utilization.
M1 Small, spot instance, or reserved instance -- they're all pretty affordable. By the time you graduate from the free tier to one of these, you will have accumulated plenty of practice using Amazon's tools and keeping your costs in line.
Spot instances let you run a machine on unused capacity by bidding for it. It's a useful way to run a machine intermittently for little money.
This article, "Free Amazon Web Services -- and how to make the most of them," originally appeared at InfoWorld.com. Follow the latest developments in cloud computing at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.
Read more about cloud computing in InfoWorld's Cloud Computing Channel.