one or more stateless processes • VIII. Concurrency Scale out via the process model • XI. Logs Treat logs as event streams • Read it all! http://12factor.net/
persist files (filesystem, S3, etc.) 2. Model attachments: map files to model columns 3. A Rack application: streams files and accepts uploads 4. Rails helpers: conveniently generate markup in your views 5. A JavaScript library: facilitates direct uploads
(Ubuntu, Amazon Linux, etc.) • Provision your application decencies and create your own AMI • Look to automate the provisioning with a tool like Ansible • Provision all the way up to the point at which you can deploy your application and it will run
typically triggered by CloudWatch alerts • Also triggered by an Availability Zone outages • Instances join the active group when their health check is “green” • Launch configurations can contain user data, which can include scripts to pull down application code
primary domain as a CNAME, eg. youapp.com • You can potentially assign other CNAME aliases assets-1.yourapp.com, assets-1.yourapp.com, etc. • Set up multiple origins and behaviours to route some traffic to S3 and the rest to your ELB/Rails app • Upload your SSL certificate
• Provisioning your AMI Ansible / Packer • Provisioning your application AWS resources CloudFormation • Deploying your application Capistrano / Code Deploy • Packaging your last deploy for new autoscaled instances to pick up before going “green” on the load balancer User data shell script to tarball deploy directory and put in S3