Lambda Advanced Logging Controls Prerequisite
Short answer
C Configure the Lambda function to use the JSON log format to enable Advanced Logging Controls for distinct application and system log levels.
Question
Which solution will meet these requirements?
Key Takeaways
Advanced Logging Controls requires JSON log format; without it, separate log level configurations for app and system logs are ignored.
To filter Lambda logs by level for managed runtimes, you must first enable JSON log format, which unlocks Advanced Logging Controls for granular severity settings.
Common mistake: Choosing B assumes code-level filtering suffices, but it cannot suppress runtime system logs like cold start warnings, which Advanced Logging Controls handles.
Expert Analysis
The correct answer is C. The question specifies that the Lambda function uses managed runtimes, which support Advanced Logging Controls. This feature allows developers to configure separate log levels for application logs and system logs directly within the Lambda console or via AWS CLI, without modifying the function code.
However, Advanced Logging Controls has a strict prerequisite: the Lambda function must be configured to use the JSON log format. If the function is using the default text-based log format, the advanced logging controls settings (such as setting app logs to ERROR and system logs to WARN) will not take effect. Therefore, the necessary step to meet the requirement is to switch the log format to JSON.
Let's evaluate the other options:
- Option A is incorrect because permissions do not control log verbosity or format. The function already successfully writes logs, indicating sufficient permissions.
- Option B is incorrect because setting the log level in the code affects only application-specific logging statements (e.g.,
console.error). It does not control the verbose system logs generated by the Lambda runtime (e.g., cold starts, initialization errors), which require the Advanced Logging Controls feature. Furthermore, changing code contradicts the typical efficiency goals of serverless configurations where possible. - Option D is incorrect because sending logs to a custom log group does not change the filtering level of the messages contained within those logs.
This topic covers Data Operations and Support, specifically how to manage and monitor data pipelines by optimizing observability. Getting this wrong leads to excessive log storage costs and noise in CloudWatch Insights, making it harder to identify actual errors in data processing pipelines.
Official Reference
https://docs.aws.amazon.com/lambda/latest/dg/nodejs-logging.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
When configuring Lambda observability, always check if the log format supports the desired feature. For managed runtimes, JSON is mandatory for Advanced Logging Controls. Remember that 'code changes' (Option B) are often not the optimal solution when infrastructure configuration can achieve the same result more cleanly.
Frequently Asked Questions
Can I set different log levels for app and system logs in Lambda?
Why isn't setting log level in code enough?
Community Votes
67% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
9f871d2 👍 2 Answered BOption A - permissions has nothing to do with the requirement here. Option C and D are format and cahnging groups. these are not correct answers. B is correct answer to filter out only ERROR messages.
-
learner2023 👍 1 Answered Bor Lambda functions with managed runtimes, advanced logging controls allow configuring separate log levels for application logs (ERROR) and system logs (WARN) directly in the function configuration, without code changes
-
AWS82siast 👍 1 Answered CLog format must be JSON for for advanced logging controls.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DEA-C01 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DEA-C01 Practice Test →