exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 316 discussion

A company uses an AWS Lambda function that reads messages from an Amazon Simple Queue Service (Amazon SQS) standard queue. The Lambda function makes an HTTP call to a third-party API for each message. The company wants to ensure that the Lambda function does not overwhelm the third-party API with more than two concurrent requests.

Which solution will meet these requirements?

  • A. Configure a provisioned concurrency of two on the Lambda function.
  • B. Configure a batch size of two on the Amazon SQS event source mapping for the Lambda function.
  • C. Configure Lambda event filtering to process two messages from Amazon SQS at every invocations.
  • D. Configure a maximum concurrency of two on the Amazon SQS event source mapping for the Lambda function.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
monishvster
Highly Voted 1 year, 2 months ago
Selected Answer: D
Should be D. Source: https://aws.amazon.com/blogs/compute/introducing-maximum-concurrency-of-aws-lambda-functions-when-using-amazon-sqs-as-an-event-source/
upvoted 7 times
...
DeaconStJohn
Highly Voted 1 year, 1 month ago
Selected Answer: D
Didn't like the wording. A - provisioned concurrency keeps 2 functions on warm standby for critical work. this is a minimum. question is asking about a maximum of 2. B - Batch of 2 is fine. latency could see this fall flat on it's face though. lambda invocations between function and SQS are limited to 2, not strictly between lambda and vendor API. C - event filtering is completely irrelevant here. D - Maximum is what the question is asking for. this will limit the amount of requests made to the vendor API. I would much prefer to set the reserved concurrency at the lambda level but this can be overridden at the SQS event source mapping level so I guess this is the best answer.
upvoted 5 times
albert_kuo
9 months ago
aws lambda create-event-source-mapping \ --function-name YourLambdaFunctionName \ --batch-size 2 \ --maximum-batching-window-in-seconds 5 \ --event-source-arn arn:aws:sqs:region:account-id:queue-name \ --maximum-concurrency 2
upvoted 2 times
...
...
ShakthiGCP
Most Recent 5 months, 1 week ago
Selected Answer: D
Sqs event source mapping
upvoted 1 times
...
65703c1
11 months, 1 week ago
Selected Answer: D
D is the correct answer.
upvoted 1 times
...
Abdullah22
1 year, 1 month ago
Selected Answer: D
going with D
upvoted 3 times
...
SerialiDr
1 year, 1 month ago
Selected Answer: A
Controlled Execution: Provisioned concurrency ensures that a minimum number of Lambda execution environments are always available. Setting it to two guarantees that only two Lambda function instances can process messages from the SQS queue concurrently. Independent of Message Batch Size: Even if the SQS event source mapping delivers a batch of messages exceeding two, the provisioned concurrency limits the number of Lambda invocations happening simultaneously.
upvoted 2 times
...
CrescentShared
1 year, 2 months ago
Selected Answer: B
configuring a maximum concurrency of two on the SQS event source mapping, is not a valid option. The concept of maximum concurrency is not directly applicable to SQS event source mappings. Concurrency in the context of Lambda functions and SQS is controlled by the batch size and the function's reserved concurrency settings.
upvoted 1 times
...
tgv
1 year, 2 months ago
Selected Answer: D
Correct answer is D. The maximum concurrency setting on the Amazon SQS event source mapping for the Lambda function controls how many messages are sent to the Lambda function concurrently. By setting it to two, you ensure that only two messages are processed concurrently, preventing the Lambda function from overwhelming the third-party API with more than two concurrent requests.
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago