-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[@aws-cdk/aws-apigatewayv2] Httpapi not deploying when new stack created when using custom domain #8983
Description
Httpapi not deploying when new stack created when using custom domain, and not accepting base path of '/'
I tried to follow the description of how to setup a base path mapping here:
https://docs.aws.amazon.com/cdk/api/latest/docs/aws-apigatewayv2-readme.html#custom-domain
My actual code was:
const domainName = "test.testdomain.com";
const dn = new apigw.DomainName(this, "DN", {
domainName,
certificate: certificate,
});
const httpApi = new apigw.HttpApi(this, "HttpApi", {
defaultDomainMapping: {
domainName: dn,
mappingKey: "hello",
},
});
When I run this with a stack that has never been deployed before, I get the following error:
Invalid stage identifier specified (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException;
Secondly if I try to change mappingKey to '/' I get the following:
An ApiMapping key may contain only letters, numbers and one of $-_.+!*'(), (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException;
Any help you can give is really appreciated, as this is such a great feature, and when it's possible to get authentication in there too, that will be icing on the cake!
Error Log
Environment
- CLI Version :
- Framework Version:
- Node.js Version:
- OS :
- Language (Version):
Other
This is 🐛 Bug Report