aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

"cdk bootstrap --public-access-block-configuration false" is throwing an error

Open ywauto83 opened this issue 6 years ago • 3 comments

cdk bootstrap --public-access-block-configuration false
 ⏳  Bootstrapping environment aws://xxxxxxxxxx/ap-southeast-2...
CDKToolkit: creating CloudFormation changeset...
12:20:33 PM | CREATE_FAILED        | AWS::S3::Bucket       | St
agingBucket
Value of property PublicAccessBlockConfiguration must be an obj
ect

Reproduction Steps

Error Log

 ⏳  Bootstrapping environment aws://xxxxxxxxxx/ap-southeast-2...
CDKToolkit: creating CloudFormation changeset...
12:20:33 PM | CREATE_FAILED        | AWS::S3::Bucket       | St
agingBucket
Value of property PublicAccessBlockConfiguration must be an obj
ect

Environment

  • CLI Version : 1.47.0 (build c2b499a)
  • Framework Version:
  • Node.js Version: 12.8
  • OS : MAC
  • Language (Version): typescript 3.8.3

Other


This is :bug: Bug Report

ywauto83 avatar Jun 25 '20 02:06 ywauto83

1.46.0 is having the same issue

ywauto83 avatar Jun 25 '20 05:06 ywauto83

Turns out the feature was not tested (and is broken) with "legacy" bootstrap templates. The fix is pretty straight forward... I'm adding an integration test and will ship a PR soon.

RomainMuller avatar Jun 26 '20 09:06 RomainMuller

The faulty feature was added in aws/aws-cdk#8171. The culprit is a missing Ref: in front of an AWS::NoValue marker.

RomainMuller avatar Jun 26 '20 09:06 RomainMuller