-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-apigateway): Where does domainNameAliasTarget come from for imports? #19045
Comments
Through trial and error I was able to find the If you are using the AWS Console, the value of the API Gateway domain name in the Configurations page for a custom domain is what should be mapped to the If you are using the CLI, then the value of regionalDomainName/distributionDomainName is what should be mapped to the If these are the correct sources for these values, I would be happy to open a PR to update the docs for the |
I'm struggling with this as well. We have multiple API Gateways (microservices) we want to tie together under one domain. One top level project provisions the custom domain and Route53 record. The other projects need to import DomainName. I don't see how to programmatically, through CDK, get the values |
#4887 (comment) helped This works:
As suggested in #6804 & #4887 (comment), |
I can see two different requests here:
The first one is pretty easy to clean up, if someone here could submit a PR for that, it would be wonderful! As for the second request - The CDK generally only requires the name or id when importing resources. I think there's enough customer requests and merit to the idea that we should make these properties optional. |
It looks like I can put "dummy" values. Here my code:
It seems to work as expected. Can someone confirm that See also #6804 |
hey guys, I was struggling with the same issue and figured out that I need to first create a domain and export its
Here is my stackoverflow post which contains examples if it helps. |
@davideicardi I have replicated what you did as well, it works great. I agree, those fields should be optional. |
link to reference doc page
https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html
Describe your issue?
Similar Issues
#6804
#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, ZoneZ1UJRXOUMOOFQ8
does not belong to any of my accounts and is called out the docs 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. Executingaws apigateway get-domain-name
does not reveal what the alias target is. Trying to query the Route 53 service with theZ1UJRXOUMOOFQ8
zone ID naturally results in anAccessDenied
error.The text was updated successfully, but these errors were encountered: