I was hosting Magento on AWS in 2011 until 2013. Many of the things you gain from using cloud infrastructure rather than traditional dedicated or shared hosting are more relevantly described under the topic of DevOps, which are not exclusive to AWS but are more easily enabled through its use.
- Complete and flexible control of your capacity planning -- scale up ahead of marketing events, enable dynamic provisioning via Elastic Beanstalk, scale down during low volume periods, spin up a site in a couple weeks, tear it down and throw it away.
- Easily setup dev/test/staging environments and replicate changes between them.
- Host your admin pages on a separate host.
- Use DynamoDB for session management and ElastiCache for cache w/o incurring additional operations overhead, beware ElastiCache doesn't currently function in VPC though.
- use ELBs for loadbalancing, but beware if requests take more than 60 seconds they'll be terminated ungracefully
- Use AmazonSES for sending emails (now even easier via regular SMTP), though gaps still exist in tooling for tracking bounces/complaints
- Use AmazonS3 for hosting media, and Cloudfront for CDN.
- Reduced operations cost for database activity via RDS, which features point in time restore, automated failover, automated backups, and automated upgrades.
- DNS management is super easy in Route53, but generally recommended for ease of mapping subdomains to load balancers.
- VPC to put all your machines on their own private network to have more granular control and expose access as you see fit via your own VPN tunnels.
- Easy performance metrics and alerting (aside from memory usage and disk usage) via CloudWatch & SNS
Minimal footprint will be 1 ELB, 2 EC2 webservers in seperate AZs, 1 multi-az RDS, Route53 hosted zone for the domain. Initially you can use sticky sessions on the ELB to keep session management simpler, but as your traffic increases you'll want to move media into a CDN (S3 & CloudFront) and sessions off of the individual machines.
Areas I haven't looked but still are promising: CloudFormation scripts for easier deployment of a Magento stack, offloading order creation via DynamoDB and worker queues for greater checkout throughput (someone has already started a project to do this via MongoDB at one of the hackathons recently), and setting up a multi-region presence via latency based routing with Route53.
I guess I'm kind of an evangelist for cloud. Specific to AWS, c3.large are a decent instance size for production webservers, but I'd start off with the smallest of each instance class and measure performance and scale up or optimize code as you see fit, which is why I refer everyone to xhgui constantly.
it seems these guys find a solution: ( http://thinkglobal.co/resources/moving-the-magento-media-directory-to-s3/ )
There are 2 possible approaches, one being to have Magento push all media assets to S3 as they are created and the other being to simply mount the media directory to an S3 bucket and let Magento think that it’s writing to the local disk. We chose the latter.
We ended up using a tool called s3fs, which uses a broader technology called fuse. With some fairly straightforward configuration (described below), you can get s3fs up and running. Be careful not to hardcode S3 bucket names or API access credentials if you are using AWS or other PAAS provider.
Make sure you replace the following variables with values for your specific configuration:
- {{S3_BUCKET}} (name of your S3 bucket)
- {{API_PUBLIC_ACCESS_KEY}}(provided by AWS)
- {{API_SECRET_ACCESS_KEY}} (provided by AWS)
- {{UID}}(user id for nginx/apache user)
- {{GID}} (group id for nginx/apache user)
- {{MOUNTED_DIRECTORY}} (path to your magento media directory)
Here is the setup:
yum install -y gcc libstdc++-devel gcc-c++ curl curl* curl-devel libxml2 libxml2* libxml2-devel openssl-devel mailcap
cd /usr/local/src
wget http://downloads.sourceforge.net/project/fuse/fuse-2.X/2.9.3/fuse-2.9.3.tar.gz
tar -xzf fuse-2.9.3.tar.gz
rm -f fuse-2.9.3.tar.gz
mv fuse-2.9.3 fuse
cd fuse/
./configure –prefix=/usr
make
make install
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/
ldconfig
modprobe fuse
pkg-config –modversion fuse
wget http://s3fs.googlecode.com/files/s3fs-1.74.tar.gz
tar -xzvf s3fs-1.74.tar.gz
rm -f s3fs-1.74.tar.gz
mv s3fs-1.74 s3fs
cd s3fs
./configure –prefix=/usr
make
make install
echo “{{S3_BUCKET}}:{{API_PUBLIC_ACCESS_KEY}}:{{API_SECRET_ACCESS_KEY}}” > ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fs
echo “user_allow_other” > /etc/fuse.conf
echo “s3fs#{{S3_BUCKET}} {{MOUNTED_DIRECTORY}} fuse use_cache=/tmp,allow_other,uid={{UID}},gid={{GID}} 0 0″ >> /etc/fstab
s3fs -o allow_other -o uid={{UID}} -o gid={{GID}} -ouse_cache=/tmp {{S3_BUCKET}} {{MOUNTED_DIRECTORY}}
Best Answer
For a good starting point I recommend taking a look at a combination of the following tools:
Using the above links you can configure your AWS box and spin one up in no time.
Note: If you are serious about running a Magento site on AWS you need to talk to a professional AWS partner. In Australia we have companies like Bulletproof, a quick Google search will be able to help you find someone similar in your location.