Skip to content

ASG Event Notifications

joesondow edited this page Nov 29, 2012 · 2 revisions

ASG Event Notifications

This documentation describes the steps to configure auto scaling event notifications.

SNS

First, a topic needs to be created to receive the auto scale events. This needs to be done before the auto scale alarms have been defined.

Example:

sns-create-topic web-notifications

The output should be the topic name For example

arn:aws:sns:us-east-1:111111111:web-notifications

Next you need to subscribe to the topic. For example

sns-subscribe arn:aws:sns:us-east-1:111111111:web-notifications --endpoint foo@netflix.com --protocol email

This should output: Subscription request received.

Now when you create your scaling policy you need to add the topic as the final parameter to the scale-up or scale-down call.

For example:

./scale-up.sh web 15 "NFLX/Foo" "FallbackThrottler_numCurrentRequests" 14 60 5 1800 *arn:aws:sns:us-east-1:111111111:web-notifications*

Command Line

See the Amazon documentation for creating a topic

CLI example:

sns-create-topic foo-bar

Email

To receive email notifications a subscriber needs to be registered to the SNS topic.

Command Line

See the Amazon documentation for subscribing to a topic

CLI example:

sns-subscribe arn:aws:sns:us-east-1:360000000000:Foo --protocol email --endpoint YourTeamList@yourcompany.com