Asked By: Anonymous
Terraform deploys an S3 bucket using a name prefix.
How do I get the full name of an S3 bucket by providing name prefix to the AWS CLI command?
Answered By: Anonymous
aws s3api list-buckets --query 'Buckets[*].[Name]' --output text | grep "admin-passwords"
Using the above AWS CLI command and providing the name prefix/string/identifier to the grep command we can achieve the desired output.