Amazon Simple Notification Service (SNS) | SNS Support for AWS Lambda Flashcards

1
Q

How can I set alarms based on failure metrics or dwell time metrics?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

After activating the Delivery Status feature, you need to define a Log Metrics Filter in Amazon CloudWatch Logs for the log group that gets created by Amazon SNS on your behalf. This metrics filter can be defined to extract information that you are interested in, such as failure rate and dwell time. Once a Metric Filter is defined, you can create it and assign it to a Metric. This metric can then be used to set alarms or send notifications based on thresholds you define. For more information, take a look at our documentation or blog.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does support for AWS Lambda endpoints in Amazon SNS mean?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

You can invoke your AWS Lambda functions by publishing messages to Amazon SNS topics that have AWS Lambda functions subscribed to them. Because Amazon SNS supports message fan-out, publishing a single message can invoke different AWS Lambda functions or invoke Lambda functions in addition to delivering notifications to supported Amazon SNS destinations such as mobile push, HTTP endpoints, SQS, email and SMS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is AWS Lambda?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

AWS Lambda is a compute service that runs your code in response to events and automatically manages the compute resources for you, making it easy to build applications that respond quickly to new information. More information on AWS Lambda and how to create AWS Lambda functions can be found here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What can I do with AWS Lambda functions and Amazon SNS?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

By subscribing AWS Lambda functions to Amazon SNS topics, you can perform custom message handling. You can invoke an AWS Lambda function to provide custom message delivery handling by first publishing a message to an AWS Lambda function, have your Lambda function modify a message (e.g. localize language) and then filter and route those messages to other topics and endpoints. Apps and services that already send Amazon SNS notifications, such as Amazon CloudWatch, can now immediately take advantage of AWS Lambda without having to provision or manage infrastructure for custom message handling. You can also use delivery to an AWS Lambda function as a way to publish to other AWS services such as Amazon Kinesis or Amazon S3. You can subscribe an AWS Lambda function to the Amazon SNS topic, and then have the Lambda function in turn write to another service.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do I activate AWS Lambda endpoint support in Amazon SNS?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

You need to first create an AWS Lambda function via your AWS account and the AWS Lambda console, and then subscribe that AWS Lambda function to a topic using the Amazon SNS console or the Amazon SNS APIs. Once that is complete, any messages that you publish to the Amazon SNS topics which have Lambda functions subscribed to them will be delivered to the appropriate Lambda functions in addition to any other destinations subscribed to that topic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does delivery of a message from Amazon SNS to an AWS Lambda function do?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

A message delivery from Amazon SNS to an AWS Lambda function creates an instance of the AWS Lambda function and invokes it with your message as an input. For more information on message formats, please refer to the Amazon SNS documentation and the AWS Lambda documentation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How much does this feature cost?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

Publishing a message with Amazon SNS costs $0.50 per million requests. Aside from charges incurred in using AWS services, there are no additional fees for delivering a message to an AWS Lambda function. Amazon SNS has a Free Tier of 1 million requests per month. For more information, please refer to Amazon SNS pricing. AWS Lambda function costs are based on the number of requests for your functions and the time your code executes. The AWS Lambda Free-Tier includes 1M requests per month and 400,000 GB-seconds of compute time per month. For more information, please refer to AWS Lambda pricing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Can I subscribe AWS Lambda functions created by someone else to Amazon SNS topics that I own?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

We currently do not allow an AWS account owner to subscribe an AWS Lambda function that belongs to another account. You can subscribe your own AWS Lambda functions to your own Amazon SNS topics or subscribe your AWS Lambda functions to an Amazon SNS topic that was created by another account so long as the topic policy for that SNS topic allows it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Is there a limit to the number of AWS Lambda functions that I can subscribe to an Amazon SNS topic?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

Amazon SNS treats AWS Lambda functions like any other destination. By default, SNS offers 10 million subscriptions per topic. To request a higher limit, please contact us.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What data can I pass to my AWS Lambda function?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

When an AWS Lambda function is invoked as a result of an Amazon SNS message delivery, the AWS Lambda function receives data such as the Message ID, the topic ARN, the message payload and message attributes via an SNS Event. For more information on the event structure passed to the AWS Lambda function please read our blog.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can I track delivery status for message delivery attempts to AWS Lambda functions?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

To track the success or failure status of message deliveries, you need to activate the Delivery Status feature of Amazon SNS. For more information about how to activate this feature please read our blog.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What regions is AWS Lambda available in?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

See AWS Regions and Endpoints for a complete list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Do my AWS Lambda functions need to be in the same region as my Amazon SNS usage?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

You can subscribe your AWS Lambda functions to an Amazon SNS topic in any region.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Are there any data transfer costs for invoking AWS Lambda functions?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

Data transfer costs are applicable to message deliveries to AWS Lambda functions. Please refer to our pricing for more information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Are there any limits to the concurrency of AWS Lambda functions?

SNS Support for AWS Lambda

Amazon Simple Notification Service (SNS) | Application Integration

A

AWS Lambda currently supports 100 concurrent requests per AWS account. If your Amazon SNS message deliveries to AWS Lambda contribute to crossing these concurrency limits, your Amazon SNS message deliveries will be throttled. If AWS Lambda throttles an Amazon SNS message, Amazon SNS will retry the delivery attempts. For more information about AWS Lambda concurrency limits, please refer to AWS Lambda documentation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly