Skip to content

Feature request: remove unnecessary describe-stack calls during deploy #3911

@BourgoisMickael

Description

@BourgoisMickael

Describe your idea/feature/enhancement

Prevent throttling during sam deploy by reducing requests.

Proposal

After my last PR #3500, I saw that during sam deploy, the function describe_stack_events sends 2 requests for each iteration:

  • DescribeStacks: to retrieve the status and end the loop if it's not IN_PROGRESS
  • DescribeStackEvents: to display the deployment events

The DescribeStacks could be skipped as the status should be accessible via the DescribeStackEvents:

{
    "StackId": "arn:aws:cloudformation:region:xxx:stack/my-stack/an-id",
    "EventId": "abc",
    "StackName": "my-stack",
    "LogicalResourceId": "my-stack",
    "PhysicalResourceId": "arn:aws:cloudformation:region:xxx:stack/my-stack/an-id",
    "ResourceType": "AWS::CloudFormation::Stack",
    "Timestamp": "2022-04-27T16:00:33.955000+00:00",
    "ResourceStatus": "UPDATE_COMPLETE"
}

So we could check the ResourceStatus when StackId = PhysicalResourceId and StackName = LogicalResourceId


This could be done to fix part of the bug: #3910

Metadata

Metadata

Assignees

No one assigned

    Labels

    stage/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