Files
floci/src/main/java
Hector Ventura 9d49e619c1 fix(appsync): front custom domains with the partition's CloudFront zone (#5237)
* fix(appsync): front custom domains with the partition's CloudFront zone

CreateDomainName returned a random hosted zone id and an appsync-api
regional host as appsyncDomainName. AppSync serves a custom domain
through CloudFront: the CDK aliases appsyncDomainName into the
partition's CloudFront hosted zone (aws-route53-targets AppSyncTarget),
so a DNS alias built from Floci's answer pointed at a zone that does not
exist. The domain now gets a CloudFront distribution name on the
configured CloudFront suffix and the partition's CloudFront hosted zone
(Z2FDTNDATAQYW2 in aws, Z3RFFRIM2A3IF5 in aws-cn), as an edge-optimized
API Gateway domain does.

* refactor(appsync): share the CloudFront front with edge-optimized API Gateway domains

An AppSync custom domain and an edge-optimized API Gateway domain both
get a CloudFront distribution name and the partition's CloudFront hosted
zone, and the two services built that pair with the same copied
statements. CloudFrontEdgeDomain now builds it once for both.

RequestRegionArnIntegrationTest still expected appsyncDomainName to
carry the request region; it now asserts the CloudFront form, while its
domain ARN assertion keeps checking the region.
2026-10-07 09:34:02 -04:00
..