DevEX - reference for building teams, processes, and platforms
Amazon Web Services Customer Case Study, Fashion for Home
1. Running a Lean Startup with AWS
Aron Spohr
Berlin, 23 January 2012
2. Agenda
• Who we are
• Where we are with AWS
• Solving day to day problems using
• S3
• CloudFront
• General Recommendations for AWS
• Q&A
2
3. Who we are
• Designer furniture online shop and
community in 5 countries
• Magento, Zend, PHP5
• Using AWS since 2009
EC2, Elastic LoadBalancing, RDS,
S3, IAM, CloudWatch, CloudFront
• www.fashionforhome.de
• We are hiring:
it-jobs@fashionforhome.de
3
4. Where we are with AWS
Stats
• around 50 running EC2 instances, a dozen load balancers, handful of RDS instances
• ~1TB of data in S3
• ~5TB of outgoing traffic/month
Key reasons for AWS for us (and as a startup)
• Manage growth
• Scalability (horizontally and vertically) and Flexibility (more space)
• Cost and effort
• More time to focus on your business
4
6. Solving day to day problems using S3
Use Cases
• Reports/Exports/Logs which get generated
• Backups
• Blobdata that you don’t like to store in your RDS
• Bulky data: HQ Image/Video Files
• Simple way to host files online
6
7. Solving day to day problems using S3
Take aways
• Security
• Policies, public, read-only, versioning
• Object expiration
• Get rid of important stuff which is not important anymore
• Wrap the stream (Stream Wrappers) and make paths configurable
• In PHP: <?php $data = file_get_contents(‘s3://bucket/data.txt’); ?>
• Beware: bucket names are global
• 3rd Party Software: Cloudberry, s3cmd, tntdrive, s3:// Firefox extension
7
9. Solving day to day problems using CloudFront
• Very easy to use CDN for Graphics, CSS, JS etc.
• Get the CloudFront “in front” of your webserver (custom origin)
• Can be used even without having your webserver in EC2
• Expiration times from 1h to virtually unlimited
• Many Edge locations around the world
9
10. Solving day to day problems using CloudFront
Take Aways
• Introduce global or sectional version numbers in order to easily refresh data
• e.g. http://f8a8fd8wed.cloudfront.net/r123/css/base.css
• Use long expiration times if you can for static content
• Use CNAMES in order to use your domain name: e.g. http://static.mydomain.com/
• Think about Protocol Policy (fetching). E.g. https fetches https content
• Set your expiration headers correctly
10
11. General Recommendations
• Use 1-year or 3-year long term plans if you can for EC2 or RDS
• Use Instances in at least 2 regions within an availability zone / use Multi-AZ for RDS
• Use CloudWatch to monitor your expenses (and stay within your budget)
• The Management console is great, but…
• Consider 3rd party solution providers for services not directly offered by AWS:
mongohq, cloudant, server density
• Get a security token for your team members
• Use tags in EC2
• Always wear Termination Protection
11