aws / aws/aws-cdk

(aws-apigateway): Where does domainNameAliasTarget come from for imports?

Open
#19,045 8 comments 4 reactions 0 assignees View on GitHub
@aws-cdk/aws-apigateway documentation effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### link to reference doc page

https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html

### Describe your issue?

### Similar Issues
https://github.com/aws/aws-cdk/issues/6804
https://github.com/aws/aws-cdk/issues/4887

### Question
When doing an import how are you supposed to derive `domainNameAliasTarget`? Can an example be given for how this is sourced?

### Explanation
`domainNameAliasHostedZoneId` is a private value for both Regional and Edge endpoints. Meaning, Zone `Z1UJRXOUMOOFQ8` does not belong to any of my accounts and is called out the [docs](https://docs.aws.amazon.com/general/latest/gr/apigateway.html) as a hard-coded value. The responses in those other two issues are assuming you're creating a new APIGW Domain and not importing one. My use-case requires importing rather than creating a new domain. The referenced doc page doesn't even address the field at all even though it does others. Executing `aws apigateway get-domain-name` does not reveal what the alias target is. Trying to query the Route 53 service with the `Z1UJRXOUMOOFQ8` zone ID naturally results in an `AccessDenied` error.

Contributor guide

Open the contributing guide

Research direction

Start with the Route53 AliasTarget reference and the API Gateway documentation linked in the issue, then compare the related discussions in issues 6804 and 4887. Check what aws apigateway get-domain-name exposes for imported domains and document how domainNameAliasTarget and domainNameAliasHostedZoneId are sourced. Done means an example explains the import case without requiring access to the hosted zone.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
api, cloud, infrastructure
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.