-
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
APIGateway Type Error "addBasePathMapping is not a function" #7787
Comments
This API is not supported on imported The 'most cases' in the docs probably refers to when the domain is created is defined as part of the CDK app, and not imported. |
@nija-at The reason for using one of CDK's
CloudFormation recently launched the ability to import existing resources into a CloudFormation stack, CDK does not support this at the time of writing and |
Thanks for the clarification @baer. I believe you are able to use the |
Are you able to submit a PR to us with some better phrasing here? |
You're correct that the |
Resolving since we got the doc updates in - #8017. |
DomainName.fromDomainNameAttributes
created an object that does not have the methodaddBasePathMapping
. This appears to be because the fromDomainNameAttributes returns a stripped-down version of IDomainName, not the full-fledged one you would get from a DomainName created in the CDK stack.This may be intentional, or a missing feature in the construct but the docs for BasePathMapping say that "In most cases, you will probably want to use DomainName.addBasePathMapping() to define mappings" so it's not something I was expecting. If the intention is that CDK functions
*.from<AWS Service>Attributes
like this one or the one defined in VPC read-only, that should be a bit more clear in the docs if possible.Reproduction Steps
Error Log
Environment
Other
Some of the comments in this thread seem to be from other people who are confused by the same problem. #3103
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: