aws-cdk-lib.aws_s3.BucketPolicyProps

interface BucketPolicyProps

LanguageType name
.NETAmazon.CDK.AWS.S3.BucketPolicyProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awss3#BucketPolicyProps
Javasoftware.amazon.awscdk.services.s3.BucketPolicyProps
Pythonaws_cdk.aws_s3.BucketPolicyProps
TypeScript (source)aws-cdk-lib » aws_s3 » BucketPolicyProps

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';

declare const bucket: s3.Bucket;
const bucketPolicyProps: s3.BucketPolicyProps = {
  bucket: bucket,

  // the properties below are optional
  removalPolicy: cdk.RemovalPolicy.DESTROY,
};

Properties

NameTypeDescription
bucketIBucketThe Amazon S3 bucket that the policy applies to.
removalPolicy?RemovalPolicyPolicy to apply when the policy is removed from this stack.

bucket

Type: IBucket

The Amazon S3 bucket that the policy applies to.


removalPolicy?

Type: RemovalPolicy (optional, default: RemovalPolicy.DESTROY.)

Policy to apply when the policy is removed from this stack.