serverless: ServerlessError: Missing required key 'deploymentId' in params

This is a Bug Report

Description

  • What went wrong? When deploying, I get a error telling me Missing required key 'deploymentId' in params. However, the stack deploys ok to AWS.

  • What did you expect should have happened? To deploy without throwing an error

  • What was the config you used?

service: estore-collinson

provider:
  name: aws
  runtime: nodejs8.10
  region: eu-west-1

functions:
  updateRetailers:
    timeout: 30
    handler: handler.updateRetailers
    events:
      - schedule: rate(1 hour)
      - http:
          path: xxxx/update-retailers
          method: get
  updateBrowserPluginRetailers:
    timeout: 30
    handler: handler.updateBrowserPluginRetailers
    events:
      - schedule: rate(1 hour)
      - http:
          path: xxxx/update-browser-plugin-retailers
          method: get
  updateCategories:
    timeout: 30
    handler: handler.updateCategories
    events:
      - schedule: rate(1 hour)
      - http:
          path: xxxx/update-categories
          method: get
  • What stacktrace or error message from your provider did you see?
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless:
User stats error: Request network error: { FetchError: network timeout at: https://tracking.serverlessteam.com/v1/track
    at Timeout._onTimeout (/usr/local/lib/node_modules/serverless/node_modules/node-fetch/index.js:126:13)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
  name: 'FetchError',
  message:
   'network timeout at: https://tracking.serverlessteam.com/v1/track',
  type: 'request-timeout' }
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate
Serverless: WARNING: Function updateRetailers has timeout of 180 seconds, however, it's attached to API Gateway so it's automatically limited to 30 seconds.
Serverless: WARNING: Function updateBrowserPluginRetailers has timeout of 180 seconds, however, it's attached to API Gateway so it's automatically limited to 30 seconds.
Serverless: WARNING: Function updateCategories has timeout of 180 seconds, however, it's attached to API Gateway so it's automatically limited to 30 seconds.
Serverless: Invoke aws:deploy:deploy
Serverless: [AWS cloudformation 200 0.172s 0 retries] describeStacks({ StackName: 'xxxx-xxxx-staging' })
Serverless: [AWS cloudformation 200 0.117s 0 retries] describeStackResource({ StackName: 'xxxx-xxxx-staging',
  LogicalResourceId: 'ServerlessDeploymentBucket' })
Serverless: [AWS s3 200 0.139s 0 retries] listObjectsV2({ Bucket:
   'xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f',
  Prefix: 'serverless/xxxx-xxxx/staging' })
Serverless: [AWS s3 200 0.104s 0 retries] headObject({ Bucket:
   'xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f',
  Key:
   'serverless/xxxx-xxxx/staging/1568712380977-2019-09-17T09:26:20.977Z/compiled-cloudformation-template.json' })
Serverless: [AWS s3 200 0.118s 0 retries] headObject({ Bucket:
   'xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f',
  Key:
   'serverless/xxxx-xxxx/staging/1568712380977-2019-09-17T09:26:20.977Z/xxxx-xxxx.zip' })
Serverless: [AWS lambda 200 0.133s 0 retries] getFunction({ FunctionName: 'xxxx-xxxx-staging-updateRetailers' })
Serverless: [AWS lambda 200 0.134s 0 retries] getFunction({ FunctionName: 'xxxx-xxxx-staging-updateBrowserPluginRetailers' })
Serverless: [AWS lambda 200 0.085s 0 retries] getFunction({ FunctionName: 'xxxx-xxxx-staging-updateCategories' })
Serverless: [AWS sts 200 0.374s 0 retries] getCallerIdentity({})
Serverless: Uploading CloudFormation file to S3...
Serverless: [AWS s3 200 0.157s 0 retries] putObject({ Body:
   <Buffer 7b 22 41 57 53 54 65 6d 70 6c 61 74 65 46 6f 72 6d 61 74 56 65 72 73 69 6f 6e 22 3a 22 32 30 31 30 2d 30 39 2d 30 39 22 2c 22 44 65 73 63 72 69 70 74 ... >,
  Bucket:
   'xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f',
  Key:
   'serverless/xxxx-xxxx/staging/1568729178636-2019-09-17T14:06:18.636Z/compiled-cloudformation-template.json',
  ContentType: 'application/json',
  Metadata:
   { filesha256: 'l5XBdeyv3A1KU+eNW0fWyL8pjZm8TGPHq3sGwlLTExc=' } })
Serverless: Uploading artifacts...
Serverless: Uploading service xxxx-xxxx.zip file to S3 (7.64 MB)...
Serverless: [AWS s3 200 0.144s 0 retries] createMultipartUpload({ Bucket:
   'xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f',
  Key:
   'serverless/xxxx-xxxx/staging/1568729178636-2019-09-17T14:06:18.636Z/xxxx-xxxx.zip',
  ContentType: 'application/zip',
  Metadata:
   { filesha256: 'E7PcVQQT7bgPnex9JZ2pR0nfPdmhGrJpKu/U6Sywqto=' } })
Serverless: [AWS s3 200 4.891s 0 retries] uploadPart({ Body:
   <Buffer 50 4b 03 04 14 00 08 00 08 00 00 00 21 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 2e 65 6e 76 95 92 5f 8f 9a 40 14 c5 df fd 16 4d da 57 fe c8 ... >,
  ContentLength: 5242880,
  PartNumber: 1,
  Bucket:
   'xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f',
  Key:
   'serverless/xxxx-xxxx/staging/1568729178636-2019-09-17T14:06:18.636Z/xxxx-xxxx.zip',
  UploadId:
   '.knKd.IGOlJodPYkmqrArT9ZsVTD2_3d05f1nyZBhxRVYFEDgpxW9FweADkXN.b9qLZiMzDxjIWPxctAMaMsMJO7BBVlf_nn1PH1sgB5MZ8LlUaxFZ_WRWdnHUthl438' })
Serverless: [AWS s3 200 7.07s 0 retries] uploadPart({ Body:
   <Buffer 8c 20 01 4a 9f 16 d7 75 f3 10 45 51 14 45 51 d5 07 4a 5d 74 80 6d f0 19 08 a9 fa ef dd 3a d4 3b 5e ab 95 ae 12 48 96 99 1b 66 67 e7 76 7f 98 43 5a 3a ... >,
  ContentLength: 2771923,
  PartNumber: 2,
  Bucket:
   'xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f',
  Key:
   'serverless/xxxx-xxxx/staging/1568729178636-2019-09-17T14:06:18.636Z/xxxx-xxxx.zip',
  UploadId:
   '.knKd.IGOlJodPYkmqrArT9ZsVTD2_3d05f1nyZBhxRVYFEDgpxW9FweADkXN.b9qLZiMzDxjIWPxctAMaMsMJO7BBVlf_nn1PH1sgB5MZ8LlUaxFZ_WRWdnHUthl438' })
Serverless: [AWS s3 200 0.158s 0 retries] completeMultipartUpload({ MultipartUpload:
   { Parts:
      [ { ETag: '"c1ea10b2eaa3d428bbb0fa462faf917c"', PartNumber: 1 },
        { ETag: '"8486b9470fa8b1cdcc480ad3c9cf61cb"', PartNumber: 2 },
        [length]: 2 ] },
  Bucket:
   'xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f',
  Key:
   'serverless/xxxx-xxxx/staging/1568729178636-2019-09-17T14:06:18.636Z/xxxx-xxxx.zip',
  UploadId:
   '.knKd.IGOlJodPYkmqrArT9ZsVTD2_3d05f1nyZBhxRVYFEDgpxW9FweADkXN.b9qLZiMzDxjIWPxctAMaMsMJO7BBVlf_nn1PH1sgB5MZ8LlUaxFZ_WRWdnHUthl438' })
Serverless: Validating template...
Serverless: [AWS cloudformation 200 0.175s 0 retries] validateTemplate({ TemplateURL:
   'https://s3.amazonaws.com/xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f/serverless/xxxx-xxxx/staging/1568729178636-2019-09-17T14:06:18.636Z/compiled-cloudformation-template.json' })
Serverless: Updating Stack...
Serverless: [AWS cloudformation 200 0.251s 0 retries] updateStack({ StackName: 'xxxx-xxxx-staging',
  Capabilities: [ 'CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM', [length]: 2 ],
  Parameters: [ [length]: 0 ],
  TemplateURL:
   'https://s3.amazonaws.com/xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f/serverless/xxxx-xxxx/staging/1568729178636-2019-09-17T14:06:18.636Z/compiled-cloudformation-template.json',
  Tags: [ { Key: 'STAGE', Value: 'staging' }, [length]: 1 ] })
Serverless: Checking Stack update progress...
Serverless: [AWS cloudformation 200 0.265s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
CloudFormation - UPDATE_IN_PROGRESS - AWS::CloudFormation::Stack - xxxx-xxxx-staging
CloudFormation - UPDATE_IN_PROGRESS - AWS::Lambda::Function - UpdateRetailersLambdaFunction
CloudFormation - UPDATE_IN_PROGRESS - AWS::Lambda::Function - UpdateBrowserPluginRetailersLambdaFunction
CloudFormation - UPDATE_IN_PROGRESS - AWS::Lambda::Function - UpdateCategoriesLambdaFunction
CloudFormation - UPDATE_COMPLETE - AWS::Lambda::Function - UpdateRetailersLambdaFunction
CloudFormation - UPDATE_COMPLETE - AWS::Lambda::Function - UpdateBrowserPluginRetailersLambdaFunction
CloudFormation - UPDATE_COMPLETE - AWS::Lambda::Function - UpdateCategoriesLambdaFunction
CloudFormation - CREATE_IN_PROGRESS - AWS::Lambda::Version - UpdateRetailersLambdaVersioncTqQkIkm5j1uqkumySkSyFJh3KGjDTO6kd6LilhU
Serverless: [AWS cloudformation 200 0.22s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
CloudFormation - CREATE_IN_PROGRESS - AWS::Events::Rule - UpdateCategoriesEventsRuleSchedule1
CloudFormation - CREATE_IN_PROGRESS - AWS::ApiGateway::Deployment - ApiGatewayDeployment1568729160515
CloudFormation - CREATE_IN_PROGRESS - AWS::Events::Rule - UpdateCategoriesEventsRuleSchedule1
CloudFormation - CREATE_IN_PROGRESS - AWS::Lambda::Version - UpdateRetailersLambdaVersioncTqQkIkm5j1uqkumySkSyFJh3KGjDTO6kd6LilhU
CloudFormation - CREATE_IN_PROGRESS - AWS::Lambda::Version - UpdateBrowserPluginRetailersLambdaVersionMSZGGyV4QyimR5Z7638GVUp0NTrKDMtofhv0k3A65fU
CloudFormation - CREATE_IN_PROGRESS - AWS::Lambda::Version - UpdateCategoriesLambdaVersion1d3l2ST62UXam7Dx80SF4O1dCqyhMFcK6lkx83whiY
CloudFormation - CREATE_COMPLETE - AWS::Lambda::Version - UpdateRetailersLambdaVersioncTqQkIkm5j1uqkumySkSyFJh3KGjDTO6kd6LilhU
CloudFormation - CREATE_IN_PROGRESS - AWS::ApiGateway::Deployment - ApiGatewayDeployment1568729160515
CloudFormation - CREATE_COMPLETE - AWS::ApiGateway::Deployment - ApiGatewayDeployment1568729160515
CloudFormation - CREATE_IN_PROGRESS - AWS::Lambda::Version - UpdateBrowserPluginRetailersLambdaVersionMSZGGyV4QyimR5Z7638GVUp0NTrKDMtofhv0k3A65fU
CloudFormation - CREATE_COMPLETE - AWS::Lambda::Version - UpdateBrowserPluginRetailersLambdaVersionMSZGGyV4QyimR5Z7638GVUp0NTrKDMtofhv0k3A65fU
CloudFormation - CREATE_IN_PROGRESS - AWS::Lambda::Version - UpdateCategoriesLambdaVersion1d3l2ST62UXam7Dx80SF4O1dCqyhMFcK6lkx83whiY
CloudFormation - CREATE_COMPLETE - AWS::Lambda::Version - UpdateCategoriesLambdaVersion1d3l2ST62UXam7Dx80SF4O1dCqyhMFcK6lkx83whiY
Serverless: [AWS cloudformation 200 0.39s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.575s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.328s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.24s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.212s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.408s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.33s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.229s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.201s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.287s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.299s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
CloudFormation - CREATE_COMPLETE - AWS::Events::Rule - UpdateCategoriesEventsRuleSchedule1
CloudFormation - CREATE_IN_PROGRESS - AWS::Lambda::Permission - UpdateCategoriesLambdaPermissionEventsRuleSchedule1
CloudFormation - CREATE_IN_PROGRESS - AWS::Lambda::Permission - UpdateCategoriesLambdaPermissionEventsRuleSchedule1
Serverless: [AWS cloudformation 200 0.277s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
Serverless: [AWS cloudformation 200 0.283s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
CloudFormation - CREATE_COMPLETE - AWS::Lambda::Permission - UpdateCategoriesLambdaPermissionEventsRuleSchedule1
Serverless: [AWS cloudformation 200 0.267s 0 retries] describeStackEvents({ StackName:
   'arn:aws:cloudformation:xxxx:xxxx:stack/xxxx-xxxx-staging/27a0dfd0-d8dc-11e9-8d9e-0a00435bc49c' })
CloudFormation - UPDATE_COMPLETE_CLEANUP_IN_PROGRESS - AWS::CloudFormation::Stack - xxxx-xxxx-staging
CloudFormation - DELETE_IN_PROGRESS - AWS::ApiGateway::Deployment - ApiGatewayDeployment1568712366408
CloudFormation - DELETE_SKIPPED - AWS::Lambda::Version - UpdateRetailersLambdaVersion9G7d83yd3EY4xmrWCFw7qg1zrADqviuTpXrtswX1tOg
CloudFormation - DELETE_SKIPPED - AWS::Lambda::Version - UpdateCategoriesLambdaVersionMVjWFN8yvb7DNC57hZkMnkirAVMGckMETi341ooE4gU
CloudFormation - DELETE_SKIPPED - AWS::Lambda::Version - UpdateBrowserPluginRetailersLambdaVersionABvH4bl2QznBvyrxlQRt3nm5DIoaDDtmbyAxhg9Y
CloudFormation - DELETE_COMPLETE - AWS::ApiGateway::Deployment - ApiGatewayDeployment1568712366408
CloudFormation - UPDATE_COMPLETE - AWS::CloudFormation::Stack - xxxx-xxxx-staging
Serverless: Stack update finished...
Serverless: Invoke aws:info
Serverless: [AWS cloudformation 200 0.113s 0 retries] describeStacks({ StackName: 'xxxx-xxxx-staging' })
Serverless: [AWS cloudformation 200 0.158s 0 retries] listStackResources({ StackName: 'xxxx-xxxx-staging' })
Service Information
service: xxxx-xxxx
stage: staging
region: xxxx
stack: xxxx-xxxx-staging
resources: 29
api keys:
  None
endpoints:
  GET - https://xxxx.execute-api.xxxx.amazonaws.com/staging/xxxx/update-retailers
  GET - https://xxxx.execute-api.xxxx.amazonaws.com/staging/xxxx/update-browser-plugin-retailers
  GET - https://xxxx.execute-api.xxxx.amazonaws.com/staging/xxxx/update-categories
functions:
  updateRetailers: xxxx-xxxx-staging-updateRetailers
  updateBrowserPluginRetailers: xxxx-xxxx-staging-updateBrowserPluginRetailers
  updateCategories: xxxx-xxxx-staging-updateCategories
layers:
  None

Stack Outputs
UpdateCategoriesLambdaFunctionQualifiedArn: arn:aws:lambda:xxxx:xxxx:function:xxxx-xxxx-staging-updateCategories:3
UpdateRetailersLambdaFunctionQualifiedArn: arn:aws:lambda:xxxx:xxxx:function:xxxx-xxxx-staging-updateRetailers:3
ServiceEndpoint: https://xxxx.execute-api.xxxx.amazonaws.com/staging
ServerlessDeploymentBucketName: xxxx-xxxx-staging-serverlessdeploymentbuck-b0ruqrf2fm9f
UpdateBrowserPluginRetailersLambdaFunctionQualifiedArn: arn:aws:lambda:xxxx:xxxx:function:xxxx-xxxx-staging-updateBrowserPluginRetailers:4

Serverless: [AWS sts 200 0.402s 0 retries] getCallerIdentity({})
Serverless: [AWS apigateway 200 0.227s 0 retries] getRestApis({ position: undefined, limit: 500 })
Serverless: [AWS apigateway 404 0.101s 0 retries] getStage({ restApiId: 'xxxx', stageName: 'staging' })
Serverless: [AWS apigateway 200 0.102s 0 retries] getDeployments({ restApiId: 'xxxx', limit: 500 })
Serverless: [AWS apigateway undefined 0.004s 0 retries] createStage({ deploymentId: null,
  restApiId: 'xxxx',
  stageName: 'staging' })

  Serverless Error ---------------------------------------

  ServerlessError: Missing required key 'deploymentId' in params
      at promise.catch.err (/usr/local/lib/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:317:27)
      at process._tickCallback (internal/process/next_tick.js:68:7)

Just want to highlight the last section

Serverless: [AWS apigateway undefined 0.004s 0 retries] createStage({ deploymentId: null,
  restApiId: 'xxxx',
  stageName: 'staging' })

The deploymentId is null. I can’t find anything in your documentation about this.

Similar or dependent issues:

Additional Data

  • Serverless Framework Version you’re using: 1.52.0
  • Operating System:
     Operating System:          darwin, Mac High Sierra, Version 10.13.6
     Node Version:              10.15.3
     Framework Version:         1.52.0
     Plugin Version:            2.0.0
     SDK Version:               2.1.1
  • Stack Trace:
  • Provider Error messages:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 11
  • Comments: 17 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, I faced exactly the same issue. I went to API Gateway and saw a lot of duplicate empty apis not removed from previous failed deployments. After I cleaned up API Gateway, the deployment worked.

I am also running into this error.

Serverless Error ---------------------------------------
 
  Missing required key 'deploymentId' in params
 

Here is my serverless.yml

service: cats

app: api-cats
org: xxxxxxx

provider:
  name: aws
  runtime: nodejs12.x

  stage: dev
  region: us-west-2

resources:
  Resources:
    MyApiGW:
      Type: AWS::ApiGateway::RestApi
      Properties:
        Name: MyApiGW

  Outputs:
    apiGatewayRestApiId:
      Value:
        Ref: MyApiGW
      Export:
        Name: MyApiGateway-restApiId

    apiGatewayRestApiRootResourceId:
      Value:
        Fn::GetAtt:
          - MyApiGW
          - RootResourceId
      Export:
        Name: MyApiGateway-rootResourceId

This error currently happens for following scenario:

  • AWS::ApiGateway::RestApi resource is configured in resources.Resources
  • No AWS::ApiGateway::Deployment resource configured for above Rest API
  • Service has either tracing, logging (implied by dashboard configuration) for API Gateway, or general tags configured.

It’ll be fixed shortly and published with next release

It also happens to me, but I found a (ugly as hell) workaround : using an older version of serverless framework.

1.62.0 => Doesn’t work, missing deploymentId error 1.54.0 => Works

Here the config file.

frameworkVersion: ">=1.0.0 <2.0.0"

service: 
  name: chatbot-resources 

provider:
  name: aws
  runtime: nodejs8.10
  stage: ${env:STAGE}
  region: eu-west-1
  deploymentBucket:
    name: mybucketname001-${self:provider.stage}
  tags:
    Name: ${self:service}
    Environment: ${env:STAGE}
    cost-center: mycostcenter

resources:
  Resources: 

    chatbotApiGateway:
      Type: "AWS::ApiGateway::RestApi"
      Properties:
        Name: "api-chatbot-${env:STAGE}"
        Description: "Api endpoints for chatbot resources"

    SSMChatbotApiGatewayRestId:
      Type: AWS::SSM::Parameter
      DependsOn: chatbotApiGateway
      Properties:
        Name: /${env:STAGE}/chatbot/api/rest-id
        Description: 'Rest id of the chatbot api gateway, ${env:STAGE} environment'
        Type: String
        Value: !Ref chatbotApiGateway

    SSMChatbotApiGatewayRootResourceId:
      Type: AWS::SSM::Parameter
      DependsOn: chatbotApiGateway
      Properties:
        Name: /${env:STAGE}/chatbot/api/root-resource-id
        Description: 'Root resource id of the chatbot api gateway, ${env:STAGE} environment'
        Type: String
        Value: !GetAtt chatbotApiGateway.RootResourceId```

Happens to me for a project which doesn’t have any lambdas with API GW attached, but has

apiGateway:
    minimumCompressionSize: 0

Could it be a reason?

@lqueiroga did help for me too. But the warning “You have exceeded the number of APIs you can delete per minute. Please try again soon.” wasn’t helping.