Error: Unable to setup base domain mappings for DOMAIN
kaotu opened this issue Β· comments
Community Note
- Please vote on this issue by adding a π reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Bug Report
Error Description
Unable to use getApiMappings function in ap-southeast-3 (Jakarta region) because this function had used the apiGatewayV2.
Link issue #537
Command Run
sls deploy --stage <stage> --region ap-southeast-3
Console Output
Error: Unable to setup base domain mappings for '<DOMAIN>':
Make sure the '<DOMAIN>' exists. Unable to get API Mappings:
Bad Request
at ServerlessCustomDomain.<anonymous> (/Users/<USER>/<Project>/<Service>/node_modules/serverless-domain-manager/dist/src/index.js:294:27)
at Generator.throw (<anonymous>)
at rejected (/Users/<USER>/<Project>/<Service>/node_modules/serverless-domain-manager/dist/src/index.js:6:65)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Domain Manager Configuration
Replace this with your own serverless.yml
file (anonymized, of course) to help us better resolve your issue.
custom:
customDomain:
domainName: ${self:provider.domain}
hostedZoneId: ${self:provider.hostzoneid}
basePath: ''
certificateArn: ${self:provider.certificatearn}
stage: ${self:provider.stage}
createRoute53Record: true
endpointType: EDGE
securityPolicy: TLS_1_0
autoDomain: true
provider:
name: aws
runtime: python3.8
memorySize: 128
domain: <$DOMAIN>
hostzoneid: <$HOSTZONE_ID>
certificatearn: <$CERT_ARN_JAKARTA_REGION>
stage: staging
region: ${opt:region, 'ap-southeast-3'}
Versions
- Domain Manager version(s): 6.2.4
- Node/npm version: 16.15.1
- Serverless Version: 3.27.0
- Lambda Code: Python
Possible Solution
We will add a parameter for defines the api gateway version, which accepts v1 or v2. The default is v2.
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
I have the same issue
I am getting the following error:
Error:
Unable to create base path mapping for '<my_custom_domain>':
Invalid stage identifier specified
I am setting the following config:
customDomain:
domainName: ${self:custom.domainName}
basePath: ""
certificateName: ${self:custom.domainCert}
createRoute53Record: true
stage: ${opt:stage, "test"}
endpointType: 'regional'
apiType: http
//TEMPORARY WORKAROUND
I have downgraded this dependency to v6.2.1 in my project.
And it's working perfectly fine now.
I am getting the following error:
Error:
Unable to create base path mapping for '<my_custom_domain>':
Invalid stage identifier specifiedI am setting the following config:
customDomain: domainName: ${self:custom.domainName} basePath: "" certificateName: ${self:custom.domainCert} createRoute53Record: true stage: ${opt:stage, "test"} endpointType: 'regional' apiType: http
//TEMPORARY WORKAROUND I have downgraded this dependency to v6.2.1 in my project. And it's working perfectly fine now.
Hi @varad11
You need to remove the stage
option from the customDomain
config
The stage value will be inherited from the serverless options or service.provider.stage here is a code
In the latest release we added support for the custom stage for HTTP API
In the AWS documentation it's no clear how it should work
As I see that feature will cause more problems then help here so we may need to revert changes
Hi @rddimon,
Checked the latest version. That particular error is not reoccurring.
Also I didn't remove the "stage" field in customDomain.
Thanks for the prompt changes and release.