Any resource that can teach me how to setup something like version 1?
Rommel Castro
1

Hi Rommel,

Thankfully, it’s not as tricky as it looks but it will take some patience on the first build. The steps would be:

  1. Create the VPC and security group.
  2. Create the RDS configuration (start with just one DB, no read replicas, keep it simple). Import your database contents. Point your webserver to the DB and make sure everything can connect.
  3. Create your EC2 image (i.e. WordPress + Plugins, etc.) from a model EC2 instance. Ensure that you’re using IAM roles to authorize DB access .
  4. Create a launch configuration (this determines the instance config that autoscaling will use) and then create the autoscaling group.
  5. Create the S3 bucket to store JS/CSS and other static files. Create a CloudFront distribution fed by this bucket. Update your CMS accordingly (this depends on how the webserver is set up).
  6. Configure Route53 when this is all tested to point the traffic from the current live site to the new configuration. Make sure you run Amazon Inspector to check for any security issues first.

Here are some resources that might help:

The key things to remember:

  • Separate your state from your instance (e.g. persistent files go to S3, session store goes to DynamoDB, and credentials are either passed into the instance on startup or use IAM).
  • When things don’t work, 99% of the time it’s your security group or ACL blocking.
  • You’d be surprised how much load one instance with the right cache configuration can take before it scales up. Ensure your autoscaling allows enough time before cooling down to avoid scaling up/down too frequently.
  • If you start small, learn how it scales and once it’s working you can develop the CloudFormation script to automate the process in future

I hope this helps!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.