From a390c8753dd9d06554f04070557bfec45f5a8f48 Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Thu, 3 Jul 2025 21:36:29 +0530 Subject: [PATCH] add cloudfront custom distribution id --- src/content/docs/aws/services/cloudfront.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/content/docs/aws/services/cloudfront.mdx b/src/content/docs/aws/services/cloudfront.mdx index d260d63c..bef23ca9 100644 --- a/src/content/docs/aws/services/cloudfront.mdx +++ b/src/content/docs/aws/services/cloudfront.mdx @@ -99,6 +99,13 @@ Please note that a complete configuration would entail additional values relevan --distribution-config {...'Aliases':'{'Quantity':2, 'Items': ['custom.domain.one', 'customDomain.two']}'...} ``` +## Custom IDs for CloudFront Distributions via tags + +Each CloudFront distribution is created with a random unique identifier automatically assigned by AWS. +Given that the distribution ID is part of the generated domain name, it can be useful to have the possibility to create distributions with a deterministic ID (e.g., to simplify testing or integration with other AWS services). + +LocalStack offers this possibility by using the `_custom_id_` tag when creating a distribution with the [`CreateDistributionWithTags`](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistributionWithTags.html) operation. + ## Resource Browser The LocalStack Web Application provides a Resource Browser for CloudFront, which allows you to view and manage your CloudFront distributions.