Posted On: Jul 21, 2016
If you use the EC2 Console or CLI, you can specify a Simple Notification Service (SNS) topic when you run a command. For example, you can set up SNS to receive a text message if your command has timed out, or you can use AWS Lambda to trigger a function in case an execution fails. Within AWS CloudWatch Events, you can create a rule based on a Run Command notification event and assign a target (which could be a service such as AWS Lambda, Kinesis or SNS) to trigger specific actions. Notifications you can use include in progress, success, failure, time out and cancelled. Thus, you now have two easy ways to set up event-driven messaging to ensure that you can monitor the status of any administrative tasks you can run on your instance fleet.