{"id":24362686,"url":"https://github.com/machu-gwu/aws_cloudformation-project","last_synced_at":"2026-05-07T17:36:54.366Z","repository":{"id":64421150,"uuid":"575203256","full_name":"MacHu-GWU/aws_cloudformation-project","owner":"MacHu-GWU","description":"⭐ AWS CloudFormation deployment for human, Enable terraform plan, terraform apply styled deployment. ","archived":false,"fork":false,"pushed_at":"2023-11-16T05:58:33.000Z","size":398,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-27T02:51:20.952Z","etag":null,"topics":["automation","aws","cloud","cloudformation","infrastructure-as-code","terraform"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MacHu-GWU.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst"}},"created_at":"2022-12-07T01:27:56.000Z","updated_at":"2022-12-08T04:46:46.000Z","dependencies_parsed_at":"2023-12-19T11:02:42.437Z","dependency_job_id":null,"html_url":"https://github.com/MacHu-GWU/aws_cloudformation-project","commit_stats":{"total_commits":124,"total_committers":2,"mean_commits":62.0,"dds":"0.032258064516129004","last_synced_commit":"038450f4ef28e869cf12bc625728f828c3fcc567"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MacHu-GWU/aws_cloudformation-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacHu-GWU%2Faws_cloudformation-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacHu-GWU%2Faws_cloudformation-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacHu-GWU%2Faws_cloudformation-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacHu-GWU%2Faws_cloudformation-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MacHu-GWU","download_url":"https://codeload.github.com/MacHu-GWU/aws_cloudformation-project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MacHu-GWU%2Faws_cloudformation-project/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263868248,"owners_count":23522317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","aws","cloud","cloudformation","infrastructure-as-code","terraform"],"created_at":"2025-01-18T22:53:13.075Z","updated_at":"2026-05-07T17:36:54.329Z","avatar_url":"https://github.com/MacHu-GWU.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://readthedocs.org/projects/aws_cloudformation/badge/?version=latest\n        :target: https://aws_cloudformation.readthedocs.io/index.html\n        :alt: Documentation Status\n\n.. image:: https://github.com/MacHu-GWU/aws_cloudformation-project/workflows/CI/badge.svg\n    :target: https://github.com/MacHu-GWU/aws_cloudformation-project/actions?query=workflow:CI\n\n.. image:: https://codecov.io/gh/MacHu-GWU/aws_cloudformation-project/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/MacHu-GWU/aws_cloudformation-project\n\n.. image:: https://img.shields.io/pypi/v/aws_cloudformation.svg\n    :target: https://pypi.python.org/pypi/aws_cloudformation\n\n.. image:: https://img.shields.io/pypi/l/aws_cloudformation.svg\n    :target: https://pypi.python.org/pypi/aws_cloudformation\n\n.. image:: https://img.shields.io/pypi/pyversions/aws_cloudformation.svg\n    :target: https://pypi.python.org/pypi/aws_cloudformation\n\n.. image:: https://img.shields.io/badge/Release_History!--None.svg?style=social\n    :target: https://github.com/MacHu-GWU/aws_cloudformation-project/blob/main/release-history.rst\n\n.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social\n    :target: https://github.com/MacHu-GWU/aws_cloudformation-project\n\n------\n\n.. image:: https://img.shields.io/badge/Link-Document-blue.svg\n    :target: https://aws_cloudformation.readthedocs.io/index.html\n\n.. image:: https://img.shields.io/badge/Link-API-blue.svg\n    :target: https://aws_cloudformation.readthedocs.io/py-modindex.html\n\n.. image:: https://img.shields.io/badge/Link-Source_Code-blue.svg\n    :target: https://aws_cloudformation.readthedocs.io/py-modindex.html\n\n.. image:: https://img.shields.io/badge/Link-Install-blue.svg\n    :target: `install`_\n\n.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg\n    :target: https://github.com/MacHu-GWU/aws_cloudformation-project\n\n.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg\n    :target: https://github.com/MacHu-GWU/aws_cloudformation-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg\n    :target: https://github.com/MacHu-GWU/aws_cloudformation-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Download-blue.svg\n    :target: https://pypi.org/pypi/aws_cloudformation#files\n\n\nWelcome to ``aws_cloudformation`` Documentation\n==============================================================================\nAWS CloudFormation deployment for human, Enable ``terraform plan``, ``terraform apply`` styled deployment.\n\n**Features**:\n\n1. Preview the change set details before deployment.\n2. Automatically upload big template to S3 before deployment, even for nested template.\n3. Support SYNC call for deployment and deletion, wait until it success or fail (the original API is ASYNC call).\n4. Allow prompt for user to enter \"YES\" to proceed.\n5. Provide hyperlink for one-click to jump to the Console to preview.\n\n.. contents:: Table of Content\n    :class: this-will-duplicate-information-and-it-is-still-useful-here\n    :depth: 1\n    :local:\n\n\nTalk is cheap, show me the code\n------------------------------------------------------------------------------\n⭐ **Console Output**:\n\n.. code-block:: bash\n\n    ============== Deploy stack: 'cottonformation-deploy-stack-test' ===============\n      preview stack in AWS CloudFormation console: https://console.aws.amazon.com/cloudformation/home?#/stacks?filteringStatus=active\u0026filteringText=cottonformation-deploy-stack-test\u0026viewNested=true\u0026hideStacks=false\n      preview **change set details** at: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/changesets/changes?stackId=arn:aws:cloudformation:us-east-1:111122223333:stack/cottonformation-deploy-stack-test/0c5596c0-76b4-11ed-92b1-0a0bcad48579\u0026changeSetId=arn:aws:cloudformation:us-east-1:111122223333:changeSet/cottonformation-deploy-stack-test-2022-12-08-04-51-58-892/8c88d0c1-d5c7-495b-820e-29e5752a04d4\n      wait for change set creation to finish ...\n        on 1 th attempt, elapsed 5 seconds, remain 55 seconds ...\n        reached status CREATE_COMPLETE\n    +---------------------------- Change Set Statistics -----------------------------\n    | 🟢 Add        1 Resource\n    |\n    +--------------------------------------------------------------------------------\n    +----------------------------------- Changes ------------------------------------\n    | 🟢 📦 Add Resource:        Secret1    AWS::SecretsManager::Secret\n    |\n    +--------------------------------------------------------------------------------\n        need to execute the change set to apply those changes.\n      preview **create stack progress** at: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/stackinfo?filteringText=cottonformation-deploy-stack-test\u0026viewNested=true\u0026hideStacks=false\u0026stackId=arn:aws:cloudformation:us-east-1:111122223333:stack/cottonformation-deploy-stack-test/0c5596c0-76b4-11ed-92b1-0a0bcad48579\u0026filteringStatus=active\n      wait for deploy to finish ...\n        on 2 th attempt, elapsed 10 seconds, remain 50 seconds ...\n        reached status 🟢 'CREATE_COMPLETE'\n      done\n\n\n    ============== Deploy stack: 'cottonformation-deploy-stack-test' ===============\n      preview stack in AWS CloudFormation console: https://console.aws.amazon.com/cloudformation/home?#/stacks?filteringStatus=active\u0026filteringText=cottonformation-deploy-stack-test\u0026viewNested=true\u0026hideStacks=false\n      preview **change set details** at: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/changesets/changes?stackId=arn:aws:cloudformation:us-east-1:111122223333:stack/cottonformation-deploy-stack-test/0c5596c0-76b4-11ed-92b1-0a0bcad48579\u0026changeSetId=arn:aws:cloudformation:us-east-1:111122223333:changeSet/cottonformation-deploy-stack-test-2022-12-08-04-52-39-134/8e1fd139-7a37-43dd-9378-40a328970036\n      wait for change set creation to finish ...\n        on 1 th attempt, elapsed 5 seconds, remain 55 seconds ...\n        reached status CREATE_COMPLETE\n    +---------------------------- Change Set Statistics -----------------------------\n    | 🟢 Add        1 Resource\n    | 🔵 Modify     1 Resource\n    |\n    +--------------------------------------------------------------------------------\n    +----------------------------------- Changes ------------------------------------\n    | 🟢 📦 Add Resource:        Secret222    AWS::SecretsManager::Secret\n    | 🔵 📦 Modify Resource:     Secret1      AWS::SecretsManager::Secret\n    |     🔵 💡 Properties:      Secret1      AWS::SecretsManager::Secret.Description\n    |     🔵 💡 Tags:            Secret1      AWS::SecretsManager::Secret\n    |\n    +--------------------------------------------------------------------------------\n        need to execute the change set to apply those changes.\n      preview **update stack progress** at: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/stackinfo?filteringText=cottonformation-deploy-stack-test\u0026viewNested=true\u0026hideStacks=false\u0026stackId=arn:aws:cloudformation:us-east-1:111122223333:stack/cottonformation-deploy-stack-test/0c5596c0-76b4-11ed-92b1-0a0bcad48579\u0026filteringStatus=active\n      wait for deploy to finish ...\n        on 3 th attempt, elapsed 15 seconds, remain 45 seconds ...\n        reached status 🟢 'UPDATE_COMPLETE'\n      done\n\n\n    ============== Deploy stack: 'cottonformation-deploy-stack-test' ===============\n      preview stack in AWS CloudFormation console: https://console.aws.amazon.com/cloudformation/home?#/stacks?filteringStatus=active\u0026filteringText=cottonformation-deploy-stack-test\u0026viewNested=true\u0026hideStacks=false\n      preview **change set details** at: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/changesets/changes?stackId=arn:aws:cloudformation:us-east-1:111122223333:stack/cottonformation-deploy-stack-test/0c5596c0-76b4-11ed-92b1-0a0bcad48579\u0026changeSetId=arn:aws:cloudformation:us-east-1:111122223333:changeSet/cottonformation-deploy-stack-test-2022-12-08-04-53-07-499/6edbcdf2-8e27-463f-bc5f-35587463fceb\n      wait for change set creation to finish ...\n        on 2 th attempt, elapsed 10 seconds, remain 50 seconds ...\n        reached status CREATE_COMPLETE\n    +---------------------------- Change Set Statistics -----------------------------\n    | 🟢 Add        1 Resource\n    | 🔵 Modify     1 Resource\n    | 🔴 Remove     1 Resource\n    |\n    +--------------------------------------------------------------------------------\n    +----------------------------------- Changes ------------------------------------\n    | 🟢 📦 Add Resource:        Secret33333    AWS::SecretsManager::Secret\n    | 🔵 📦 Modify Resource:     Secret222      AWS::SecretsManager::Secret\n    |     🔵 💡 Properties:      Secret222      AWS::SecretsManager::Secret.Description\n    |     🔵 💡 Metadata:        Secret222      AWS::SecretsManager::Secret\n    |     🔵 💡 CreationPolicy:  Secret222      AWS::SecretsManager::Secret\n    |     🔵 💡 UpdatePolicy:    Secret222      AWS::SecretsManager::Secret\n    |     🔵 💡 Tags:            Secret222      AWS::SecretsManager::Secret\n    | 🔴 📦 Remove Resource:     Secret1        AWS::SecretsManager::Secret\n    |\n    +--------------------------------------------------------------------------------\n        need to execute the change set to apply those changes.\n      preview **update stack progress** at: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/stackinfo?filteringText=cottonformation-deploy-stack-test\u0026viewNested=true\u0026hideStacks=false\u0026stackId=arn:aws:cloudformation:us-east-1:111122223333:stack/cottonformation-deploy-stack-test/0c5596c0-76b4-11ed-92b1-0a0bcad48579\u0026filteringStatus=active\n      wait for deploy to finish ...\n        on 3 th attempt, elapsed 15 seconds, remain 45 seconds ...\n        reached status 🟢 'UPDATE_COMPLETE'\n      done\n\n\n    =============== Remove stack 'cottonformation-deploy-stack-test' ===============\n      preview stack in AWS CloudFormation console: https://console.aws.amazon.com/cloudformation/home?#/stacks?filteringStatus=active\u0026filteringText=cottonformation-deploy-stack-test\u0026viewNested=true\u0026hideStacks=false\n      wait for delete to finish ...\n        on 1 th attempt, elapsed 5 seconds, remain 55 seconds ...\n        already deleted.\n      done\n\n\n⭐ **CloudFormation declaration**, see `cottonformation \u003chttps://github.com/MacHu-GWU/cottonformation-project\u003e`_:\n\n.. code-block:: python\n\n    # -*- coding: utf-8 -*-\n\n    import cottonformation as cf\n    from cottonformation.res import secretsmanager\n\n\n    def make_tpl_1() -\u003e cf.Template:\n        \"\"\"\n        Create Secret1\n        \"\"\"\n        tpl = cf.Template()\n\n        secret1 = secretsmanager.Secret(\n            \"Secret1\",\n            p_Name=\"aws_cft_secret1\",\n            p_Description=\"This is Secret 1\",\n            p_Tags=[\n                cf.Tag(p_Key=\"Creator\", p_Value=\"Alice\"),\n                cf.Tag(p_Key=\"Description\", p_Value=\"Hello\"),\n            ]\n        )\n        tpl.add(secret1)\n\n        return tpl\n\n\n    def make_tpl_2() -\u003e cf.Template:\n        \"\"\"\n        Modify Secret1\n        Create Secret222\n        \"\"\"\n        tpl = make_tpl_1()\n\n        secret1: secretsmanager.Secret = tpl.Resources[\"Secret1\"]\n        secret1.p_Description = \"This must be Secret 1\"\n        secret1.p_Tags = [\n            cf.Tag(p_Key=\"Creator\", p_Value=\"Bob\"),\n            cf.Tag(p_Key=\"Env\", p_Value=\"Dev\"),\n        ]\n\n        secret2 = secretsmanager.Secret(\n            \"Secret222\",\n            p_Name=\"aws_cft_secret2\",\n            p_Description=\"This is Secret 2\",\n        )\n        tpl.add(secret2)\n\n        output_secret2_arn = cf.Output(\n            \"Secret222Arn\",\n            Value=secret2.ref(),\n        )\n        tpl.add(output_secret2_arn)\n\n        return tpl\n\n\n    def make_tpl_3() -\u003e cf.Template:\n        \"\"\"\n        Delete Secret1\n        Modify Secret222\n        Create Secret33333\n        \"\"\"\n        tpl = make_tpl_2()\n\n        tpl.remove(tpl.Resources[\"Secret1\"])\n\n        secret2: secretsmanager.Secret = tpl.Resources[\"Secret222\"]\n        secret2.p_Description = \"This definitely be Secret 2\"\n        secret2.p_Tags = [\n            cf.Tag(p_Key=\"Creator\", p_Value=\"Cathy\"),\n            cf.Tag(p_Key=\"Env\", p_Value=\"QA\"),\n        ]\n        secret2.ra_Metadata = {\"email\": \"cathy@email.com\"}\n\n        secret3 = secretsmanager.Secret(\n            \"Secret33333\",\n            p_Name=\"aws_cft_secret3\",\n            p_Description=\"This is Secret 3\",\n        )\n        tpl.add(secret3)\n\n        return tpl\n\n⭐ **Deployment Script**:\n\n.. code-block:: python\n\n    # -*- coding: utf-8 -*-\n\n    from aws_cloudformation.api import deploy_stack, remove_stack\n    from aws_cloudformation.tests import bsm\n    from aws_cloudformation.tests.stacks.secretmanager_stack import (\n        make_tpl_1,\n        make_tpl_2,\n        make_tpl_3,\n    )\n\n    stack_name = \"cottonformation-deploy-stack-test\"\n\n    deploy_stack(\n        bsm,\n        stack_name=stack_name,\n        template=make_tpl_1().to_json(),\n        skip_prompt=True, # by default, it prompt user input for YES / NO to proceed\n        # skip_plan=False, # by default, it does plan first\n        # wait=True, # by default, it waits the update to finish\n    )\n\n    deploy_stack(\n        bsm,\n        stack_name=stack_name,\n        template=make_tpl_2().to_json(),\n        skip_prompt=True,\n    )\n\n    deploy_stack(\n        bsm,\n        stack_name=stack_name,\n        template=make_tpl_3().to_json(),\n        skip_prompt=True,\n    )\n\n    remove_stack(\n        bsm,\n        stack_name=stack_name,\n        skip_prompt=True,\n    )\n\n\n.. _install:\n\nInstall\n------------------------------------------------------------------------------\n\n``aws_cloudformation`` is released on PyPI, so all you need is:\n\n.. code-block:: console\n\n    $ pip install aws_cloudformation\n\nTo upgrade to latest version:\n\n.. code-block:: console\n\n    $ pip install --upgrade aws_cloudformation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachu-gwu%2Faws_cloudformation-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmachu-gwu%2Faws_cloudformation-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachu-gwu%2Faws_cloudformation-project/lists"}