question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serverless Rate exceeded for Cloudformation API

See original GitHub issue

Hi there! I have an issue connected with throttling on CloudFormation API. Screenshot 2020-08-03 at 11 51 47

Right now there is:

  • 26 functions
  • 3 dynamo tables, 1 sqs queue.
  • sum: 160 cf resources

The issue occurs on the serverless deployment

  ServerlessError: An error occurred: 
BroadcastToClientsEventSourceMappingDynamodbChannelsMessagesTable - Rate exceeded for operation 'Rate exceeded (Service: Lambda, Status Code: 429, Request ID: b8b7796b-e9d7-4c84-9615-7d2a98c1c85b, Extended Request ID: null)
'..node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:125:33
  From previous event:
      at AwsDeploy.monitorStack (node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:28:12)
      at node_modules/serverless/lib/plugins/aws/lib/updateStack.js:115:28

I’m pasting cloudformation error. Its always the same on sqs and dynamodb stream events mapping.

This is my investigation:

  1. CloudFormation resources limit ~160 - checked
  2. Resources names limit (64) - I renamed to resources to the shortnames & error still occurs randomly - checked Core issue always comes from EventSourceMapping resource creation. ie. (BroadcastToClientsEventSourceMappingDynamodbChannelsMessagesTable - Rate exceeded for operation 'Rate exceeded (Service: Lambda, Status Code: 429)
  3. Error occurs only on “new stack creation” - all resources are triggered to deploy and then cloudformation returns rate exceed response on EventSourceMapping resource - checked
  4. Deploying new stack needs to comment 50% of the functions in the resources files - checked
  5. Splitting plugin doesn’t help in type/group mode
serverless.yml
broadcastToClients:
  handler: bin/broadcastToClients
  package:
    include:
      - bin/broadcastToClients
  events:
    - stream:
        type: dynamodb
        batchSize: 1
        enabled: true
        startingPosition: LATEST
        arn:
          Fn::GetAtt:
            - channelsMessagesTable
            - StreamArn


channelBackup:
  handler: bin/channelBackup
  package:
    include:
      - bin/channelBackup
  events:
    - sqs:
        exist: true
        arn:
          Fn::GetAtt:
            - backupQueue
            - Arn
deploy command
sls deploy --verbose --stage xyz
 Node Version:              12.18.1
 Framework Version:         1.73.1
 Plugin Version:            3.6.14
 SDK Version:               2.3.1
 Components Version:        2.31.6

Installed version

1.73.1

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:9
  • Comments:39 (17 by maintainers)

github_iconTop GitHub Comments

7reactions
herebeboganscommented, Aug 18, 2020

I got an update from our TAM that the issue has been reported by a number of customers and is being investigated by the Lambda service team.

4reactions
adrianbanasiakcommented, Aug 4, 2020

These are not serverless throttling api call errors you are seeing - they are on the cloudformation AWS side. You will see simliar errors if you try to create to many concurrent Dynamo tables or Kinesis streams in a CF template.

Of course they ar not, it states in the error message that they are coming from AWS.

I am reporting that because in my opinion Serverless should be able to work around such cases or tell user what to check or modify in order to deploy its stack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rate exceeded · Issue #3821 · serverless/serverless - GitHub
I suppose I've reached a limit for cloudformation's API calls (DescribeStack for instance). Is there any chance to avoid this error except of ......
Read more >
Serverless Error: Rate exceeded - Seed.run
This error happens when multiple Serverless services are being removed concurrently. It happens because Serverless Framework makes a series of ...
Read more >
How do I prevent "Rate exceeded" errors in CloudFormation?
The Rate exceeded error occurs when API calls to an AWS service exceed the maximum allowed API requests, and the API calls are...
Read more >
Throttling: Rate exceeded error in AWS Serverless
This error happens when multiple Serverless services are being removed concurrently. It happens because Serverless Framework makes a series of ...
Read more >
Rate exceed (Service: AWSSimpleSystemsManagement)
When I deploy serverless framework to AWS cloudformation stack ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found