Section 15: Serverless Overviews Flashcards

1
Q

You have a Lambda function that will process data for 25 minutes before successfully completing. The code is working fine in your machine, but in AWS Lambda it just fails with a “timeout” issue after 3 seconds. What should you do?
A) Set the timeout to 25 minutes
B) Set the memory to 3 GB
C) Run your code somewhere else than Lambda - the maximum timeout is 15 minutes

A

C) Run your code somewhere else than Lambda - the maximum timeout is 15 minutes

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

You’d like to have a dynamic DB_URL variable loaded in your Lambda code
A) Place it in the environment variables
B) Place it in the code zip file
C) Place it in the code itself

A

A) Place it in the environment variables

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

We have to provision the instance type for our DynamoDB database
A) true
B) false

A

B) false

DynamoDB is a serverless service and as such we don’t provision an instance type for our database. We just say how much RCU and WCU we require for our table (or auto scaling)

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

A DynamoDB table has been provisioned with 10 RCU and 10 WCU. You would like to increase the RCU to sustain more read traffic. What is true about RCU and WCU?
A) RCU and WCU are decoupled, so WCU can stay the same
B) You will also have to increase WCU to match the RCU value

A

A) RCU and WCU are decoupled, so WCU can stay the same

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

You are about to enter the Christmas sale and you know a few items in your website are very popular and will be read often. Last year you had a ProvisionedThroughputExceededException. What should you do this year?
A) Increase the RCU to a very, very high value
B) Create DAX cluster
C) Migrate the database away from DynamoDB for the time of the sale

A

B) Create DAX cluster

A DynamoDB Accelerator (DAX) cluster is a cache that fronts your DynamoDB tables and caches the most frequently read values. They help offload the heavy reads on hot keys off of DynamoDB itself, hence preventing the ProvisionedThroughputExceededException

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

You would like to automate sending welcome emails to the users who subscribe to the Users table in DynamoDB. How can you achieve that?
A) Create a Lambda function to scan the table every minute looking for new users.
B) Enable DynamoDB Streams and have the Lambda function receive events in real-time
C) Enable the SNS and DynamoDB integration

A

B) Enable DynamoDB Streams and have the Lambda function receive events in real-time

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

To make a serverless API, I should integrate API Gateway with
A) EC2
B) ELB
C) Lambda

A

C) Lambda

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

You would like to provide a Facebook login before your users call your API hosted by API Gateway. You need seamlessly authentication integration, you will use
A) Cognito Sync
B) DynamoDB user tables with Lambda Authorizer
C) Cognito User Pools

A

C) Cognito User Pools

Cognito User Pools directly integration with Facebook Logins

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

Your production application is leveraging DynamoDB as its backend and is experiencing smooth sustained usage. There is a need to make the application run in development as well, where it will experience unpredictable, sometimes high, sometimes low volume of requests. You would like to make sure you optimize for cost. What do you recommend?
A) Provision WCU & RCU and Enable auto-scaling for both development and production
B) Provision WCU & RCU and enable auto-scaling for production and use on-demand capacity for development
C) Provision WCU & RCU and enable auto-scaling for development and use on-demand capacity for productino
D) Use on-demand capacity for both development and production

A

B) Provision WCU & RCU and enable auto-scaling for production and use on-demand capacity for development

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