zfq308 / cfn-get-export-value

Get an Export value in AWS CloudFormation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cfn-get-export-value

Retrieve a AWS CloudFormation exported value by its name

Build Status

Motivation

AWS exposes an API to list CloudFormation exports. However, retrieving the value of a particular export requires that you iterate over all the exports. This module aims to make this process easier.

Installation

pip install cfn_get_export_value

Usage

Suppose you have a CloudFormation stack that has an Output that exports its value (some-value) by the name some-name. You can retrieve the value of some-name like this:

from cfn_get_export_value import get_export_value

value = get_export_value('some-name')
# value: "some-value"

You can also specify a boto3 session argument:

get_export_value('some-name', session=some_session)

About

Get an Export value in AWS CloudFormation

License:MIT License


Languages

Language:Python 100.0%