AWS Certified Developer Associate DVA-C02 Practice Question
Your application running on AWS Lambda is designed to process transactions and write logs to Amazon CloudWatch. You have noticed that the logs are difficult to search through when troubleshooting issues due to inconsistent formatting. To improve this, you decide to implement structured logging. Which approach would ensure that your logs are consistent and easily queryable?
Adopt XML formatted logs, where each entry is structured with relevant data tags.
Log the output as comma-separated values (CSV) with consistent ordering of information for each entry.
Format all log entries as JSON with consistent key-value pairs for each type of log message.
Use plain text logs with clear and consistent prefixes for each line.
Using JSON format for logs would ensure that each log entry is consistent and can be easily parsed and queried. JSON is a widely-known format which can be directly used with services like Amazon CloudWatch Logs Insights to run complex queries. By contrast, CSV lacks a self-describing format and the absence of keys can make it harder to interpret. Plain text logs lack structured data, making them difficult to query programmatically. Although XML is also structured, it is more verbose and not as readily queryable within AWS services as JSON.
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 structured logging in AWS?
Open an interactive chat with Bash
What is Amazon CloudWatch Logs Insights and how does it work?
Open an interactive chat with Bash
What are the drawbacks of using XML or CSV for logging instead of JSON?
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...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .