Created
September 30, 2020 16:43
-
-
Save crashGoBoom/9f7a5701f4c67b4e877027865f1fa403 to your computer and use it in GitHub Desktop.
aws s3 get bucket by name prefix
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
#!/bin/bash | |
# Usage: ./get_bucket_byprefix.sh "someprefix" | |
_prefix="${1}" | |
aws s3api list-buckets --query "Buckets[?starts_with(Name,'${_prefix}')].Name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment