2. Tiered Infrastructure Offerings
1. Cloud Formation
a. IaaS, first step towards PaaS
b. Allows creation of Stacks within an autoscaling group
2. Elastic Beanstalk
a. True PaaS
b. A bit simplistic: several standard stacks offered with limited
customization ability
c. Very easy and fast to set up
3. OpsWorks
a. Very complete PaaS solution
b. For when a bespoke platform is an absolute must
4. Supported Solution Stacks
Linux:
• Deployment with eb tool from git
• EC2 instances running Linux + Apache
• Ruby: Rails/Passenger + Sinatra
• Python: Django + Flask
• PHP: CakePHP + Symphony
• Java: Tomcat
Windows:
• Deployment through MS Visual Studio with AWS Toolkit or by hand with
Microsoft WebDeploy .zip files
• EC2 instances running Windows 2008 R2 and IIS 7.5
5. Supported Databases
DB Support is done through Amazon's RDS
This means that all of the three different DB
engines are supported:
1. MySQL
2. Oracle (BYOL & Amazon Provided)
3. MS SQL
8. Putting it all together - execution
1.eb init
1.eb start
1.git aws.push
- not to be confused with git push
9. Putting it all together - maintenance
When environment configuration changes:
eb update
When deploying new code / adding extensions:
git aws.push
Progress update:
eb status
10. Benefits and Use Cases
• Smaller / simpler apps where code is pretty
standard
• Extremely fast provisioning time
• Proof against spikes thanks to autoscaling
• Bespoke code + standard platform =
(almost) zero time to production
• Can work in conjunction with other AWS
services
11. Interesting Problems - part 1
How do we manage branching in git and
environments in Elastic Beanstalk?
Easy solution: EB offers branch - to -
environment mappings
Defined in ~/app/.elasticbeanstalk/config
13. Interesting Problems - part 2
How to run cron jobs?
• Ruby app requires rake to run regularly
• Several EC2 instances, but only one database
• Autoscaling challenges
• Every instance identical - same crontab
• Solutions:
o Use Message Queuing (SNS) - a bit too complex
o Don't use cron - yeah right, and get devs to change the
code?
o Leader election together with ELB: simple, foolproof