diff --git a/packages/static-hosting/lib/static-hosting.ts b/packages/static-hosting/lib/static-hosting.ts index 32217e09..d29e6000 100644 --- a/packages/static-hosting/lib/static-hosting.ts +++ b/packages/static-hosting/lib/static-hosting.ts @@ -386,7 +386,8 @@ export class StaticHosting extends Construct { this.distribution = new Distribution(this, "BucketCdn", distributionProps); if (props.overrideLogicalId) { - const cfnDistribution = this.distribution.node.defaultChild as CfnDistribution; + const cfnDistribution = this.distribution.node + .defaultChild as CfnDistribution; cfnDistribution.overrideLogicalId(props.overrideLogicalId); }