Skip to content

An error occurred (Throttling) when calling the DescribeStacks operation (reached max retries: 4) #2671

@smurphnturf

Description

@smurphnturf

Relates to:

No response to comments on:
#1610

Description:

When running sam deploy with of two multiple stacks in parallel, Cloud Formation throttles SAM for calling describe-stacks too many times. Cloud Formation rate caps describe-stacks to 5 calls per second and this cannot be increased. In particular, this happens when two different provisioned lambdas are deployed with sam deploy as each deployment can take a few minutes

Steps to reproduce:

Deploy two provisioned lambdas in parallel at the same time

Observed result:

2021-02-15 22:49:02 - Waiting for stack create/update to complete

CloudFormation events from changeset
-------------------------------------------------------------------------------------------------
ResourceStatus           ResourceType             LogicalResourceId        ResourceStatusReason   
-------------------------------------------------------------------------------------------------
CREATE_IN_PROGRESS       AWS::Lambda::LayerVers   RenderedPromotionReade   -                      
                         ion                      rDependenciesLayerOne9                          
                                                  4c42c52c2                                       
CREATE_IN_PROGRESS       AWS::Lambda::LayerVers   PromotionSubscriptionH   -                      
                         ion                      andlerDependenciesLaye                          
                                                  rOnefb4f0ee29e                                  
CREATE_COMPLETE          AWS::Lambda::LayerVers   RenderedPromotionReade   -                      
                         ion                      rDependenciesLayerOne9                          
                                                  4c42c52c2                                       
CREATE_IN_PROGRESS       AWS::Lambda::LayerVers   RenderedPromotionReade   Resource creation      
                         ion                      rDependenciesLayerOne9   Initiated              
                                                  4c42c52c2                                       
CREATE_COMPLETE          AWS::Lambda::LayerVers   PromotionSubscriptionH   -                      
                         ion                      andlerDependenciesLaye                          
                                                  rOnefb4f0ee29e                                  
CREATE_IN_PROGRESS       AWS::Lambda::LayerVers   PromotionSubscriptionH   Resource creation      
                         ion                      andlerDependenciesLaye   Initiated              
                                                  rOnefb4f0ee29e                                  
UPDATE_IN_PROGRESS       AWS::Lambda::Function    RenderedPromotionReade   -                      
                                                  rFunction                                       
UPDATE_IN_PROGRESS       AWS::Lambda::Function    PromotionSubscriptionH   -                      
                                                  andler                                          
UPDATE_COMPLETE          AWS::Lambda::Function    RenderedPromotionReade   -                      
                                                  rFunction                                       
UPDATE_COMPLETE          AWS::Lambda::Function    PromotionSubscriptionH   -                      
                                                  andler                                          
CREATE_IN_PROGRESS       AWS::Lambda::Version     RenderedPromotionReade   -                      
                                                  rFunctionVersion36271c                          
                                                  89da                                            
CREATE_COMPLETE          AWS::Lambda::Version     RenderedPromotionReade   -                      
                                                  rFunctionVersion36271c                          
                                                  89da                                            
CREATE_IN_PROGRESS       AWS::Lambda::Version     RenderedPromotionReade   Resource creation      
                                                  rFunctionVersion36271c   Initiated              
                                                  89da                                            
UPDATE_IN_PROGRESS       AWS::Lambda::Alias       RenderedPromotionReade   -                      
                                                  rFunctionAliasLIVE                              
UPDATE_IN_PROGRESS       AWS::Lambda::Alias       RenderedPromotionReade   CodeDeploy deployment  
                                                  rFunctionAliasLIVE       started: d-P9KXYZBA8   
UPDATE_COMPLETE          AWS::Lambda::Alias       RenderedPromotionReade   -                      
                                                  rFunctionAliasLIVE                              
DELETE_IN_PROGRESS       AWS::Lambda::LayerVers   PromotionSubscriptionH   -                      
                         ion                      andlerDependenciesLaye                          
                                                  rOne6b3fdbaffc                                  
UPDATE_COMPLETE_CLEANU   AWS::CloudFormation::S   merchant-web-receipt-    -                      
P_IN_PROGRESS            tack                     private-api                                     
UPDATE_COMPLETE          AWS::CloudFormation::S   merchant-web-receipt-    -                      
                         tack                     private-api                                     
DELETE_COMPLETE          AWS::Lambda::LayerVers   RenderedPromotionReade   -                      
                         ion                      rDependenciesLayerOne5                          
                                                  65bc2990a                                       
DELETE_COMPLETE          AWS::Lambda::LayerVers   PromotionSubscriptionH   -                      
                         ion                      andlerDependenciesLaye                          
                                                  rOne6b3fdbaffc                                  
DELETE_SKIPPED           AWS::Lambda::Version     RenderedPromotionReade   -                      
                                                  rFunctionVersion185d80                          
                                                  2470                                            
-------------------------------------------------------------------------------------------------
Uploading to merchant-web-receipt-private-api/7b9bb1bb6f3347dba1c8f763ce1ba304.template  8546 / 8546.0  (100.00%)
Error: Failed to get outputs from stack: merchant-web-receipt-private-api, An error occurred (Throttling) when calling the DescribeStacks operation (reached max retries: 4): Rate exceeded

Expected result:

Successful deployment

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Both macOS Catalina 10.15.5 and Debian “Buster” 10 (python:3.8.2-slim-buster)
  2. sam --version: SAM CLI, version 1.17.0
  3. AWS region: ap-southeast-2

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/deploysam deploy commandstage/pm-reviewWaiting for review by our Product Manager, please don't work on this yetstage/waiting-for-releaseFix has been merged to develop and is waiting for a releasetype/featureFeature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions