by gtsteve · 6y ago · 0 comments
This design really isn't so far out from what I planned but the NAT gateways aren't necessary and I was going to use Fargate instead of EC2 to host it. Also, I was going to host it in a single availability zone as the impact of downtime is minimal.
EFS seems like a natural choice also for upload directories, etc, and you can attach EFS volumes to Fargate containers now.
I'd be interested to hear if anyone else has done this and what their experiences are.
Then there's https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfro... to offload all media files to S3 (consider putting a Cloudfront distribution in front to get a custom domain + HTTPS).
I've been there and I can't honestly recommend it. You'll be on your own. Also, it really really feels like Wordpress wasn't made to be deployed this way. If I were you I'd rather use a good hosting provider like WPEngine and spend my time on more valuable things.
I say it's an anti-pattern because we're talking about WP - a platform that allows you to arbitrarily update PHP files from a web admin/install plugins/etc... It's this sort of flexibility that our clients/end users want and when we start designing that BS out due to security reasons it typically ends up in a user yelling at me for "WHY CAN'T I JUST INSTALL A PLUGIN LIKE THE WORDPRESS TUTORIAL SAYS?!"
When you come back with "security", and "I have to review that code" it almost always falls on deaf ears. When you start designing the flaws out of WP infra you start to realize those same flaws are why marketing is hellbent on keeping it as a CMS - they hate working with/waiting on devs to get things done.
It’s possible I’m sure to lock down Wordpress and also to segment your AWS network but ... why? Unless it needs access to other assets in your AWS account then quarantining it on a dedicated account on a different service provider is easy.
All the configuration is passed via environment variables so you don't even have to keep the config files in EFS.
https://aws.amazon.com/lightsail/features/
It's super easy...
I've racked up around 10 years of AWS experience now so it's not so hard for me to throw something like that together. If I had to use Azure then I'd certainly do something simpler.