(certificate manager): cannot use cross-region certificate, cannot get custom domain URL
See original GitHub issueTwo issues I had trying to set up a custom domain mapping for my ApiGwV2 HttpApi.
- I cannot use a DNS-validated cross-region certificate from
us-east-1
in a different stack. I get #9608. Because I have a certificate for CloudFront and also my HttpApi it means I need to create twoCertificate
s, one from us-east-1 and one in my current region, even though the docs strongly suggest that I can use my us-east-1 cert in another region.
const hostedZone = HostedZone.fromLookup(this, "Zone", {
domainName: hostedZoneDomain,
})
const certificate = new DnsValidatedCertificate(this, "RegionCertificate", {
domainName: hostedZoneDomain,
hostedZone,
// region: "us-east-1", <---- I want to use this so I can re-use this with my CloudFront dist
})
- I cannot figure out how to get the URL with custom domain and base path
const httpApi = new HttpApi(this, `Api${appName}`, {
apiName: this.stackName,
defaultDomainMapping: {
domainName,
mappingKey: envName,
},
})
new CfnOutput(this, "ApiBase", { value: httpApi.defaultStage?.url || "unknown" }) // <--- tried httpApi.url too
This just gives me the boring old execute-api URL, not https://foo.com/dev
that I want. How can I get a stack output with the custom domain URL?
Environment
- **CDK CLI Version :1.110.0
- Framework Version:
- Node.js Version: 14
- OS :
- Language (Version):
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Getting certificates ready in AWS Certificate Manager
For an API Gateway Regional custom domain name, you must request or import the certificate in the same Region as your API. The...
Read more >Associating a custom domain name and securing ...
Guides you through how to associate a custom domain name and secure communication (SSL) with your Azure Cloud Service or Azure Web Apps....
Read more >Unable to use domain after transfering to another ...
I created a hosting zone but cannot verify my SSL certificate created with certificate manager. I tried to link the domain to a...
Read more >How to replicate SSL Certificates for a custom domain in ...
It cannot point at two different URLs at the same time. It is possible to route the requests to individual apps but the...
Read more >Setup a CloudFront distribution with SSL, custom domain and ...
... up a CloudFront CDN, link it with our custom domain via Route 53, and secure the whole connection using an SSL certificate...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve opened a feature request for your second request here - https://github.com/aws/aws-cdk/issues/15801
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.