Skip to main content

buckets_list_only

Lists buckets in a region or regions, for all properties use buckets

Overview

Namebuckets_list_only
TypeResource
DescriptionThe AWS::S3::Bucket resource creates an Amazon S3 bucket in the same AWS Region where you create the AWS CloudFormation stack.
To control how AWS CloudFormation handles the bucket when the stack is deleted, you can set a deletion policy for your bucket. You can choose to *retain* the bucket or to *delete* the bucket. For more information, see [DeletionPolicy Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html).
You can only delete empty buckets. Deletion fails for buckets that have contents.
Idaws.s3.buckets_list_only

Fields

NameDatatypeDescription
bucket_namestringA name for the bucket. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the bucket name. The bucket name must contain only lowercase letters, numbers, periods (.), and dashes (-) and must follow [Amazon S3 bucket restrictions and limitations](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html). For more information, see [Rules for naming Amazon S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules) in the *Amazon S3 User Guide*.
If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.
regionstringAWS region.

Methods

NameAccessible byRequired Params
list_resourcesSELECTregion

SELECT examples

Lists all buckets in a region.

SELECT
region,
bucket_name
FROM aws.s3.buckets_list_only
WHERE region = 'us-east-1';

Permissions

For permissions required to operate on the buckets_list_only resource, see buckets