in AWS by

I am using the Amazon Simple Notification Service to send notifications to alert admins whenever the CPU utilization of an EC2 instance crosses 70%

Which of the following can be subscribers to an SNS Topic? (Select TWO)

1 Answer

0 votes
by

Answers: A and C.

SNS is extremely useful for the fan-out types of applications, i.e., multiple clients that push messages to an SNS topic & multiple listeners can be notified when a message arrives at the Topic.

Option A is CORRECT.

SNS messages can be sent to registered addresses as Email (text-based or Object) who act as subscribers to the notification.

Option B is incorrect.

S3 acts as a publisher of SNS notifications.

When a file is uploaded to S3, it can publish an event that can then be subscribed to & acted upon.

Option C is CORRECT.

A lambda function can subscribe to an SNS Topic and can act on any events that are published to that Topic.

An S3 PUT or CREATE event for uploading documents can have a Lambda subscriber that can pull out metadata information contained within the documents & store it in a Dynamo DB database.

Option D is incorrect.

CloudWatch will act as a publisher of events using alarms.

Getting back to our scenario, we can set CloudWatch alarms on the CPU utilization metrics of the EC2 instance.

The alarms can then be published to an SNS Topic for notifying users.

Option E is incorrect.

Dynamo DB streams are events that are emitted when record modifications occur on a Dynamo DB table like INSERT, UPDATE, etc.

They are extremely useful to create informative dashboards in real-time.

Dynamo DB streams can trigger a lambda function that can publish a message to an SNS Topic.

So we can see here that Dynamo DB stream acts as a publisher of events.

References:

https://docs.aws.amazon.com/sns/latest/dg/welcome.html https://docs.aws.amazon.com/sns/latest/dg/sns-create-subscribe-endpoint-to-topic.html

To subscribe an endpoint to an Amazon SNS topic  PWN  . Sign in to the Amazon SNS console &.  In the left navigation pane, choose Subscriptions.  On the Subscriptions page, choose Create subscription.  On the Create subscription page, in the Details section, do the following: a. For Topic ARN, choose the Amazon Resource Name (ARN) of a topic.  b. For Protocol, choose an endpoint type. The available endpoint types are:  © HTTP/HTTPS © Email/Email-JSON e Amazon Kinesis Data Firehose  * Amazon SQS  © Note To subscribe to an SNS FIFO topic, choose this option.  « AWS Lambda  © Platform application endpoint

Amazon Simple Notification Service (SNS) is a fully managed messaging service that enables you to decouple and scale microservices, distributed systems, and serverless applications. SNS provides topics for high-throughput, push-based, many-to-many messaging.

To answer the question, SNS allows you to send messages to various endpoints or subscribers that can receive notifications through supported protocols, such as HTTP/S, Email, SMS, Lambda, and more.

In this scenario, the requirement is to send notifications to alert admins whenever the CPU utilization of an EC2 instance crosses 70%. Therefore, we need to select the subscribers to an SNS Topic that can receive and process the alert message.

Let's review the answer options:

A. Email: This is a valid option as it allows an email subscriber to receive the notification via email. The email recipient can then act accordingly based on the message received.

B. Amazon S3: This is not a valid option as Amazon S3 is an object storage service and is not designed to receive notifications from SNS topics.

C. AWS Lambda: This is a valid option as AWS Lambda is a compute service that can receive the notification and perform a set of customized actions based on the message received.

D. Amazon CloudWatch: This is not a valid option as Amazon CloudWatch is a monitoring service that can send alerts to SNS topics but cannot be a subscriber to an SNS topic.

E. Amazon DynamoDB streams: This is not a valid option as Amazon DynamoDB streams is a feature of Amazon DynamoDB that captures a time-ordered sequence of item-level modifications in a DynamoDB table and can send the stream records to AWS Lambda, Amazon Kinesis Data Streams, or Amazon Simple Queue Service (SQS). It is not designed to receive notifications from SNS topics.

Therefore, the correct answers are A. Email and C. AWS Lambda.

...