You are an architect in your company.
You have configured an SNS topic to send emails to a group of users regarding the CloudWatch alarms on the resource usages and outages.
You were requested by your head of department to exclude him from those alarms except for critical system outages.
How efficiently can you achieve this?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer: C.
Option A is not correct.
Although it looks correct, it is not an efficient solution.
Option B is not correct.
There is no such option on AWS CloudWatch alarms.
Option C is correct.
########
Amazon SNS Message Filtering.
By default, a subscriber of an Amazon SNS topic receives every message published to the topic.
A subscriber assigns a filter policy to the topic subscription to receive only a subset of the messages.
A filter policy is a simple JSON object.
The policy contains attributes that define which messages the subscriber receives.
When you publish a message to a topic, Amazon SNS compares the message attributes to the filter policy's attributes for each of the topic's subscriptions.
If there is a match between the attributes, Amazon SNS sends the message to the subscriber.
Otherwise, Amazon SNS skips the subscriber without sending the message to it.
If a subscription lacks a filter policy, the subscription receives every message published to its topic.
With filter policies, you can simplify your usage of Amazon SNS by consolidating your message filtering criteria into your topic subscriptions.
With this consolidation, you can offload the message filtering logic from subscribers and the message routing logic from publishers.
Therefore, you don't need to filter messages by creating a separate topic for each filtering condition.
Instead, you can use a single topic, and you can differentiate your messages with attributes.
Each subscriber receives and processes only those messages accepted by its filter policy.
For example, you could use a single topic to publish all messages generated by transactions from your online retail site.
To each message, you could assign an attribute that indicates the type of transaction, such as
order_placed.
,
order_cancelled.
, or
order_declined.
By creating subscriptions with filter policies, you can route each message to the queue meant to process the message's transaction type.
For a tutorial demonstrating how to implement message filtering with the AWS Management Console, see Filter Messages Published to Topics.
This tutorial shows how to apply filter policies to route messages to separate Amazon SQS queues.
########
Option D is not correct.
Although it looks correct, it is not an efficient solution.
The requirement is to exclude the head of department from receiving CloudWatch alarms regarding resource usage but to receive alerts only for critical system outages. This can be achieved through the following methods:
A. Create a new topic and subscribe only head of department email address. Create a new CloudWatch alarm only for critical outages and send messages to the new Topic. This method involves creating a new SNS topic, subscribing only the head of department email address to the new topic, and creating a new CloudWatch alarm only for critical system outages. The messages related to critical system outages will be sent to the new topic, and the head of the department will receive alerts only related to critical system outages.
B. Configure another option on the AWS CloudWatch alarm to send a direct email to the head of the department. This method involves configuring an additional action on the existing CloudWatch alarm, which sends a direct email to the head of department email address for critical system outages. However, this method does not exclude the head of the department from receiving CloudWatch alarms regarding resource usage.
C. Add filter policy to head of department subscription. This method involves adding a filter policy to the existing head of department subscription, which filters out the messages related to resource usage and only allows the messages related to critical system outages. However, this method requires the messages to be published to the same topic, which may not be efficient if there are a large number of subscriptions.
D. For head of department subscription, select AWS Lambda function which contains code to identify critical system outages and send email using AWS SES. This method involves creating an AWS Lambda function that identifies critical system outages and sends an email using Amazon SES. The head of the department can be subscribed to this Lambda function, which will send alerts only for critical system outages. However, this method requires additional setup and configuration of the Lambda function.
Among these methods, option A is the most efficient way to achieve the requirement. It involves creating a new topic and CloudWatch alarm, which requires minimal setup and configuration changes, and ensures that the head of the department receives alerts only for critical system outages.