Hi all,
I don’t know why but the basePath does not seem to be used at all.
Below is my current serverless.yml…
As you can see, the basePath is set to querytranslator but whenever I deployed, I see this:
endpoints:
GET - https://xxxxxx.amazonaws.com/dev/dev/json
I don’t know where the first ‘dev’ is coming from. I tried deleting everything under .serverless, rename the project and redeploy but still I have the same issue
Any idea on what is causing this? the custom domain is working fine. The mappings are created correctly
aws apigateway get-base-path-mappings
{
“items”: [
{
“basePath”: “autocomplete”,
“restApiId”: “vu591yi4c5”,
“stage”: “dev”
},
{
“basePath”: “querytranslator”,
“restApiId”: “cyt94dl7we”,
“stage”: “dev”
}
]
}
Thanks
===
service: SlsQueryTranslator
Required plugins
plugins:
- serverless-domain-manager
Information about the AWS account and runtime.
VPCs and SubNets are read from an external file as they change according to the current stage
provider:
name: aws
runtime: java8
stage: dev
region: us-east-1
vpc: ${file(…/config/${self:provider.stage}/vpc.yml)}
profile: ${self:custom.profiles.${self:provider.stage}}
This is where you defined your function(s) and their artefact(s)
functions:
json:
handler: com.ceb.tn.services.slsquerytranslator.impl.handler.JSONQueryTranslatorHandler
events:
- http:
path: ${self:provider.stage}/json
method: get
package:
artifact: target/SlsQueryTranslator-dev.jar
Custom section containing details for the serverless-domain-manager plugin
custom:
domains: ${file(…/config/common.yml):domains}
profiles: ${file(…/config/common.yml):profiles}
roles: ${file(…/config/common.yml):roles}
customDomain:
basePath: querytranslator
domainName: ${self:custom.domains.${self:provider.stage}}
stage: ${self:provider.stage}
createRoute53Record: true