views:

75

answers:

1

Say, you have a Rails (or actually any other kind) application running on Amazon EC2, and whenever you perform some maintenance, which might include shutting down or re-creating your instances, you might want S3 to display your "maintenance mode" page instead of your app.

So, basically, that might mean:

  1. Uploading text saying when you're going to be back online to S3
  2. ???
  3. S3 serving this page to any request to your domain while you perform upgrades/re-instantiating instances, etc.
  4. ???
  5. EC2 instances are back serving your customers

I understand that most probably it is not possible — at least I have no idea how to do this. Just want to make sure it is not possible.

Anyway. Any ideas? :)

+2  A: 

I don't think it is possible with plain S3.

You can always run an EC2 instance with a minimal web server on it. It'll just cost you a few cents, assuming you're only down for a few hours. Using Elastic IPs, you don't even have to have any downtime – just switch your IP to point to the "downtime page" node, then swap it back when everything's back up and running.

Ben Alpert
good point — running maintenance node is a good idea — even few hours is just a couple of tens of cents.thanks!
Yurii Rashkovskii