Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudFormation is very slow

I have a stack with:

  • API Gateway
  • Lambda
  • Kinesis

When deleting this CloudFormation stack from the AWS console, the process is very slow.

Everything works fine until you execute the exclusion of 'AWS :: Lambda :: Function' -> 'CloudFormation is waiting for NetworkInterfaces associated with the Lambda Function to be cleaned up.'

The time in this process takes about 30 minutes.

Has anyone had the same problem?

like image 859
fuzeto Avatar asked Feb 16 '18 13:02

fuzeto


People also ask

How long until CloudFormation time is out?

The Timeout property determines how long Amazon CloudFormation waits for the requisite number of success signals. Timeout is a minimum-bound property, meaning the timeout occurs no sooner than the time you specify, but can occur shortly thereafter. The maximum time that you can specify is 43200 seconds (12 hours ).

Is CloudFormation better than Terraform?

If you are looking to provision services on multiple cloud platforms, Terraform is your go-to option. While Terraform supports all cloud vendors like AWS, GCP, Azure, and many others, CloudFormation is confined only to AWS. So, in case your environment involves multiple cloud deployments, Cloudformation is not for you.

Why is my CloudFormation stack stuck in the Update_rollback_complete_cleanup_in_progress or Update_complete_cleanup_in_progress state?

A CloudFormation stack gets stuck in the UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS or UPDATE_COMPLETE_CLEANUP_IN_PROGRESS state when: CloudFormation is still in the process of removing old resources, or can't remove those resources due to a dependency issue.

What are limitations of CloudFormation?

The new per template limits for the maximum number of resources is 500 (previously 200), parameters is 200 (previously 60), mappings is 200 (previously 100), and outputs is 200 (previously 60). CloudFormation allows you to model and provision cloud resources as code in a safe, predictable, and scalable manner.


1 Answers

To prevent this from blocking the stack deletion, you could set a DeletionPolicy property to Retain for that specific Lambda and have another scheduled process that would clean up each day the orphaned Lambdas.

like image 98
Laurent Jalbert Simard Avatar answered Sep 27 '22 17:09

Laurent Jalbert Simard