0
0
AWScloud~20 mins

Log groups and log streams in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
CloudWatch Logs Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Log Group Retention

You create a CloudWatch Log Group with a retention period of 7 days. What happens to the log data after 7 days?

AThe log data is moved to a new log stream after 7 days.
BThe log data is archived indefinitely after 7 days.
CThe log data is automatically deleted after 7 days.
DThe log data remains until you manually delete the log group.
Attempts:
2 left
💡 Hint

Think about what retention means for data lifecycle.

Architecture
intermediate
2:00remaining
Log Stream Creation Behavior

Which statement best describes when a new log stream is created in a CloudWatch Log Group?

AA new log stream is created automatically for each unique source sending logs.
BYou must manually create all log streams before sending logs.
CLog streams are created only when you enable log retention.
DLog streams are created only when you delete the log group.
Attempts:
2 left
💡 Hint

Consider how logs from different sources are organized.

service_behavior
advanced
2:00remaining
Log Stream Sequence Token Usage

You are sending log events to a CloudWatch Log Stream using the AWS SDK. What happens if you send a batch of log events with an incorrect sequence token?

AThe log events overwrite previous events in the stream.
BThe log events are accepted but stored out of order.
CThe log stream is deleted automatically.
DThe API call fails with an InvalidSequenceTokenException error.
Attempts:
2 left
💡 Hint

Think about how CloudWatch ensures log event order.

security
advanced
2:00remaining
IAM Permissions for Log Group Access

Which IAM permission is required to allow a user to create a new log stream in an existing CloudWatch Log Group?

Alogs:CreateLogStream
Blogs:CreateLogGroup
Clogs:PutLogEvents
Dlogs:DeleteLogStream
Attempts:
2 left
💡 Hint

Focus on the permission that allows creating streams, not sending logs.

Best Practice
expert
3:00remaining
Optimizing Log Group Design for Multiple Applications

You manage logs for multiple applications in your AWS account. Which approach is best to organize CloudWatch Log Groups and Log Streams for clear separation and easy management?

ACreate one log stream per application and multiple log groups per application instance.
BCreate one log group per application and multiple log streams per application instance.
CCreate one log group for all applications and one log stream per application.
DCreate one log group and one log stream for all applications combined.
Attempts:
2 left
💡 Hint

Think about how to separate logs logically and manage retention easily.