0
0
DynamoDBquery~20 mins

API Gateway to DynamoDB - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
๐ŸŽ–๏ธ
API Gateway to DynamoDB Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
โ“ Architecture
intermediate
2:00remaining
Design flow of a request from API Gateway to DynamoDB

Which option correctly describes the flow of a read request from an API Gateway to DynamoDB in a serverless architecture?

AAPI Gateway receives the request, triggers a Lambda function which queries DynamoDB and returns the result to API Gateway, which then responds to the client.
BAPI Gateway directly queries DynamoDB and returns the result to the client without any intermediate processing.
CDynamoDB pushes data to API Gateway which then sends it to the client without any request from API Gateway.
DAPI Gateway stores data temporarily and then asynchronously sends it to DynamoDB without client waiting.
Attempts:
2 left
๐Ÿ’ก Hint

Think about how API Gateway interacts with backend services in a serverless setup.

โ“ scaling
intermediate
2:00remaining
Handling high read traffic from API Gateway to DynamoDB

You expect a sudden spike in read requests through API Gateway to DynamoDB. Which approach best helps handle this load without throttling?

ADisable DynamoDB Auto Scaling and rely on manual capacity increases only.
BIncrease API Gateway timeout to allow longer waits for DynamoDB responses.
CUse API Gateway to batch all requests into one large DynamoDB write operation.
DEnable DynamoDB Auto Scaling for read capacity and use API Gateway caching to reduce direct calls.
Attempts:
2 left
๐Ÿ’ก Hint

Think about how to reduce load on DynamoDB and automatically adjust capacity.

โ“ tradeoff
advanced
2:00remaining
Choosing between direct DynamoDB access and Lambda proxy integration

What is a key tradeoff when choosing to let API Gateway directly access DynamoDB versus using a Lambda function as a proxy?

ADirect access reduces latency but limits request validation and complex logic; Lambda adds flexibility but increases latency.
BDirect access increases cost significantly; Lambda is always cheaper regardless of usage.
CLambda cannot access DynamoDB securely; direct access is the only secure method.
DDirect access requires writing custom SDKs; Lambda uses built-in AWS SDKs automatically.
Attempts:
2 left
๐Ÿ’ก Hint

Consider flexibility versus speed in request handling.

๐Ÿง  Conceptual
advanced
2:00remaining
Understanding eventual consistency in DynamoDB with API Gateway

When API Gateway triggers a read from DynamoDB, which consistency model can cause the client to see stale data?

ADynamoDB does not support consistency models; API Gateway handles consistency.
BStrongly consistent reads can return stale data; eventually consistent reads always return the latest data.
CEventually consistent reads can return stale data; strongly consistent reads always return the latest data.
DBoth eventually and strongly consistent reads always return the latest data.
Attempts:
2 left
๐Ÿ’ก Hint

Think about how DynamoDB consistency models affect read freshness.

โ“ estimation
expert
2:00remaining
Estimating capacity for API Gateway to DynamoDB writes

Your API Gateway receives 10,000 write requests per minute, each writing 1 KB item to DynamoDB. What is the minimum write capacity units (WCUs) needed if each WCU supports 1 KB per second?

A10,000 WCUs
B167 WCUs
C600 WCUs
D1,000 WCUs
Attempts:
2 left
๐Ÿ’ก Hint

Calculate requests per second and relate to WCU definition.