question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[aws-apigatewayv2] resources generated by HttpApi.defaultDomainMapping option should be compatible with previous versions of CDK

See original GitHub issue

Reproduction 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
chasemaiercommented, Jan 28, 2021

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 see undefined and should probably be handled more gracefully when generating names.

0reactions
github-actions[bot]commented, Sep 25, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found