A Lambda function needs to process messages from an SQS queue but should stop consuming messages when downstream DynamoDB write capacity is exhausted. What is the most operationally efficient approach?
-
A
Set the Lambda reserved concurrency to 0 when throttling occurs
-
B
Use an SQS dead-letter queue and configure Lambda to check DynamoDB capacity before processing
-
C
Configure a Lambda event source mapping with a maximum concurrency limit tied to a CloudWatch alarm that disables the trigger
-
D
Use Lambda Destinations to route failed invocations back to SQS