{"id":15187474,"url":"https://github.com/mongoexpuser/aws-redshift-serverless-with-aws-sdk-js-v3","last_synced_at":"2026-03-02T18:08:44.604Z","repository":{"id":159110508,"uuid":"634431420","full_name":"MongoExpUser/AWS-Redshift-Serverless-with-AWS-SDK-JS-V3","owner":"MongoExpUser","description":"Deployment and Modeling of AWS Redshift Serverless","archived":false,"fork":false,"pushed_at":"2023-07-08T01:25:48.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-08T22:36:14.751Z","etag":null,"topics":["aws","aws-sdk-3","data-warehouse","debian","javascript","nodejs","plpgsql","redshift-serverless","ubuntu"],"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-04-30T05:04:47.000Z","updated_at":"2023-07-08T09:21:02.000Z","dependencies_parsed_at":"2024-11-11T05:01:11.064Z","dependency_job_id":null,"html_url":"https://github.com/MongoExpUser/AWS-Redshift-Serverless-with-AWS-SDK-JS-V3","commit_stats":{"total_commits":107,"total_committers":1,"mean_commits":107.0,"dds":0.0,"last_synced_commit":"d294eeaa6d004a855af85af06ba11daf2c94b9e1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FAWS-Redshift-Serverless-with-AWS-SDK-JS-V3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FAWS-Redshift-Serverless-with-AWS-SDK-JS-V3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FAWS-Redshift-Serverless-with-AWS-SDK-JS-V3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FAWS-Redshift-Serverless-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-Redshift-Serverless-with-AWS-SDK-JS-V3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240816482,"owners_count":19862295,"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":["aws","aws-sdk-3","data-warehouse","debian","javascript","nodejs","plpgsql","redshift-serverless","ubuntu"],"created_at":"2024-09-27T18:23:01.508Z","updated_at":"2026-03-02T18:08:44.599Z","avatar_url":"https://github.com/MongoExpUser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI - AWS-SDK-JS-V3 Deploy RSSL](https://github.com/MongoExpUser/AWS-Redshift-Serverless-with-AWS-SDK-JS-V3/actions/workflows/deploy-redshift-sless.yml/badge.svg)](https://github.com/MongoExpUser/AWS-Redshift-Serverless-with-AWS-SDK-JS-V3/actions/workflows/deploy-redshift-sless.yml)\n\n# AWS-Redshift-Serverless-with-AWS-SDK-JS-V3\n\n\u003cstrong\u003e Deployment and Modeling of AWS Redshift Serverless (A cloud data warehouse).\u003c/strong\u003e\n\u003cbr\u003e\u003cbr\u003e\n\n  1) The NodeJS script (index.js) creates and deletes the following resources:                   \n     * Redshift Serverless Namespace                                                                                                                 \n     * Redshift Serverless Workgroup                                                                                                                 \n     * Redshift Serverless Usage Limit  \n     \n  2) Additional SQL scripts in the repo for modeling include:                                                                                             \n     * DDL script (ddl.sql) for data objects (TABLES) creation. Run via Redshift Query Editor 2                                                       \n     * DML script (dml-v1.sql) for inserting data. Run via either:\n       * Redshift Query Editor 2\n       * NodeJS module - @aws-sdk/client-redshift-data (AWS-SDK-JS-V3) \u003cbr\u003e\n     * DQL script (dql.sql). Run via Redshift Query Editor 2                                                                   \n  \n\u003cbr\u003e\n\n\n## DEPLOYING AWS Redshift Serverless 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 relevant NodeJS AWS-SDK V3 modules, assuming Ubuntu or Debian Linux 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-redshift-serverless\n   * sudo npm install @aws-sdk/client-redshift-data\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   \n\n3) #### Fill in relevant values in the inputConfig.json file.\u003cbr\u003e\n   * \u003cstrong\u003eReferences for inputConfig.json \u003c/strong\u003e: \n     * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-redshift-serverless/classes/createnamespacecommand.html\n     * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-redshift-serverless/classes/createworkgroupcommand.html\n     * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-redshift-serverless/classes/createusagelimitcommand.html\n     * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-redshift-serverless/classes/deleteworkgroupcommand.html\n\n4) #### Then run the code, assuming sudo access: \u003cbr\u003e\n   * sudo node index.js \u003cbr\u003e\u003cbr\u003e\n   \n \n## OPTION 2: Through GitHub Actions\n\n### To deploy on ```AWS```, follow these steps:\n\n1)  #### Check and fill relevant values in the GitHub Actions YML deployment file.\n    * Link: https://github.com/MongoExpUser/AWS-Redshift-Serverless-with-AWS-SDK-JS-V3/blob/main/.github/workflows/deploy-redshift-sless.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 (inputConfig.json) correspond to the values in the GitHub Actions YML file. \u003cbr\u003e\n    * Add the actual values of the AWS IAM Role(s), AWS VPC Security Group id(s) and AWS VPC subnet ids to the GitHub Secrets instead of specifying them  in the config file (inputConfig.json) to avoid exposing their values.\n    * See the \u003cstrong\u003eenv\u003c/strong\u003e sections of the YML Deployment File: https://github.com/MongoExpUser/AWS-Redshift-Serverless-with-AWS-SDK-JS-V3/blob/main/.github/workflows/deploy-redshift-sless.yml\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-Redshift-Serverless-with-AWS-SDK-JS-V3/actions \u003cbr\u003e\u003cb\u003e\n\n#\n### ER Diagram of a Sample Music Video Streams' STAR Schema\n![Image description](https://github.com/MongoExpUser/AWS-Redshift-Serverless-with-AWS-SDK-JS-V3/blob/main/music_video_streams_star_schema.png)\n  \n\n\n\n# License\n\nCopyright © 2023. MongoExpUser\n\nLicensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Faws-redshift-serverless-with-aws-sdk-js-v3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongoexpuser%2Faws-redshift-serverless-with-aws-sdk-js-v3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Faws-redshift-serverless-with-aws-sdk-js-v3/lists"}