Skip to main content

buckets

Creates, updates, deletes or gets a bucket resource or lists buckets in a region

Overview

Namebuckets
TypeResource
DescriptionResource Type Definition for AWS::S3Outposts::Bucket
Idaws.s3outposts.buckets

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the specified bucket.
bucket_namestringA name for the bucket.
outpost_idstringThe id of the customer outpost on which the bucket resides.
tagsarrayAn arbitrary set of tags (key-value pairs) for this S3Outposts bucket.
lifecycle_configurationobjectRules that define how Amazon S3Outposts manages objects during their lifetime.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTBucketName, OutpostId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all buckets in a region.

SELECT
region,
arn,
bucket_name,
outpost_id,
tags,
lifecycle_configuration
FROM aws.s3outposts.buckets
WHERE region = 'us-east-1';

Gets all properties from an individual bucket.

SELECT
region,
arn,
bucket_name,
outpost_id,
tags,
lifecycle_configuration
FROM aws.s3outposts.buckets
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new bucket resource, using stack-deploy.

/*+ create */
INSERT INTO aws.s3outposts.buckets (
BucketName,
OutpostId,
region
)
SELECT
'{{ BucketName }}',
'{{ OutpostId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.s3outposts.buckets
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the buckets resource, the following permissions are required:

Create

s3-outposts:CreateBucket,
s3-outposts:PutBucketTagging,
s3-outposts:PutLifecycleConfiguration

Read

s3-outposts:GetBucket,
s3-outposts:GetBucketTagging,
s3-outposts:GetLifecycleConfiguration

Update

s3-outposts:PutBucketTagging,
s3-outposts:DeleteBucketTagging,
s3-outposts:PutLifecycleConfiguration

Delete

s3-outposts:DeleteBucket

List

s3-outposts:ListRegionalBuckets