How do I get the full name of an S3 bucket which contains a given string using AWS CLI?

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?


Solution

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.

Output:

admin-passwords202104262231251212001
techinplanet staff

techinplanet staff


Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno