aws-cloudformation / aws-cloudformation/cloudformation-cli

Understanding Timeout Behaviour

Open
#514 0 comments 4 reactions 1 assignee Claimed by @wbingli View on GitHub
question
Dominant language
Python
Stars
336
Forks
172
Avg merge
3d 5m
Merged PRs (30d)
3

Description

Hi All,
It seems as though there are two places some sort of timeout can be set for determining when the create/update/delete handler should fail.

I see there's the timeoutInMinutes field here https://github.com/aws-cloudformation/aws-cloudformation-resource-schema - this looks to be a timeout that CloudFormation uses to determine when provisioning (create, update, delete) times out. I tested this and when the resource takes too long I see CloudFormation fails with "Resource timed out waiting for completion"

I also noticed there's a method in the AmazonWebServicesClientProxy class called ```backoffDelay``` https://github.com/aws-cloudformation/cloudformation-cli-java-plugin/blob/master/src/main/java/software/amazon/cloudformation/proxy/AmazonWebServicesClientProxy.java#L278. This seems to allow the handler code itself to determine when to timeout. I also tested this and saw the "Exceeded attempts to wait" error.

I'm wondering, is there any guidance for when either should be used? I'd like to use the ```backoffDelay``` method to control how frequently my handler is invoked during stabilization, but having to set a timeout via the ```Delay``` type this method accepts seems not clean when I've already set the timeout via timeoutInMinutes in the resource's schema (I could set the timeout to something way too high but this seems a bit hacky).

Cheers,
Andrew

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.