This recipe is similar to the previous one. However, in this case, we set up metrics, alarms, and notifications that are vital to the operations team. CloudWatch alarms help you notify users by e-mail, if any of the specified metrics cross their predefined thresholds. For example, you can collect latency metrics from the ELB and trigger an alarm that sends an e-mail notification to the operations team, if the latency exceeds 60 milliseconds. CloudWatch uses Simple Notification Service (SNS) to send these e-mails. The administrators and operations teams subscribe to this SNS topic to receive the CloudWatch notifications.
Create an SNS topic.
In the following example, the command creates the SNS topic called
EC2CpuHighTopic
. RecordTopicArn
for further usage.$ aws sns create-topic --name EC2CpuHighTopic
Subscribe to the SNS topic.
Execute the following command to specify the e-mail ID
<[email protected]>
subscribed to the SNS...