Created
November 8, 2019 18:47
-
-
Save andresriancho/2a85070593d70f48430ea132e08c1ad9 to your computer and use it in GitHub Desktop.
Athena query to get AWS S3 use
This file contains hidden or 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
SELECT eventtime, | |
eventname, | |
requestparameters, | |
awsregion, | |
eventsource, | |
resources | |
FROM cloudtrail_662651605507 | |
WHERE year = '2019' | |
AND month IN ('7', '8', '9', '10', '11') | |
AND eventsource = 's3.amazonaws.com' | |
AND eventname NOT IN ('GetBucketLogging', 'ListBuckets', 'GetBucketLocation', 'GetBucketPublicAccessBlock', 'GetBucketPolicyStatus', 'GetBucketAcl', 'GetAccountPublicAccessBlock', 'GetBucketCors', 'GetBucketWebsite', 'GetBucketRequestPayment', 'GetBucketPolicy'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment