nerdexam
Amazon

DVA-C02 · Question #21

A developer is writing an AWS Lambda function. The developer wants to log key events that occur while the Lambda function runs. The developer wants to include a unique identifier to associate the even

The correct answer is A. Obtain the request identifier from the AWS request ID field in the context object. Configure the. https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html https://docs.aws.amazon.com/lambda/latest/dg/nodejs-logging.html There is no explicit information for the runtime, the code is written in Node.js.

Submitted by zhang_li· Mar 5, 2026Development with AWS Services

Question

A developer is writing an AWS Lambda function. The developer wants to log key events that occur while the Lambda function runs. The developer wants to include a unique identifier to associate the events with a specific function invocation. The developer adds the following code to the Lambda function:

Which solution will meet this requirement?

Options

  • AObtain the request identifier from the AWS request ID field in the context object. Configure the
  • BObtain the request identifier from the AWS request ID field in the event object. Configure the
  • CObtain the request identifier from the AWS request ID field in the event object. Configure the
  • DObtain the request identifier from the AWS request ID field in the context object. Configure the

How the community answered

(26 responses)
  • A
    85% (22)
  • B
    4% (1)
  • C
    8% (2)
  • D
    4% (1)

Explanation

https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html https://docs.aws.amazon.com/lambda/latest/dg/nodejs-logging.html There is no explicit information for the runtime, the code is written in Node.js.

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice