Can I change AWS CloudFormation hooks timeout

0

Is there any way to increase timeout when hooks are called during stack operations? It seems to set to 30 seconds, and I cannot find if it could be configured.

已提問 1 年前檢視次數 358 次
1 個回答
3

Yes, you can change the timeout for AWS CloudFormation hooks by specifying the Timeout property in your CloudFormation stack template.

The Timeout property specifies the amount of time, in minutes, that AWS CloudFormation should wait for the hook to complete before timing out. By default, the timeout for hooks is set to 30 minutes.

To change the timeout, you can add the Timeout property to your CloudFormation resource that uses the hook. For example, if you have a resource named MyCustomResource that uses a hook, you can add the Timeout property to the resource definition as follows:

MyCustomResource:
  Type: Custom::MyCustomResource
  Properties:
    ...
    Timeout: 60

In the example above, the Timeout property is set to 60 minutes (1 hour). You can adjust the value as needed for your specific use case.

Note that increasing the timeout for hooks may increase the total time it takes for your stack operation to complete, so it's important to balance the timeout value with the overall operation duration.

profile picture
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南