AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

BucketPolicy

Policy applied to an S3 bucket to control access

Import

import { BucketPolicy } from 'aws-cdk-lib/aws-s3';

Or use the module namespace:

import * as s3 from 'aws-cdk-lib/aws-s3';
// s3.BucketPolicy

Underlying CloudFormation Resources

This L2 construct creates and manages the following CloudFormation resources.

Get the Amazon S3 Cheat Sheet

Everything you need to know about Amazon S3 on one page. HD quality, print-friendly.

Download Free Infographic