AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Lightsail::Bucket

CfnBucket

The `AWS::Lightsail::Bucket` resource specifies a bucket.

Import

import { CfnBucket } from 'aws-cdk-lib/aws-lightsail';

Or use the module namespace:

import * as lightsail from 'aws-cdk-lib/aws-lightsail';
// lightsail.CfnBucket

Properties

Configuration passed to the constructor as CfnBucketProps.

bucketNameRequired
string

The name of the bucket.

bundleIdRequired
string

The bundle ID for the bucket (for example, `small_1_0` ). A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.

accessRulesOptional
IResolvable | AccessRulesProperty

An object that describes the access rules for the bucket.

objectVersioningOptional
boolean | IResolvable

Indicates whether object versioning is enabled for the bucket. The following options can be configured: - `Enabled` - Object versioning is enabled. - `Suspended` - Object versioning was previously enabled but is currently suspended. Existing object versions are retained. - `NeverEnabled` - Object versioning has never been enabled.

readOnlyAccessAccountsOptional
string[]

An array of AWS account IDs that have read-only access to the bucket.

resourcesReceivingAccessOptional
string[]

An array of Lightsail instances that have access to the bucket.

tagsOptional
CfnTag[]

An array of key-value pairs to apply to this resource. For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *AWS CloudFormation User Guide* . > The `Value` of `Tags` is optional for Lightsail resources.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter