stack

class cottonformation.core.stack.Stack[source]

Stack is an abstraction layer representing a CloudFormation stack.

All AWS Resource declaration logics should go to the method of a Stack object. Declare aws resource directly in python script without putting them into a method / function is a bad idea. If there’s a single line of code breaks, it breaks the entire scripts. And you have to comment in/out big chunk of code for debugging. But if you organize AWS Resource declaration logics in many methods. You can easily control the subset of the resources to create, the order of those resources to be created.

New in version 1.0.1.

property stack_name: str

CloudFormation stack name.

get_stack_data(bsm: boto_session_manager.manager.BotoSesManager) dict[source]

Get the boto3 cloudformation.describe_stacks response data that represent the current stack.

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudformation.html#CloudFormation.Client.describe_stacks

post_hook()[source]

A user custom post stack initialization hook function. Will be executed after object initialization.