CloudFormation helpers

What is this?

The following methods are added to clients instantiated using Betterboto:

Methods

betterboto.cloudformation.create_or_update(self, **kwargs)[source]

For the given template and stack name, this method will create a stack if it doesnt already exist otherwise it will generate a changeset and then execute it. This method will wait for the operation to complete before returning and in the instance of an error it will print out the stack events to help you debug more easily.

Parameters
  • self – cloudformation client

  • kwargs – these are passed onto the create_stack and create_change_set method calls

Returns

None

betterboto.cloudformation.describe_stacks_single_page(self, **kwargs)[source]

This will continue to call describe_stacks until there are no more pages left to retrieve. It will return the aggregated response in the same structure as describe_stacks does.

Parameters
  • self – servicecatalog client

  • kwargs – these are passed onto the describe_stacks method call

Returns

servicecatalog_client.describe_stacks.response

betterboto.cloudformation.ensure_deleted(self, StackName)[source]

This will check if there is a stack with the given StackName in a state that can be deleted. If there is, it will delete it.

Parameters
  • self – cloudformation client

  • StackName – This is the name of the stack that should be deleted

Returns

None

betterboto.cloudformation.list_stacks_single_page(self, **kwargs)[source]

This will continue to call list_stacks until there are no more pages left to retrieve. It will return the aggregated response in the same structure as list_stacks does.

Parameters
  • self – servicecatalog client

  • kwargs – these are passed onto the list_stacks method call

Returns

servicecatalog_client.list_stacks.response