aws logs get-log-events

From wikieduonline
Jump to navigation Jump to search

aws logs get-log-events


aws logs get-log-events --log-group-name my-logs --log-stream-name 20150601


aws logs get-log-events --log-group-name my-logs --log-stream-name --output text --query 'events[*].message'
--start-from-head
aws: error: the following arguments are required: --log-stream-name

ChatGPT

for log_stream_name in $(aws logs describe-log-streams --log-group-name <log-group-name> --output text --query 
'logStreams[*].logStreamName'); do aws logs get-log-events --log-group-name <log-group-name> --log-stream-name 
$log_stream_name --output text --query 'events[*].message' >> all_logs.txt; done

Related[edit]

See also[edit]

Advertising: