Bird
0
0

You want to organize logs from multiple microservices in CloudWatch Logs. Which approach best follows AWS best practices?

hard📝 Best Practice Q15 of 15
AWS - CloudWatch
You want to organize logs from multiple microservices in CloudWatch Logs. Which approach best follows AWS best practices?
AStore all logs in a single log stream for simplicity
BCreate one log stream for all microservices in a single log group
CCreate one log group per instance and one log stream per microservice
DCreate one log group per microservice and multiple log streams per instance
Step-by-Step Solution
Solution:
  1. Step 1: Understand log group and stream organization

    Best practice is to use log groups to separate different applications or microservices.
  2. Step 2: Assign log streams per instance or source

    Within each log group, use multiple log streams to separate logs by instance or container.
  3. Step 3: Evaluate options

    Create one log group per microservice and multiple log streams per instance matches best practice: one log group per microservice, multiple streams per instance.
  4. Final Answer:

    Create one log group per microservice and multiple log streams per instance -> Option D
  5. Quick Check:

    Group per microservice, streams per instance [OK]
Quick Trick: Group by microservice, stream by instance [OK]
Common Mistakes:
MISTAKES
  • Mixing microservices in one log group
  • Using one stream for all logs causing confusion
  • Creating groups per instance instead of per service

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes