boto3_cfn

Connection module for Amazon Cloud Formation using boto3.

Renamed from boto_cfn to boto3_cfn and rewritten to use the boto3 cloudformation client APIs directly via saltext.boto3.utils.boto3mod. The legacy boto2 code path (object-style access, retry loops) has been removed.

depends:
  • boto3 >= 1.28.0

  • botocore >= 1.31.0

configuration:

This module accepts explicit Cloud Formation credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html

If IAM roles are not used you need to specify them either in the minion’s config file or as a profile. For example, to specify them in the minion’s config file:

cfn.keyid: GKTADJGHEIQSXMKKRBJ08H
cfn.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

A region may also be specified in the configuration:

cfn.region: us-east-1

It’s also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:

myprofile:
    keyid: GKTADJGHEIQSXMKKRBJ08H
    key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
    region: us-east-1

Added in version 1.0.0.

saltext.boto3.modules.boto3_cfn.__virtual__()[source]

Only load if boto3 is available.

saltext.boto3.modules.boto3_cfn.exists(name, region=None, key=None, keyid=None, profile=None)[source]

Check to see if a stack exists.

CLI Example:

salt myminion boto3_cfn.exists mystack region=us-east-1
saltext.boto3.modules.boto3_cfn.describe(name, region=None, key=None, keyid=None, profile=None)[source]

Describe a stack.

CLI Example:

salt myminion boto3_cfn.describe mystack region=us-east-1
saltext.boto3.modules.boto3_cfn.create(name, template_body=None, template_url=None, parameters=None, notification_arns=None, disable_rollback=None, timeout_in_minutes=None, capabilities=None, tags=None, on_failure=None, stack_policy_body=None, stack_policy_url=None, region=None, key=None, keyid=None, profile=None)[source]

Create a CFN stack.

CLI Example:

salt myminion boto3_cfn.create mystack template_url='https://s3.amazonaws.com/bucket/template.cft'         region=us-east-1
saltext.boto3.modules.boto3_cfn.update_stack(name, template_body=None, template_url=None, parameters=None, notification_arns=None, capabilities=None, tags=None, use_previous_template=None, stack_policy_during_update_body=None, stack_policy_during_update_url=None, stack_policy_body=None, stack_policy_url=None, region=None, key=None, keyid=None, profile=None)[source]

Update a CFN stack.

CLI Example:

salt myminion boto3_cfn.update_stack mystack template_url='https://s3.amazonaws.com/bucket/template.cft'         region=us-east-1
saltext.boto3.modules.boto3_cfn.delete(name, region=None, key=None, keyid=None, profile=None)[source]

Delete a CFN stack.

CLI Example:

salt myminion boto3_cfn.delete mystack region=us-east-1
saltext.boto3.modules.boto3_cfn.get_template(name, region=None, key=None, keyid=None, profile=None)[source]

Retrieve the template body of a CFN stack.

CLI Example:

salt myminion boto3_cfn.get_template mystack
saltext.boto3.modules.boto3_cfn.validate_template(template_body=None, template_url=None, region=None, key=None, keyid=None, profile=None)[source]

Validate cloudformation template.

CLI Example:

salt myminion boto3_cfn.validate_template mystack-template