Bird
0
0

You want to organize logs from multiple microservices in AWS CloudWatch. Which approach best uses log groups and log streams?

hard📝 Best Practice Q8 of 15
AWS - CloudWatch
You want to organize logs from multiple microservices in AWS CloudWatch. Which approach best uses log groups and log streams?
ACreate one log stream per instance and no log groups
BCreate one log stream per microservice and one log group for all
CCreate one log group for all microservices 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 hierarchy

    Log groups are containers for logs from a source; log streams organize logs within groups by instance or thread.
  2. Step 2: Apply to microservices architecture

    Best practice is one log group per microservice for separation, with multiple streams per instance for detailed logs.
  3. Final Answer:

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

    Log groups per microservice, streams per instance [OK]
Quick Trick: Use log groups for services, streams for instances [OK]
Common Mistakes:
MISTAKES
  • Mixing streams and groups roles
  • Using one group for all microservices
  • Not using log groups at all

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes