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.
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)- A85% (22)
- B4% (1)
- C8% (2)
- D4% (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.