Let’s Get Certified
Module 03 / 13 · Development with AWS services

Trace a Lambda invocation

Follow configuration, event-source retries, networking and concurrency through one function invocation.

Trace a Lambda invocation

For an SQS source, the event source mapping polls the queue and invokes the function with a batch. A partial batch response can identify failed message IDs so successful records can be removed. Set the queue visibility timeout to accommodate processing and retries. For asynchronous invocation by Lambda itself, configure destinations for terminal outcomes. An event source mapping and an asynchronous invocation use different retry mechanisms.

A Lambda function reaching a private database needs suitable subnet routing and security-group rules as well as application-level authorization. Initialize reusable SDK clients outside the handler, and keep request-specific data inside it. Reserved concurrency bounds usage. Provisioned concurrency prepares execution environments on a version or alias for predictable startup.

Worked case

A batch contains ten invoices. Nine succeed, but one malformed invoice keeps returning with the other nine. How can the consumer isolate the failure?

Check your reasoning

Enable partial batch response on the mapping and return the failed message identifier. Successful items can be removed. Keep effects idempotent because delivery can still repeat.

Second worked case

Five SQS records complete in one invocation and a duplicate arrives later. Did partial batch handling fail?

Check your reasoning

A standard queue provides at-least-once delivery. Partial batch responses isolate failures within a batch. Preserve idempotency even for records already acknowledged.

Lambda event source mappings for SQS · Official DVA-C03 objectives for this domain

AWS re:Invent session on Lambda event processing

Related lesson in GitHub Actions. Select a workflow event and its permissions.

Practice with the recording

An asynchronous invocation reports success to its caller, yet no invoice appears. Where would you look for the eventual processing result?

Check your reasoning

An accepted asynchronous event can still fail while Lambda processes it. Inspect the function’s error metrics, retry and event-age settings, and any configured failure destination. Capture a correlation identifier at submission so the final invocation record can be reconciled with the caller’s receipt.

Cert Espresso · DVA-C03 full course · 55:44

Practice the individual exam skills
  • 1.2.1–1.2.4 A function reads a private database and consumes a queue. Check its subnet route, security group, role and configuration first. Then compare a synchronous test event, an asynchronous invoke and a polled queue batch. Identify who retries each one and where a failed record goes.
Knowledge check

Trace a Lambda invocation quiz

Answer 3 questions. Check each answer for an explanation.