aws cloudtrail lookup-events

From wikieduonline
Jump to navigation Jump to search

aws cloudtrail lookup-events (aws.com) You can look up events that occurred in a Region within the last 90 days.

--start-time
--max-items
KO --max-results

Examples[edit]

  • aws cloudtrail lookup-events --max-items 1
  • aws cloudtrail lookup-events --max-items 1000 | egrep "EventName|EventTime"
  • aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=ConsoleLogin
  • aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=CreateBucket --max-items 1


aws cloudtrail lookup-events --region eu-central-1 --lookup-attributes AttributeKey=EventName,AttributeValue=RequestSpotInstances


ChatGPT (pending validation)

aws cloudtrail lookup-events \
  --start-time <start-time> \
  --end-time <end-time> \
  --lookup-attributes AttributeKey=ResourceName,AttributeValue=<instance-id>


aws cloudtrail lookup-events --lookup-attributes AttributeKey=ResourceType,AttributeValue=AWS::S3::Bucket --max-items 1 --output text
(no output)
aws cloudtrail lookup-events --lookup-attributes AttributeKey=ResourceType,AttributeValue=NOT_a_valid_attribute  --max-items 1 --output text
(no output)

Related[edit]

See also[edit]

Advertising: