serverless-domain-manager icon indicating copy to clipboard operation
serverless-domain-manager copied to clipboard

sls create_domain Error: Unable to fetch information about api.mydomain.com at APIGatewayWrapper.<anonymous>

Open seifolah-ghaderi opened this issue 4 years ago • 6 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 Execution of sls create_domain causes error: Error: Unable to fetch information about api.mydomain.com

Command Run sls create_domain

Console Output

Serverless: Invoke create_domain
Serverless: [AWS apigatewayv2 403 3.296s 0 retries] getDomainName({ DomainName: 'api.mydomain.com' })
 
  Error --------------------------------------------------
 
  Error: Unable to fetch information about uat-api.bountye.com
      at APIGatewayWrapper.<anonymous> (/Users/../project/node_modules/serverless-domain-manager/dist/src/aws/api-gateway-wrapper.js:112:27)
      at Generator.throw (<anonymous>)
      at rejected (/Users/../project/node_modules/serverless-domain-manager/dist/src/aws/api-gateway-wrapper.js:6:65)
      at process._tickCallback (internal/process/next_tick.js:68:7)
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              10.16.0
     Framework Version:         2.19.0
     Plugin Version:            4.4.2
     SDK Version:               2.3.2
     Components Version:        3.5.1

Domain Manager Configuration Replace this with your own serverless.yml file (anonymized, of course) to help us better resolve your issue.

  customDomain:
    domainName: api.mydomain.com
    basePath: api
    certificateName: *.mydomain.com
    certificateArn: arn:...dd918612-b7c6-4c91-8be5-..
    createRoute53Record: true
    endpointType: 'regional'
    securityPolicy: tls_1_2
    apiType: rest
    autoDomain: false
    hostedZoneId: Z1I1XQT4F25ddd

Versions

  • Domain Manager version(s): 5.1.0
  • Node/npm version: 6.14
  • Serverless Version: ^2.17.0
  • Lambda Code :Nodejs

Possible Solution

Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.

seifolah-ghaderi avatar Feb 06 '21 10:02 seifolah-ghaderi

Any workarounds?

We just hit that one - the plugin works seamlessly on Debian but fails on MacOS.

tomaszdudek7 avatar Apr 15 '21 14:04 tomaszdudek7

I get the same problem when switching OS Ubuntu 20.04

oasis1992 avatar May 03 '21 19:05 oasis1992

AWS CodeBuild, same issue.

volodymyrrudyi avatar Jun 10 '21 16:06 volodymyrrudyi

Actually, this happened because of insufficient credentials for the AWS CodeBuild IAM role. So the error message is somewhat misleading.

volodymyrrudyi avatar Jun 10 '21 16:06 volodymyrrudyi

@volodymyrrudyi What permissions did you need to add to resolve this issue?

ZebraFlesh avatar Jun 15 '21 14:06 ZebraFlesh

In our case, after doing export SLS_DEBUG=* we saw the policy action apigateway:GET was missing for our assumed Role IAM User on Resource - !Sub 'arn:aws:apigateway:${AWS::Region}::/domainnames/*'

image

monigala avatar Jan 11 '22 23:01 monigala

Hi @seifolah-ghaderi

Hope you have solved this issue.

We are not supporting 5.x anymore please try our latest version 6.x and let us know in case of any issues

rddimon avatar Feb 06 '23 21:02 rddimon