i want to use custom domain name for my lambda api. i found plugin serverless-domain-manager. what i did is
- install plugin ,
- create custom domain name in aws/ api gateway :uat-api.mydomain.com
- create a dns record with point to my custom-domain name
- add custom confige to serverless.yml file
custom: customDomain: domainName: uat-api.mydomain.com basePath: api certificateName: som-cert-name.com certificateArn: arnid createRoute53Record: true endpointType: ‘regional’ securityPolicy: tls_1_2 apiType: rest autoDomain: false hostedZoneId: Z1I1XQT4F25333
No when i run sls create_domain i got error:
[AWS apigatewayv2 403 3.044s 0 retries] getDomainName({ DomainName: ‘uat-api.mydomain.com’ })
Error --------------------------------------------------
Error: Unable to fetch information about uat-api.mydomain.com
at APIGatewayWrapper.<anonymous> (/Users/../node_modules/serverless-domain-manager/dist/src/aws/api-gateway-wrapper.js:112:27)
at Generator.throw (<anonymous>)
at rejected (/../node_modules/serverless-domain-manager/dist/src/aws/api-gateway-wrapper.js:6:65)
at process._tickCallback (internal/process/next_tick.js:68:7)
So , whats wrong and does i miss something?
SLS_DEBUG=*
and check those logs. In my case, it was because I needed to add API Gateway access to my IAM user. – Preston Hager