doles
doles

Reputation: 556

How do I add a bucket name to s3.Bucket in aws cdk

I can create an aws cdk s3.CfnBucket with a "bucket_name" argument and it looks good. Does the "s3.Bucket" cdn construct have a bucketName property? It is documented as a cdk.PhysicalName property, but, I can't figure out how to construct a new PhysicalName.

Upvotes: 1

Views: 1358

Answers (1)

Stefan Freitag
Stefan Freitag

Reputation: 3608

The answer depends a bit on the CDK version you are using. Imho with version 0.35.0 it changed to the usage of the PhysicalName.

const srcBucket = new Bucket(this, "ImageResizeSourceBucket", {
  bucketName: PhysicalName.of("de.freitag.stefan.imageresize")
}); 

Upvotes: 2

Related Questions