Last active
February 10, 2016 07:41
-
-
Save mitkot/1fe18f7a06e363b670d7 to your computer and use it in GitHub Desktop.
How to get an event of ModifyInstanceAttribute and output as csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3 cp s3://(CloudTrail Bucket)/AWSLogs/(Account ID)/CloudTrail/(region)/yyyy/mm/dd/(cloud trail log file name).json.gz - |zcat |jq -r '.Records[]|select (.eventName=="ModifyInstanceAttribute")|[.eventTime, .requestParameters.instanceId,.requestParameters.instanceType.value]|@csv' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment