[aws-apigatewayv2] resources generated by HttpApi.defaultDomainMapping option should be compatible with previous versions of CDK
See original GitHub issueReproduction Steps
Define HttpApi with cdk version 1.51.0
as follows
new apigateway2.HttpApi(this, 'Api', {
defaultDomainMapping: {
domainName: domain,
mappingKey: ''
}
})
then upgrade to the latest version of CDK and remove mappingKey
option to map to the /
.
What did you expect to happen?
Nothing
What actually happened?
Deploy fails with ApiMapping key already exists for this domain name
.
Seems like this happens, because new ApiMapping is generated with backwards incompatible and ugly name of the form <DomainName>undefined
.
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
class HttpApi (construct) · AWS CDK
Default Authorizer to applied to all routes in the gateway. defaultDomainMapping? , DomainMappingOptions, Configure a custom domain with the API mapping ...
Read more >awsapigatewayv2 - Go Packages
The `AWS::ApiGatewayV2::VpcLink` resource creates a VPC link. Supported only for HTTP APIs. The VPC link status must transition from `PENDING` to `AVAILABLE` to...
Read more >@aws-cdk/aws-apigatewayv2 | Yarn - Package Manager
Experimental: Higher level constructs in this module that are marked as experimental are under active development. They are subject to non-backward compatible ......
Read more >Cannot find HttpApi construct in CDK v2 - Stack Overflow
The L2 HttpApi construct is in @aws-cdk/aws-apigatewayv2-alpha . In CDK V2, experimental modules are published in separate "alpha" packages.
Read more >How To Create Lambda Backed HTTP API Using AWS CDK
This video explains the process of creating HTTP APIs backed by Lambda Functions using AWS CDKRelated URLsGit Repo: ...
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
Using CDK 1.86.0 and I’m still seeing the generated names with
undefined
embedded. Even though it is likely harmless (given it seems to just be the names), it is concerning to seeundefined
and should probably be handled more gracefully when generating names.This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.