Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved Resource Dependencies: ApiGatewayRestApi #34

Open
kling-appfire opened this issue Sep 3, 2019 · 2 comments
Open

Unresolved Resource Dependencies: ApiGatewayRestApi #34

kling-appfire opened this issue Sep 3, 2019 · 2 comments

Comments

@kling-appfire
Copy link

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
@kling-appfire
Copy link
Author

Just read through your commits and saw the addition to the Readme! Any chance it could be updated to be independent? I'm having to put in a dummy lambda at moment.

@kling-appfire
Copy link
Author

Tried adding a 'ping' http:GET lambda to get past above APIGateway error. Still receiving it:

functions:
  hello:
    handler: mock.ping
    events:
      - http:
          path: ping
          method: get

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant