runway.cfngin.actions.init module

CFNgin init action.

class runway.cfngin.actions.init.Action[source]

Bases: runway.cfngin.actions.base.BaseAction

Initialize environment.

__init__(context: CfnginContext, provider_builder: Optional[ProviderBuilder] = None, cancel: Optional[threading.Event] = None)[source]

Instantiate class.

This class creates a copy of the context object prior to initialization as some of it can perform destructive actions on the context object.

  • context – The context for the current run.

  • provider_builder – An object that will build a provider that will be interacted with in order to perform the necessary actions.

  • cancel – Cancel handler.

property cfngin_bucket: Optional[]

CFNgin bucket.


CfnginBucketRequired – cfngin_bucket not defined.

property default_cfngin_bucket_stack: runway.config.models.cfngin.CfnginStackDefinitionModel

CFNgin bucket stack.

run(*, concurrency: int = 0, dump: Union[bool, str] = False, force: bool = False, outline: bool = False, tail: bool = False, upload_disabled: bool = True, **_kwargs: Any) None[source]

Run the action.

  • concurrency – The maximum number of concurrent deployments.

  • dump – Not used by this action

  • force – Not used by this action.

  • outline – Not used by this action.

  • tail – Tail the stack’s events.

  • upload_disabled – Not used by this action.


CfnginBucketAccessDenied – Could not head cfngin_bucket.

pre_run(*, dump: Union[bool, str] = False, outline: bool = False, **_Action__kwargs: Any) None[source]

Do nothing.

post_run(*, dump: Union[bool, str] = False, outline: bool = False, **_Action__kwargs: Any) None[source]

Do nothing.

build_provider() Provider

Build a CFNgin provider.

ensure_cfn_bucket() None

CloudFormation bucket where templates will be stored.

execute(**kwargs: Any) None

Run the action with pre and post steps.

property provider: Provider

Return a generic provider using the default region.

Used for running things like hooks.

s3_stack_push(blueprint: Blueprint, force: bool = False) str

Push the rendered blueprint’s template to S3.

Verifies that the template doesn’t already exist in S3 before pushing.


URL to the template in S3.

stack_template_url(blueprint: Blueprint) str

S3 URL for CloudFormation template object.