0

I need to manage some configuration files. The files can be stored on AWS S3 and retrieved via the URL. The alternative is to use an application server and store the JSON content to a database and exposing an API to retrieve the data.

What are the pros and cons of each approach?

  • You may want to rework your post into how to use S3 as a configuration management system. As it is worded, I think we will end up with a debate about configuration management - which would be off topic. – jeffatrackaid Jun 25 '14 at 18:49

1 Answers1

2

This is a pretty open-ended question, and as jeffatrackaid stated in his note above, this could just end up turning into a debate. But having said that, here are my two cents as I see it, having managed a decent sized environment spanning multiple AWS regions for the past couple years.

If all you need is to host static content then S3 is by far the easiest way to go. You just create a bucket, enable web access, upload your files, and you're done. If you're expecting a lot of traffic you can even leverage Amazon's CloudFront CDN very easily. The only potential downside, which may not really matter, is that the domain name will be in the format of (bucketname).(region).amazonaws.com. If you're only using HTTP then you could always set up a CNAME to point to that so you can use your own domain. If you want to use HTTPS then you'd either have to stick with the amazonaws.com DNS name, or live with SSL mismatch errors if you want to use your own domain name (or use CloudFront and pay a small fortune to support a custom SSL cert on it).

The biggest advantages of setting up an EC2 instance to serve up your content would be if the content was dynamic in nature and/or if you wanted to use a custom SSL certificate (for a lot less than the cost of using one in CloudFront).

The biggest downside to spinning up your own EC2 instance(s) is that you need to be aware that EC2 is designed in such a way that you need to prepare for the eventuality that your server might die, need to be rebooted, etc. So you'll want to keep your entire server configuration backed up somehow (possibly by just building an AMI, or Amazon Machine Image).

When you have an EC2 instance that is running it is running on a physical server. Unlike environments like VMWare it can't be migrated to another physical server while it's running. So if there is a hardware failure, Amazon decides to upgrade or retire the hardware your server is running on, etc. then they will schedule a reboot of the server to move it to new hardware.

Bruce P
  • 2,163
  • 3
  • 16
  • 21