Course menuDVA-C03

Exams / DVA-C03 / Lambda invocation, errors and destinations / Question 2

DVA-C03 practice question: Lambda invocation, errors and destinations (2 of 2)

Development with AWS Services A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A data team wants one Lambda function to process incoming records in batches, tuning the batch size and the batching window, and to retry failed batches.

Several services could feed the function.

Which TWO of these sources can feed Lambda through an event source mapping, in which Lambda polls the source itself? (Choose two.)

Choose two answers.

  1. A. Amazon S3 bucket event notifications
  2. B. Amazon SQS standard or FIFO queues
  3. C. Amazon SNS topics with a Lambda subscription
  4. D. Amazon DynamoDB table streams
  5. E. Amazon API Gateway REST API methods
Show the answer and explanation

Answers: B, D

  • A. Wrong: S3 pushes each event to Lambda, and the trigger is configured on the bucket. Lambda does not poll the bucket, so there is no event source mapping to tune.
  • B. Right: Correct. Lambda polls the queue and invokes the function with batches of messages, deleting each message once it has been processed successfully. Learn more: Lambda event source mappings (opens in a new tab)
  • C. Wrong: SNS pushes each message to the subscribed function. Lambda does not poll the topic, so batch size and batching window do not apply.
  • D. Right: Correct. Lambda polls the stream through an event source mapping and reads records in order for each shard, using the batch size and batching window settings. Learn more: Lambda event source mappings (opens in a new tab)
  • E. Wrong: API Gateway invokes the function directly for each request. There is nothing to poll, and no batching is involved.

Explanation

Lambda polls some sources through event source mappings, including SQS, Kinesis, DynamoDB streams and Amazon MSK. Services such as S3, SNS and API Gateway push events to the function instead, so batch size and batching window do not apply to them.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Lambda invocation, errors and destinations? The 5 full-length practice sets have 9 more Lambda invocation, errors and destinations questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets