Skip to content
v2.273.0

BucketAccessControl Enum ​

Default bucket access control types.

Example ​

ts
const websiteBucket = new s3.Bucket(this, 'WebsiteBucket', {
  websiteIndexDocument: 'index.html',
  publicReadAccess: true,
});

new s3deploy.BucketDeployment(this, 'DeployWebsite', {
  sources: [s3deploy.Source.asset('./website-dist')],
  destinationBucket: websiteBucket,
  destinationKeyPrefix: 'web/static', // optional prefix in destination bucket
  metadata: { A: "1", b: "2" }, // user-defined metadata

  // system-defined metadata
  contentType: "text/html",
  contentLanguage: "en",
  storageClass: s3deploy.StorageClass.INTELLIGENT_TIERING,
  serverSideEncryption: s3deploy.ServerSideEncryption.AES_256,
  cacheControl: [
    s3deploy.CacheControl.setPublic(),
    s3deploy.CacheControl.maxAge(Duration.hours(1)),
  ],
  accessControl: s3.BucketAccessControl.BUCKET_OWNER_FULL_CONTROL,
});

Members ​

MemberDescription
PRIVATEOwner gets FULL_CONTROL.
PUBLIC_READOwner gets FULL_CONTROL.
PUBLIC_READ_WRITEOwner gets FULL_CONTROL.
AUTHENTICATED_READOwner gets FULL_CONTROL.
LOG_DELIVERY_WRITEThe LogDelivery group gets WRITE and READ_ACP permissions on the bucket.
BUCKET_OWNER_READObject owner gets FULL_CONTROL.
BUCKET_OWNER_FULL_CONTROLBoth the object owner and the bucket owner get FULL_CONTROL over the object.
AWS_EXEC_READOwner gets FULL_CONTROL.

Referenced by ​