AWS Lambda | Using AWS Lambda to process AWS events Flashcards

1
Q

Can I use my own version of a supported library?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

Yes. you can include your own copy of a library (including the AWS SDK) in order to use a different version than the default one provided by AWS Lambda.

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

What is an event source?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

An event source is an AWS service or developer-created application that produces events that trigger an AWS Lambda function to run. Some services publish these events to Lambda by invoking the cloud function directly (for example, Amazon S3). Lambda can also poll resources in other services that do not publish events to Lambda. For example, Lambda can pull records from a Kinesis stream and execute a Lambda function for each message in the stream.

Many other services, such as AWS CloudTrail, can act as event sources simply by logging to Amazon S3 and using S3 bucket notifications to trigger AWS Lambda functions.

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

What event sources can be used with AWS Lambda?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

Please see our documentation for a complete list of event sources.

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

How are events represented in AWS Lambda?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

Events are passed to a Lambda function as an event input parameter. For event sources where events arrive in batches, such as Amazon Kinesis and Amazon DynamoDB Streams, the event parameter may contain multiple events in a single call, based on the batch size you request.To learn more about Amazon S3 event notifications visit Configuring Notifications for Amazon S3 Events. To learn more about Amazon DynamoDB Streams visit the DynamoDB Stream Developers Guide. To learn more about invoking Lambda functions using Amazon SNS, visit the Amazon SNS Developers Guide. For more information on Amazon Cognito events, visit Amazon Cognito. For more information on AWS CloudTrail logs and auditing API calls across AWS services, see AWS CloudTrail.

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

How do I make an AWS Lambda function respond to changes in an Amazon S3 bucket?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

From the AWS Lambda console, you can select a function and associate it with notifications from an Amazon S3 bucket. Alternatively, you can use the Amazon S3 console and configure the bucket’s notifications to send to your AWS Lambda function. This same functionality is also available through the AWS SDK and CLI.

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

How do I make an AWS Lambda function respond to updates in an Amazon DynamoDB table?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

You can trigger a Lambda function on DynamoDB table updates by subscribing your Lambda function to the DynamoDB Stream associated with the table. You can associate a DynamoDB Stream with a Lambda function using the Amazon DynamoDB console, the AWS Lambda console or Lambda’s registerEventSource API.

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

How do I use an AWS Lambda function to process records in an Amazon Kinesis stream?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

From the AWS Lambda console, you can select a Lambda function and associate it with an Amazon Kinesis stream owned by the same account. This same functionality is also available through the AWS SDK and CLI.

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

How does AWS Lambda process data from Amazon Kinesis streams and Amazon DynamoDB Streams?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

The Amazon Kinesis and DynamoDB Streams records sent to your AWS Lambda function are strictly serialized, per shard. This means that if you put two records in the same shard, Lambda guarantees that your Lambda function will be successfully invoked with the first record before it is invoked with the second record. If the invocation for one record times out, is throttled, or encounters any other error, Lambda will retry until it succeeds (or the record reaches its 24-hour expiration) before moving on to the next record. The ordering of records across different shards is not guaranteed, and processing of each shard happens in parallel.

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

How do I use an AWS Lambda function to respond to notifications sent by Amazon Simple Notification Service (SNS)?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

From the AWS Lambda console, you can select a Lambda function and associate it with an Amazon SNS topic. This same functionality is also available through the AWS SDK and CLI.

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

How do I use an AWS Lambda function to respond to emails sent by Amazon Simple Email Service (SES)?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

From the Amazon SES Console, you can set up your receipt rule to have Amazon SES deliver your messages to an AWS Lambda function. The same functionality is available through the AWS SDK and CLI.

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

How do I use an AWS Lambda function to respond to Amazon CloudWatch alarms?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

First, configure the alarm to send Amazon SNS notifications. Then from the AWS Lambda console, select a Lambda function and associate it with that Amazon SNS topic. See the Amazon CloudWatch Developer Guide for more on setting up Amazon CloudWatch alarms.

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

How do I use an AWS Lambda function to respond to changes in user or device data managed by Amazon Cognito?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

From the AWS Lambda console, you can select a function to trigger when any datasets associated with an Amazon Cognito identity pool are synchronized. This same functionality is also available through the AWS SDK and CLI. Visit Amazon Cognito for more information on using Amazon Cognito to share and synchronize data across a user’s devices.

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

How can my application trigger an AWS Lambda function directly?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

You can invoke a Lambda function using a custom event through AWS Lambda’s invoke API. Only the function’s owner or another AWS account that the owner has granted permission can invoke the function. Visit the Lambda Developers Guide to learn more.

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

What is the latency of invoking an AWS Lambda function in response to an event?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

AWS Lambda is designed to process events within milliseconds. Latency will be higher immediately after a Lambda function is created, updated, or if it has not been used recently.

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

How do I create a mobile back-end using AWS Lambda?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

You upload the code you want AWS Lambda to execute and then invoke it from your mobile app using the AWS Lambda SDK included in the AWS Mobile SDK. You can make both direct (synchronous) calls to retrieve or check data in real time as well as asynchronous calls. You can also define a custom API using Amazon API Gateway and invoke your Lambda functions through any REST compatible client. To learn more about the AWS Mobile SDK, visit the AWS Mobile SDK page. To learn more about Amazon API Gateway, visit the Amazon API Gateway page.

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

How do I invoke an AWS Lambda function over HTTPS?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

You can invoke a Lambda function over HTTPS by defining a custom RESTful API using Amazon API Gateway. This gives you an endpoint for your function which can respond to REST calls like GET, PUT and POST. Read more about using AWS Lambda with Amazon API Gateway.

17
Q

How can my AWS Lambda function customize its behavior to the device and app making the request?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

When called through the AWS Mobile SDK, AWS Lambda functions automatically gain insight into the device and application that made the call through the ‘context’ object.

18
Q

How can my AWS Lambda function personalize their behavior based on the identity of the end user of an application?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

When your app uses the Amazon Cognito identity, end users can authenticate themselves using a variety of public login providers such as Amazon, Facebook, Google, and other OpenID Connect-compatible services. User identity is then automatically and secured presented to your Lambda function in the form of an Amazon Cognito id, allowing it to access user data from Amazon Cognito, or as a key to store and retrieve data in Amazon DynamoDB or other web services.

19
Q

How do I create an Alexa skill using AWS Lambda?

Using AWS Lambda to process AWS events

AWS Lambda | Compute

A

AWS Lambda is integrated with the Alexa Skills Kit, a collection of self-service APIs, tools, documentation and code samples that make it easy for you to create voice-driven capabilities (or “skills”) for Alexa. You simply upload the Lambda function code for the new Alexa skill you are creating, and AWS Lambda does the rest, executing the code in response to Alexa voice interactions and automatically managing the compute resources on your behalf. Read the Alexa Skills Kit documentation for more details.