Created
October 23, 2022 20:52
-
-
Save jiminald/38d83ab3e10377bed45069abea1b62d0 to your computer and use it in GitHub Desktop.
S3 JSON to CSV
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
| aws s3api list-objects --bucket [BUCKET NAME] --output json --query 'Contents[].{Key: Key, Size: Size}' > objects_with_size.json | |
| cat objects_with_size.json | jq -r '.[] | [.Key,.Size] | @csv' > objects_with_size.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment