{"id":15056769,"url":"https://github.com/mongoexpuser/aws-cloudformation-stack-with-aws-sdk-js-v3","last_synced_at":"2025-07-21T09:03:27.023Z","repository":{"id":134452557,"uuid":"584082636","full_name":"MongoExpUser/AWS-CloudFormation-Stack-with-AWS-SDK-JS-V3","owner":"MongoExpUser","description":"Creates/Deploys, Updates and Deletes AWS CloudFormation Stack with AWS SDK for JavaScript/NodeJS V3.","archived":false,"fork":false,"pushed_at":"2024-09-01T11:22:15.000Z","size":212,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T07:45:49.181Z","etag":null,"topics":["apache-cassandra","aws","aws-sdk-v3","cloudformation","github-actions","javascript","keyspace","nodejs","yml-file"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MongoExpUser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-01T09:11:29.000Z","updated_at":"2024-09-01T11:22:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"7cfebcb9-f089-4891-ba84-fbf9e38f9383","html_url":"https://github.com/MongoExpUser/AWS-CloudFormation-Stack-with-AWS-SDK-JS-V3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MongoExpUser/AWS-CloudFormation-Stack-with-AWS-SDK-JS-V3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FAWS-CloudFormation-Stack-with-AWS-SDK-JS-V3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FAWS-CloudFormation-Stack-with-AWS-SDK-JS-V3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FAWS-CloudFormation-Stack-with-AWS-SDK-JS-V3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FAWS-CloudFormation-Stack-with-AWS-SDK-JS-V3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MongoExpUser","download_url":"https://codeload.github.com/MongoExpUser/AWS-CloudFormation-Stack-with-AWS-SDK-JS-V3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FAWS-CloudFormation-Stack-with-AWS-SDK-JS-V3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266270381,"owners_count":23902731,"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":["apache-cassandra","aws","aws-sdk-v3","cloudformation","github-actions","javascript","keyspace","nodejs","yml-file"],"created_at":"2024-09-24T21:56:17.376Z","updated_at":"2025-07-21T09:03:26.979Z","avatar_url":"https://github.com/MongoExpUser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI - AWS-SDK-JS-V3 Deploy CFN](https://github.com/MongoExpUser/AWS-CloudFormation-Stack-with-AWS-SDK-JS-V3/actions/workflows/deploy-cfn.yml/badge.svg)](https://github.com/MongoExpUser/AWS-CloudFormation-Stack-with-AWS-SDK-JS-V3/actions/workflows/deploy-cfn.yml)\n\n# CloudFormation-Stack-with-AWS-SDK-JS-V3\n\n\u003cbr\u003e\n\u003cstrong\u003e\nCreates/Deploys, Updates and Deletes AWS CloudFormation Stack with AWS SDK for JavaScript/NodeJS V3.\n\u003c/strong\u003e\n\u003cbr\u003e\u003cbr\u003e\nThe  script can execute the followings:\n\n  1) Uses the indicated YAML or JSON CloudFormation input file to create/deploy resources as specified in the input file.\n  \n  2) Updates the deployed resources.\n  \n  3) Deletes the deployed resources.\n\n\u003cbr\u003e\n\n## PURPOSE\n\n* Normally an AWS CloudFormation stack can be deployed via AWS CloudFormation console or AWS CLI. \u003cbr\u003e\n    \n* An AWS CloudFormation stack can also be deployed via AWS SDK in any language of choice. \u003cbr\u003e\n    \n* \u003cstrong\u003eThis repository\u003c/strong\u003e contains code for deploying an AWS CloudFormation stack via AWS SDK for JavaScript/NodeJS V3, from any computer. \u003cbr\u003e\n    \n* AWS SDK for JavaScript/NodeJS V3 is clean, light weight, fast and it fully supports async-await syntax. \u003cbr\u003e\n    \n* The sample stack (\u003cstrong\u003ekeyspace.yaml\u003c/strong\u003e file) in this repository is for creating/deploying, updating and deleting an AWS Keyspace and Tables (for Apache Cassandra), used in real-time drilling, reservoir and production applications. \u003cbr\u003e\u003cbr\u003e\n    \n    \n## DEPLOYING STACK with the NodeJS script\n\n## OPTION 1: Clone to Local Computer\n\n### To deploy the stack  on ```AWS```, follow these steps:\n\n1) #### Install NodeJS and @aws-sdk/client-cloudformation (v3) module,  assuming Ubuntu OS\n   * curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - \u003cbr\u003e\n   * sudo apt-get install -y nodejs \u003cbr\u003e\n   * sudo npm install @aws-sdk/client-cloudformation\n    \n2) #### Download or clone the following files, from this repo, into the current working directory (CWD): \u003cbr\u003e\n   * NodeJS script:  index.js \u003cbr\u003e\n   * JSON files: credentials.json and inputConfig.json \u003cbr\u003e\n   * CloudFormation YAML input file:  keyspace.yaml \u003cbr\u003e\n   \n\n3) #### Fill in relevant values in inputConfig.json file.\u003cbr\u003e\n   * \u003cstrong\u003eReferences for inputConfig.json \u003c/strong\u003e:\n     1) https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudformation/interfaces/createstackcommandinput.html\n     2) https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudformation/interfaces/deletestackcommandinput.html\n     3) https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudformation/interfaces/updatestackcommandinput.html\n\n4) #### Then run the code, assuming sudo access: \u003cbr\u003e\n   * sudo node index.js \u003cbr\u003e\u003cbr\u003e\n   \n   \n   \n## OPTION 2: Through GitHub Actions\n\n### This option has the benefits of CICD in general. To deploy the stack via GitHub action, follow these steps:\n\n1)  #### Check and fill relevant values in the GitHub Actions YML deployment file.\n    * Link: https://github.com/MongoExpUser/AWS-CloudFormation-Stack-with-AWS-SDK-JS-V3/blob/main/.github/workflows/deploy-cfn.yml\n  \n2)  #### Also fill relevant values in the inputConfig.json file.\n    * Ensure that the environment (dev, stag or prod) and region in the file correspond to the values in the GitHub Actions YML file. \u003cbr\u003e\n  \n3)  #### Add the actual values for credentials to the GitHub Secrets.\n    * These include: \u003cstrong\u003e accessKeyId, secretAccessKey and region.\u003c/strong\u003e\n    * This prevents exposure of the credentials.\n\n4)  #### Then enable GitHub Actions Workflow and run the YML file.\n    * Link: https://github.com/MongoExpUser/AWS-CloudFormation-Stack-with-AWS-SDK-JS-V3/actions \u003cbr\u003e\u003cb\u003e\n  \n\n\n# License\n\nCopyright © 2015 - present. MongoExpUser\n\nLicensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Faws-cloudformation-stack-with-aws-sdk-js-v3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongoexpuser%2Faws-cloudformation-stack-with-aws-sdk-js-v3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Faws-cloudformation-stack-with-aws-sdk-js-v3/lists"}