Created
March 10, 2020 14:50
-
-
Save yarick/62b2eecd793e1c14b260a5e63b086364 to your computer and use it in GitHub Desktop.
Search all AWS S3 buckets in account recursively for a folder or a file recursive recursion
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
#!/bin/bash | |
for i in $(aws s3api list-buckets --query "Buckets[].Name"| grep \"| awk -F\" '{print $2}'); do echo; echo $i; aws s3api list-objects --bucket $i --query "Contents[?contains(Key, 'i-my_super_secret_result_filie.json')]" ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment