aws-cdk
aws-cdk copied to clipboard
docs for propertyOverrides are not up-to-date in 0.22.0 ("findChild" moved to "node.findChild")
I'm attempting to set the blockPublicAcl, ignorePublicAcl, etc in my s3 bucket in 0.22.0. However, fileChild is no longer available. I'm unsure how to get the base resource CfnBucket from an s3 object.
this.bucket = new s3.Bucket(this, name, {
versioned: true,
encryption: s3.BucketEncryption.S3Managed,
publicReadAccess: false,
});
const bucketResource = this.bucket.findChild('Resource') as CfnBucket;
bucketResource.propertyOverrides.publicAccessBlockConfiguration = {
blockPublicAcls: true,
ignorePublicAcls :true,
blockPublicPolicy:true,
restrictPublicBuckets:true
}
construct.findChild was moved to construct.node.findChild. We should update our docs to reflect this of course. Thanks for reporting.
I rooted out three refs in the "Accessing the AWS CloudFormation Layer" topic. I'll rebuild the docs later today.