Python usage

To visualise changes in your Python script, import the StackDiff class.

class stackdiff.StackDiff(change: str, stack: str, session: Optional[boto3.session.Session] = None)

Visualises the changes described by an Amazon Web Services CloudFormation change set.

Parameters
  • change – ARN, ID or name of the CloudFormation change set to visualise

  • session – boto3 session (defaults to a new session)

  • stack – ARN, ID or name of the change set’s CloudFormation stack

property change_template: str

Gets the change set’s proposed template.

render_changes(writer: Optional[IO[str]] = None) None

Renders a visualisation of the changes that CloudFormation would apply if the change set was executed.

Parameters

writer – Writer (defaults to stdout)

render_differences(writer: Optional[IO[str]] = None) None

Renders a visualisation of the differences between the stack’s current template and the change set’s proposed template.

Parameters

writer – Writer (defaults to stdout)

property stack_template: str

Gets the stack’s current template.