WordPress on AWS Auto scaling and ELB giving 503

This really isn’t a WordPress question per say. You need to create an ELB (Elastic Load Balancer) which then generates a DUAL-STACK CNAME which you can then use as an alias for your domain name in Route53. You do NOT want to simply use an A record for the ELB as Amazon has the right to change those IPs anytime they want.

Once you have your ELB setup and your example.com pointing to it, you then can attach your two EC2 instances to them.

You do not need to change anything special in your wp-config.

You WILL have to be mindful of your wp-admin and content that you are uploading, as if you upload an image through the media library it will only be on 1 ec2 instance and not the other. This is where offloading your media library to S3 and CloudFront come into play.

Finally you WILL also need to be mindful of updating plugins as the same issue that arrises with uploading media will happen when updating plugin files. There are a several ways to work through this, but two common ones would be to have a proxy server setup which you make the updates to, then take an image of that server and put that into your Launch Policy for autoscaling so when new servers are created they use the new updated image. Another option would be to look into Amazons Elastic File System.

So long story short, really a AWS question and not a wordpress question. I would take a look at https://cloudonaut.io/wordpress-on-aws-you-are-holding-it-wrong/ and possibly https://serifandsemaphore.io/how-to-host-wordpress-like-a-boss-b5993fcfbd8e#.m92j2kdqu

Hope that helps.