-
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
[route53-targets] support APIGatewayV2 as a domain target #8941
Comments
I have the same need. While waiting for official support, I used my own function to bind to DomainName:
|
I just copied the ApiGatewayDomain class from aws-apigateway: class ApiGatewayDomain implements route53.IAliasRecordTarget {
constructor(private readonly domainName: apigwv2.IDomainName) { }
public bind(_record: route53.IRecordSet): route53.AliasRecordTargetConfig {
return {
dnsName: this.domainName.regionalDomainName,
hostedZoneId: this.domainName.regionalHostedZoneId,
};
}
}
new route53.ARecord(this, 'AliasRecord', {
zone: hostedZone,
recordName: 'api',
target: route53.RecordTarget.fromAlias(new ApiGatewayDomain(domainName)),
}); |
This is easy to do in v1 apigateway domain.addBasePathMapping(api); Want an equally straight forward way of doing it for v2. Can't find how to easily specify Endpoint REGIONAL for v2 either. |
Add support for [aws-apigatewayv2](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-apigatewayv2-readme.html#custom-domain) `DomainName` as target. Closes #8941 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Solved by following code:
Basically, remapped V2 regional props to V1. CC: #17244 |
(forked off #8908)
Something like this already exists for RestApi - https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-route53-targets.ApiGatewayDomain.html
Need similar support for APIGatewayV2.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: