Bird
0
0

Given the following AWS CLI commands executed in order:

medium📝 Predict Output Q13 of 15
AWS - CloudWatch
Given the following AWS CLI commands executed in order:
aws logs create-log-group --log-group-name myAppLogs
aws logs create-log-stream --log-group-name myAppLogs --log-stream-name stream1
aws logs put-log-events --log-group-name myAppLogs --log-stream-name stream1 --log-events '[{"timestamp":1609459200000,"message":"Start"}]'
aws logs describe-log-streams --log-group-name myAppLogs

What will the describe-log-streams command output include?
AA list containing one log stream named 'stream1' with stored events
BAn empty list because no log streams exist yet
CAn error stating the log group does not exist
DA list of all log groups in the account
Step-by-Step Solution
Solution:
  1. Step 1: Trace commands creating log group and stream

    The first two commands create a log group 'myAppLogs' and a log stream 'stream1' inside it.
  2. Step 2: Put log event and describe streams

    The third command adds a log event to 'stream1'. The last command lists streams in 'myAppLogs', so it will show 'stream1' with events.
  3. Final Answer:

    A list containing one log stream named 'stream1' with stored events -> Option A
  4. Quick Check:

    Created stream appears in describe output [OK]
Quick Trick: Create group and stream before putting logs [OK]
Common Mistakes:
  • Expecting empty list before adding streams
  • Confusing log groups with streams in output
  • Assuming describe lists groups, not streams

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes