Skip to content

cloudfront: expose ARN for Distribution #32530

@tmokmss

Description

@tmokmss

Describe the feature

It would be great if we could get ARN of a CloudFront distribution L2 construct.

Use Case

easily get ARN of a distribution.

Proposed Solution

add IDistribution.distributionArn property. We already have a function to calculate it.

export function formatDistributionArn(dist: IDistribution) {
return Stack.of(dist).formatArn({
service: 'cloudfront',
region: '',
resource: 'distribution',
resourceName: dist.distributionId,
});
}

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.170.0

Environment details (OS name and version, etc.)

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-cloudfrontRelated to Amazon CloudFronteffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions