May 13 2008
8 thing you should know about Amazon EC2
I’ve been answering a lot of questions for a few friends who just got into the summer round of YC and are figuring a lot of things out. It reminds me of how much I learned over the past 11 months using Django and 3 months on Elastic Compute Cloud (EC2). There are a lot of little things that tend to only be learned the hard way or through a lot of research. I’ve listed a few of them here
1. Other than an obnoxious sign up process its not that hard to get up and running a basic app on EC2 (1 - 5 hrs)
2. The HD space isn’t yet persistent (guaranteed to be around). You get about 16MB Update: 10GB of persistent info that will stick with your instance and then many GB of storage attached as your /mnt drive. It has happened (though never to us) that everything on your /mnt drive could spontaneously disappear. This means you need to keep a DB backup. You should be doing this anyway though. Also Amazon is soon releasing tools to make an instant image of your /mnt drive, which might make the whole persistent thing a virtual non-issue.
4. Because of this you need to put all of your data on your /mnt drive, including .log files. This means you’ll have to change the default locations of your db and log files for apache. As you run your app keep an eye on your /root dir’s with “df -h” and make sure its not growing. If it is growing you’ve got a stray log file somewhere and need to get rid of it or you’ll hit your 16MB max quickly and your server will go down cause your apps can’t write anything anymore and you will be confused for a long time. We learned this one the hard way :|.
5. Use the FF extension to handle your instances. Its far from perfect. It doesn’t allow you to name the instances, and the ssh functionality doesn’t work for Mac’s as far as I’ve been able to figure out. But I think its a lot better interface than the command line tools. http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609
7. The promising ability of scaling up and down based on demand isn’t easy. RightScale offers some expensive tools/service for this. There’s also Scalr, which is an open source system already bundled into Amazon Images for you. I have yet to try this out. It sounds promising. If you’re just scaling to a hand full of servers (most cases) its easy enough to setup a load balancer such as HAProxy or nginx. With notes from my friend Justin I wrote a cookbook for setting up HAProxy previously.
8. Images taken from a Small instance cannot be loaded on L or XL instance, and vica versa. This is becasue small instances have a 32-bit architecture and L and XL instances are 64-bit.
Good luck! I’ll hopefully be posing a few more guides soon.
Updates 5/15: This article was pretty much just some notes posted to the web for a few friends. I didn’t do a lot of fact checking and have had the following facts checked/corrected for me.
The “got about 16 MB” estimate was horribly wrong. You can specify a bundle size up to 10G of free space in your bundle. The point is still the same though. Put all growing data in your /mnt dir.
Rightscale should not be referred to as “expensive”. I’m sure they’re more than worth their cost.
The latest version of Elasticfox (which I need to get) now has ssh support for macs.
I am an idiot and left out points 3 and 6. This post actually only has 6 things you should know about Amazon EC2. Never trust numbered list elements while editing a post.
Dave, thanks for mentioning RightScale. You have a pretty nice list of things here. Another one is to be sure to set up the drives on large and xlarge instances with LVM so you can nicely stripe them for extra performance. It makes a huge difference, specially if you’re running something disk intensive like a database. I don’t quite know why you call RightScale expensive. Sure, it’s not free, but we do engage directly with you and ensure that you have a successful deployment. In the end, unless you value your time at $0/hr it does end up being a lot cheaper, faster and better than if you did it yourself. If course, being myself someone who likes to get my fingers dirty, I understand perfectly well that some people prefer to do it themselves. More power to them! But one has to be careful not to confuse things…
Thanks for the comment and the extra advice! I agree, expensive is relative. The majority of our readers come from small/no budget startups who’s time valuation pretty much is $0/month :).
I’m sure your service is more than worth the price especially when dealing with more than a couple servers.
The latest version of Elasticfox (the FF extension for EC2, version 1.4) has much better support for ssh’ing into instances and works (almost) out the box on Mac OS X. The only thing you should have to configure is the location of your keypairs. If you’re still having trouble, post a bug to https://sourceforge.net/projects/elasticfox — or, better yet, post a patch if you find a bug
Dave,
Good post. I’m a convert to EC2 from one of the other ‘cloud’ hosting offerings that happens to promise just a little too much.
The other thing I would say to check out would be the ubuntu public images, for S L and XL images, they are great, and there are server (prefered) and desktop builds. They make it really easy to provision your own server, setup webmin, and off you go.
where is #6?
Why put data in your /mnt? I just made the sdb volume which they give you mounted on /mnt an LVM physical device, created lv’s for /var /usr /tmp etc. and mounted them where they should be. That way I don’t have to change any apache configs for logfiles or anything.
where is #3?
[…] 8 thing you should know about Amazon EC2 (tags: ec2 aws amazon **) […]
[…] Leaving Corporate » 8 thing you should know about Amazon EC2 (tags: ec2 amazon aws howto) […]
العاب الاطفال
We had to suspend or delete a few dozen accounts today. Most of the accounts involved were just suspended for inactivity. Inactivity is defined as having no change to the main index file, or a full domain that never had the nameservers pointed at 1vyb….
Cheapest tramadol available online
Cheapest tramadol available online
Purchase tramadol
Purchase tramadol
Purchasing hydromorphone
Purchasing hydromorphone
Tramadol dogs
Tramadol dogs
Purchase dilaudid on line
Purchase dilaudid on line
Buying cheap drug online hydromorphone
Buying cheap drug online hydromorphone
200 mg hexal tramadol
200 mg hexal tramadol
Mex rx online
Mex rx online
Buy tramadol online best prices limited time offer
Buy tramadol online best prices limited time offer
Tramadol without presciption
Tramadol without presciption
Crushing tramadol and snorting it
Crushing tramadol and snorting it
Soma shipped ups
Soma shipped ups
Purchase hydromorphone
Purchase hydromorphone
Buy dilaudid hydromorphone hydrochloride without prescription
Buy dilaudid hydromorphone hydrochloride without prescription
Pain medicine without a prescription
Pain medicine without a prescription
Hydromorphone hcl online purchase
Hydromorphone hcl online purchase
Online drug store india
Online drug store india
Tramadol hci online pharmacy
Tramadol hci online pharmacy
Ultram fedex overnight
Ultram fedex overnight
How to get a prescription for dilaudid
How to get a prescription for dilaudid
Tramadol dilaudid
Tramadol dilaudid
Acepromazine and tramadol overdose
Acepromazine and tramadol overdose
Tramadol 200 mg buy indian
Tramadol 200 mg buy indian
Pills fedex overnight all states
Pills fedex overnight all states
Hydromorphone online prescription
Hydromorphone online prescription
Mexico farmacias online
Mexico farmacias online
Tramadol 50mg 180 tablets
Tramadol 50mg 180 tablets
Tramadol extended relief dogs
Tramadol extended relief dogs
What is tramadol acet used for
What is tramadol acet used for
Ordering dilaudid online
Ordering dilaudid online
Hydromorphone tramadol
Hydromorphone tramadol
Ups shipped tramadol
Ups shipped tramadol
Tramadol saturday delivery
Tramadol saturday delivery
Order drugs mexico
Order drugs mexico
Pain pills for dogs
Pain pills for dogs
Tramadol with no prescription
Tramadol with no prescription
Ultram 800 pills no presciption
Ultram 800 pills no presciption
Ultram ups delivery
Ultram ups delivery
Dilaudid vs tramadol
Dilaudid vs tramadol
Dilaudid 2 mg snorting
Dilaudid 2 mg snorting
Tramadol grunenthal
Tramadol grunenthal
Tramadol overnight american express
Tramadol overnight american express
Low price acepromazine
Low price acepromazine
Buy acepromazine non script
Buy acepromazine non script
Buy dilaudid now without prior prescription
Buy dilaudid now without prior prescription
Tramadol shipped to all 50 states
Tramadol shipped to all 50 states
Tramadol hydrochloride
Tramadol hydrochloride
What is hydrocloride
What is hydrocloride
Hydromorphone 4 mg vs tramadol
Hydromorphone 4 mg vs tramadol
Buying acepromazine in the united states
Buying acepromazine in the united states
Dialudid online
Dialudid online
Florida tramadol
Florida tramadol
Non-prescription dilaudid online
Non-prescription dilaudid online
Liquid acepromazine
Liquid acepromazine
Hydrochloride tramadol
Hydrochloride tramadol
Liquid canine pain relief medicines
Liquid canine pain relief medicines
Treatment of tramadol addiction
Treatment of tramadol addiction
Tramadol 200 mg overnight fedex
Tramadol 200 mg overnight fedex
Rx in mexico
Rx in mexico
Hydromorphone rx
Hydromorphone rx
Hydromorphone hcl 1 mg price
Hydromorphone hcl 1 mg price
Buy hydromorphone
Buy hydromorphone
Generic dilaudid online no prescription
Generic dilaudid online no prescription
Acetaminophen canine
Acetaminophen canine
Todos farmacias
Todos farmacias
Tramadol shipped cod only
Tramadol shipped cod only
Rx forum tramadol
Rx forum tramadol
Perscriptions cheap mexico
Perscriptions cheap mexico
Farmacias en mexico
Farmacias en mexico
Mexican pharmacy dilaudid
Mexican pharmacy dilaudid
Buy tramadol amex
Buy tramadol amex
Dilauudid without prescription
Dilauudid without prescription
States that ultram can be shipped
States that ultram can be shipped
Tramadol 200mg in the us
Tramadol 200mg in the us
C.o.d. tramadol
C.o.d. tramadol
Dilaudid online without prescription
Dilaudid online without prescription
200mg dosage tramadol
200mg dosage tramadol
Mexico farmacias tramadol
Mexico farmacias tramadol
India online pharmacy dilaudid
India online pharmacy dilaudid
Tramadol maintence
Tramadol maintence
Tramadol without a prescription shipped to florida
Tramadol without a prescription shipped to florida
Opiates no prescription
Opiates no prescription
No rx meds shipped to florida
No rx meds shipped to florida
Tramadol cheap no rx
Tramadol cheap no rx
Cheap tramadol prescriptions online
Cheap tramadol prescriptions online
Buy tramadol from germany cash
Buy tramadol from germany cash
Tylenol tramadol
Tylenol tramadol
Tramadol hydro 50mg
Tramadol hydro 50mg
Headaches with tramadol
Headaches with tramadol
Acepromazine india
Acepromazine india
Prescription tablets on line
Prescription tablets on line
Dilaudid purchase
Dilaudid purchase
Order hydromorphone from mexico
Order hydromorphone from mexico
Dilaudid rx
Dilaudid rx
No prescription hydromorphone
No prescription hydromorphone
Order acepromazine without a prescription
Order acepromazine without a prescription
Hydromorphone online
Hydromorphone online
Tramadol for dogs
Tramadol for dogs
Cheap prescriptions from india or mexico
Cheap prescriptions from india or mexico
Acepromazine to get prescription and buy online
Acepromazine to get prescription and buy online
Purchase from mexico pharmacy acepromazine
Purchase from mexico pharmacy acepromazine
Dilaudid no rx
Dilaudid no rx
Acepromazine where to buy
Acepromazine where to buy
Order dilaudid cod
Order dilaudid cod
Tramadol rx in mexico
Tramadol rx in mexico
Tramadol shipped to florida
Tramadol shipped to florida
How to buy dilaudid without a prescription
How to buy dilaudid without a prescription
200mg tramadol overnight
200mg tramadol overnight
Tramadol hydro/acet
Tramadol hydro/acet
Extended release tramadol no prescription
Extended release tramadol no prescription
Buy acepromazine no prescription
Buy acepromazine no prescription
Buy dilaudid without prescription
Buy dilaudid without prescription
Soma shipped to florida overnight
Soma shipped to florida overnight
Taking tramadol when pregnant
Taking tramadol when pregnant
Buy dilaudid hydromorphone
Buy dilaudid hydromorphone
Buy tramadol
Buy tramadol
Tramadolrx without prescrtion
Tramadolrx without prescrtion
Ultram from india
Ultram from india
Cod tramadol overnight cheap
Cod tramadol overnight cheap
Tramadol shipped via ups only
Tramadol shipped via ups only
Buy acepromazine mexico
Buy acepromazine mexico
Advil wholesale price 50 tablets
Advil wholesale price 50 tablets
Effects of snorting tramadol
Effects of snorting tramadol
Dilaudid online
Dilaudid online
Withdrawal symptoms tramadol
Withdrawal symptoms tramadol
Tramadol non prescription
Tramadol non prescription
Tramadol hci 100mg
Tramadol hci 100mg
Tramadol acepromazine
Tramadol acepromazine
Tramadol hydrochloride addiction
Tramadol hydrochloride addiction
Dilaudid pills without a prescription
Dilaudid pills without a prescription
Tramadol hci liquid
Tramadol hci liquid
Hydromorphone overnight delivery
Hydromorphone overnight delivery
Canine use of hydromorphone
Canine use of hydromorphone
Pain pills without prescription
Pain pills without prescription
Acepromazine no prescription
Acepromazine no prescription
Inhaling tramadol
Inhaling tramadol
Mexican pain killers no prescription
Mexican pain killers no prescription
Mexico hydromorphone
Mexico hydromorphone
Snorting tramadol hydrochloride tablets
Snorting tramadol hydrochloride tablets
Dilaudid order online pharmacy
Dilaudid order online pharmacy
Medications shipped to florida
Medications shipped to florida
Tramadol tablets
Tramadol tablets
Prescription dilaudid without a prescription
Prescription dilaudid without a prescription
Acepromazine from mexico
Acepromazine from mexico
Snorting tramadol hydrochloride
Snorting tramadol hydrochloride
Hydromorph without prescription
Hydromorph without prescription
Buying dilaudid online
Buying dilaudid online
Mexico pain killers
Mexico pain killers
Tramadol 180 electronic check
Tramadol 180 electronic check
Dilaudid no precscription
Dilaudid no precscription
Acepromazine abuse
Acepromazine abuse
Buy the cheapest non prescription tramadol online
Buy the cheapest non prescription tramadol online
Cheap tramadol
Cheap tramadol
200mg extended release tramadol
200mg extended release tramadol