Skip to content

Unresolved Resource Dependencies: ApiGatewayRestApi #34

@kling-appfire

Description

@kling-appfire

Hi Everyone - looking to use your serverless plugin as it looks promising. I'm using it in conjunction with the 'serverless-finch' plugin to create/load my S3 bucket which by itself works great, but your plugin added I cannot get past the following error:

Error: The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [ApiGatewayRestApi] in the Resources block of the template
      at /usr/local/lib/node_modules/serverless/lib/plugins/aws/deploy/lib/validateTemplate.js:19:13
      at tryCatcher (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:517:31)
      at Promise._settlePromise (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:574:18)
      at Promise._settlePromise0 (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:619:10)
      at Promise._settlePromises (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:695:18)
      at _drainQueueStep (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:138:12)
      at _drainQueue (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:131:9)
      at Async._drainQueues (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:147:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:17:14)
      at processImmediate (internal/timers.js:439:21)
      at process.topLevelDomainCallback (domain.js:126:23)

The doc you've provided doesn't indicate any need to setup apiGateway manually or how to reference it if I were to do so. I'm clearly missing something here. I thought the whole idea was that this would configure it for me with minimal setup.

My profile is full AWS admin. Thank you in advance for your assistance.

Serverless.yml

service: myservice
app: myapp
org: myorg

provider:
  name: aws
  runtime: nodejs10.x
  profile: myprofile
  stage: dev
  region: us-east-1

plugins:
  - serverless-finch
  - serverless-api-cloudfront

custom:
  client:
    bucketName: ${self:app}-${self:provider.stage}

  apiCloudFront:
    compress: true
    logging:
      bucket: ${self:app}-${self:provider.stage}
      prefix: static
    cookies: none
    priceClass: PriceClass_All

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions