-
First Things First, on AWS
I was chatting with a buddy who was moving his web sites from dedicated hosting to AWS. Let’s just say the FTUE isn’t great. That triggered a quick brain-dump of what you should do when you first get started with AWS.
- understand pets v cattle. In aws all resources should be “cattle”, not pets. Periodically terminate instances to test this.
- activate cloudtrail (in all regions). Use Loggly to index cloudtrail (free or ~$20/mo)
- create restricted IAM users. Never use your root acct. Activate MFA.
- Use IAM ec2-instance roles instead of stored credentials whenever possible.
- Get familiar with IAM management ( use managed policies, groups & the policy tool) .
- Start using opsworks. Avoid launching EC2 instances directly through the console–quickly becomes a management nightmare.
- activate trusted advisor (and pay for the $100/mo upgrade)
- start creating cloudwatch alerts.
- Activate librato ($30/mo) and send cloudwatch to librato
- use loggly or cloudwatch logs
- get familiar VPC & security groups . Use POLP when creating Security groups
- understand regions & AZs – get familiar with cross-region latency.
- use multi-AZ RDS and extend the backup retention
- use the AWS forums – activate your forum account
-
Opsworks before-migrate.rb
Opsworks is a convenient, powerful and free service provided by AWS to simplify the management of EC2 nodes. The real power of the system is exposed through customizing various stages of the instance lifecycle by creating custom-tailored chef-solo recipes.
While Amazon provides a powerful deployment layer for PHP applications, it stops short once the PHP code has been checked out of git. For Laravel or other composer apps, you’ll have to customize your deployment. The most elegant and straightforward method is through custom deployment hooks. Here’s how to build a before_migration.rb script to build a Laravel app.