Q:

Can you post to multiple EC2 instances behind an ELB to trigger events?

I use a continuous-deployment style with my node.js application where I:

Update the application code in a specific branch on GitHub
Use a GitHub webhook to post to a URL defined on my server

The server then evaluates whether the 'push' event was on the branch its codebase is mapped to and updates its codebase if so (using naught, which spins up the new version before shutting down the old one). 
With a single server this is a breeze, but if I have two servers behind an ELB, is there a way to post to both of them and trigger them to ensure they check their application code against the latest push? I would expect only one instance to receive the post under normal conditions which means other instances would have old application code.

A:

Probably lots of ways to do this, but one option is to enlist the help of AWS SNS. Have each of your machines subscribe to SNS topic using the HTTP / Post action as a webhook.
You would need to get GitHub to directly post the message to the SNS Topic (if possible), or use one of your machines to post that initial message to SNS in response to the Github webhook. 
Once the message gets to SNS it will be fanned out to all the subscribers (in your case two), but would make it easy to add more machines in the future.
With just a handful of machines this would only cost pennies.

