AWS Certified Developer Associate DVA-C02 Practice Question
A developer is implementing a logging solution for an AWS Lambda-based service, which processes a series of online retail operations. Each operation must be traceable back to the specific session, item involved, and the shopper involved in the interaction. What kind of logging technique should the developer utilize to ensure that the log data can be indexed effectively, facilitating the extraction of relevant information for any investigation or analysis?
Generate distinct log streams categorized by type of operation and involved entities for better segregation.
Use JSON formatting for logs, which allows indexing and querying based on specific keys like session, item, and shopper details.
Embed CloudWatch Logs insights within the log entries to enhance the searchability of operations.
Format logs as delimited text with special characters to separate different pieces of information such as session, item, and shopper details.
When logs are formatted as JSON, they provide the capability to include key-value pairs to delineate different pieces of information, such as session, item, and shopper details. This structure allows for effective indexing and querying specific attributes, making it highly suitable for troubleshooting purposes. Delimited text logs are less ideal because while they are parseable, they do not inherently provide the structured approach that JSON offers for ease of querying. Embedding CloudWatch Logs insights is a metric embedding feature and not pertinent to log structuring for effective data retrieval. Creating separate log streams for different criteria may help with log segregation but does not address the need for structured data within the logs.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is JSON preferred for logging over delimited text?
Open an interactive chat with Bash
How does AWS CloudWatch integrate with JSON logging?
Open an interactive chat with Bash
What are key-value pairs and why are they important in logging?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Troubleshooting and Optimization
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access