diff --git a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts index e2dd5bd70eaf2..ec8153022471e 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts @@ -491,6 +491,11 @@ export class CloudFrontWebDistribution extends cdk.Construct { */ public readonly domainName: string; + /** + * The distribution ID for this distribution. + */ + public readonly distributionId: string; + /** * Maps our methods to the string arrays they are */ @@ -644,7 +649,7 @@ export class CloudFrontWebDistribution extends cdk.Construct { const distribution = new cloudformation.DistributionResource(this, 'CFDistribution', {distributionConfig}); this.domainName = distribution.distributionDomainName; - + this.distributionId = distribution.distributionId; } private toBehavior(input: BehaviorWithOrigin, protoPolicy?: ViewerProtocolPolicy) {