Skip to main content

AWS CloudFormation Resource Provider Python Plugin

The CloudFormation CLI (cfn) allows you to author your own resource providers that can be used by CloudFormation.

This plugin library helps to provide Python runtime bindings for the execution of your providers by CloudFormation.

AWS CloudFormation Resource Provider Python Plugin

The CloudFormation Resource Provider Development Kit (RPDK) allows you to author your own resource providers that can be used by CloudFormation.

This plugin library helps to provide runtime bindings for the execution of your providers by CloudFormation.

Build Status

Installation

pip install cloudformation-cli-python-plugin

Howto

$ cfn init
Initializing new project
What's the name of your resource type?
(Organization::Service::Resource)
>> Foo::Bar::Baz
Select a language for code generation:
[1] java
[2] csharp
[3] python36
[4] python37
(enter an integer):
>> 4
Use docker for platform-independent packaging (Y/n)?
This is highly recommended unless you are experienced
with cross-platform Python packaging.
>> y
Initialized a new project in <>
$ cfn submit --dry-run
$ cat <<EOT > test.json
{
  "credentials": {
    "accessKeyId": "",
    "secretAccessKey": "",
    "sessionToken": ""
  },
  "action": "CREATE",
  "request": {
    "clientRequestToken": "ecba020e-b2e6-4742-a7d0-8a06ae7c4b2b",
    "desiredResourceState": {
      "Title": "This_Is_The_Title_For_My_Example",
      "TestCode": "NOT_STARTED"
    },
    "previousResourceState": null,
    "logicalResourceIdentifier": null
  },
  "callbackContext": null
}
EOT
$ sam local invoke TestEntrypoint --event test.json

Development

For changes to the plugin, a Python virtual environment is recommended. The development requirements can be sourced from the core repository:

python3 -m venv env
source env/bin/activate
pip install -e . -e src/ \
  -r https://raw.githubusercontent.com/aws-cloudformation/aws-cloudformation-rpdk/master/requirements.txt
pre-commit install

Linting and running unit tests is done via pre-commit, and so is performed automatically on commit. The continuous integration also runs these checks. Manual options are available so you don't have to commit):

# run all hooks on all files, mirrors what the CI runs
pre-commit run --all-files
# run unit tests only. can also be used for other hooks, e.g. black, flake8, pylint-local
pre-commit run pytest-local

License

This library is licensed under the Apache 2.0 License.

Release files for cloudformation-cli-python-plugin 2.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloudformation-cli-python-plugin 2.1.3
File Size Uploaded
cloudformation-cli-python-plugin-2.1.3.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cloudformation-cli-python-plugin 2.1.3
File Interpreter ABI Platform
cloudformation_cli_python_plugin-2.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 31.9 kB

Release files / cloudformation-cli-python-plugin-2.1.3.tar.gz

Download URL cloudformation-cli-python-plugin-2.1.3.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fbcab928c980af1b40e8fd645183b9f43649a87604747cf7a0ac7ac384e01c24
BLAKE2b-256 checksum
How to use checksums
5e9d3dae75b2c092c87935f4bb1ea8e57dfd3905c2eb92292c2ef8582b63b485
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Release files / cloudformation_cli_python_plugin-2.1.3-py3-none-any.whl

Download URL cloudformation_cli_python_plugin-2.1.3-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1fc65d8ad4d3951cb44dacbb23d782b171a52807ccebc78363d92e0615708d2e
BLAKE2b-256 checksum
How to use checksums
5df99bd654c5bcc1daf184ff8f300c62d12f24d99c5c0185641a0211373efe35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Release history Release notifications | RSS feed

2.1.10

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

This release

2.1.3 This release

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page