New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon DVA-C02 Exam - Topic 1 Question 6 Discussion

Actual exam question for Amazon's DVA-C02 exam
Question #: 6
Topic #: 1
[All DVA-C02 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

0/2000 characters
Silvana
4 months ago
I’m confused, why not just use the context object for everything?
upvoted 0 times
...
Xochitl
4 months ago
Totally agree with A, standard output is the best for logging in Lambda!
upvoted 0 times
...
Amber
4 months ago
Wait, can you really log to a file in Lambda? Isn't it ephemeral?
upvoted 0 times
...
Moira
4 months ago
I think C makes more sense, using the event object is better.
upvoted 0 times
...
Stephania
4 months ago
Option A is the way to go! Context object has the request ID.
upvoted 0 times
...
Jenelle
5 months ago
I’m a bit confused about whether to use the context or event object for the request ID. I need to double-check that part.
upvoted 0 times
...
Rhea
5 months ago
I practiced a similar question where logging to standard output was recommended. I wonder if that's the best option here too.
upvoted 0 times
...
Dalene
5 months ago
I think the event object is used for the input data, so the context object is probably the right choice for the request ID.
upvoted 0 times
...
Gail
5 months ago
I remember that the context object contains the AWS request ID, but I'm not sure if it should be logged to standard output or a file.
upvoted 0 times
...
Aaron
5 months ago
I vaguely recall that the request ID is in the context object, but I can't remember if we should log to standard output or a file. I hope I chose the right option!
upvoted 0 times
...
Fernanda
5 months ago
I’m a bit confused about whether to use the context or event object for the request ID. I thought both could work, but I need to double-check.
upvoted 0 times
...
Marge
5 months ago
I think we practiced a similar question where we had to log events in a Lambda function. I feel like standard output is the right choice for logging.
upvoted 0 times
...
Latosha
5 months ago
I remember that the context object contains the request ID, but I'm not sure if it should be logged to standard output or a file.
upvoted 0 times
...
Judy
5 months ago
Ah, I remember learning about this in class. The properties files are used to store global variables and default language translations, so I'll go with options B and C.
upvoted 0 times
...
Cassie
5 months ago
My gut is telling me the management tenant. I remember it being a centralized location for managing resources, but I could be mixing it up.
upvoted 0 times
...
Danica
5 months ago
I'm a little confused by the wording of the question. Does the "What happens after the code block executes?" mean we need to consider any potential side effects or issues that could arise? I'll have to think this through carefully.
upvoted 0 times
...
Michal
5 months ago
Hmm, I'm a bit unsure about this one. I know build tools are used in software development, but I'm not entirely sure of their exact purpose. I'll have to think this through carefully before selecting an answer.
upvoted 0 times
...

Save Cancel