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?
Suggested Answer: D
Get Premium DVA-C02 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
17 comments · newest first
SI
Silvana
11 months ago
I’m confused, why not just use the context object for everything?
XO
Xochitl
12 months ago
Totally agree with A, standard output is the best for logging in Lambda!
AM
Amber
12 months ago
Wait, can you really log to a file in Lambda? Isn't it ephemeral?
MO
Moira
1 year ago
I think C makes more sense, using the event object is better.
ST
Stephania
1 year ago
Option A is the way to go! Context object has the request ID.
JE
Jenelle
1 year 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.
RH
Rhea
1 year ago
I practiced a similar question where logging to standard output was recommended. I wonder if that's the best option here too.
DA
Dalene
1 year 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.
GA
Gail
1 year 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.
AA
Aaron
1 year 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!
FE
Fernanda
1 year 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.
MA
Marge
1 year 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.
LA
Latosha
1 year 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.
JU
Judy
1 year 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.
CA
Cassie
1 year 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.
DA
Danica
1 year 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.
MI
Michal
1 year 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.