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

Reduce cloudformation deploy command polling delay #2686

Merged
merged 2 commits into from
Jul 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/enhancement-Cloudformation-90843.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"category": "Cloudformation",
"type": "enhancement",
"description": "Reduce polling delay for `cloudformation deploy`."
}
8 changes: 6 additions & 2 deletions awscli/customizations/cloudformation/deployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def wait_for_changeset(self, changeset_id, stack_name):

# Wait for changeset to be created
waiter = self._client.get_waiter("change_set_create_complete")
# Poll every 10 seconds. Changeset creation should be fast
waiter.config.delay = 10
# Poll every 5 seconds. Changeset creation should be fast
waiter.config.delay = 5
try:
waiter.wait(ChangeSetName=changeset_id, StackName=stack_name)
except botocore.exceptions.WaiterError as ex:
Expand Down Expand Up @@ -169,6 +169,10 @@ def wait_for_execute(self, stack_name, changeset_type):
raise RuntimeError("Invalid changeset type {0}"
.format(changeset_type))

# Poll every 5 seconds. Optimizing for the case when the stack has only
# minimal changes, such the Code for Lambda Function
waiter.config.delay = 5

try:
waiter.wait(StackName=stack_name)
except botocore.exceptions.WaiterError as ex:
Expand Down