{"id":16225387,"url":"https://github.com/mikebild/cdk-cdn-construct","last_synced_at":"2025-09-02T16:46:27.952Z","repository":{"id":136775020,"uuid":"395230483","full_name":"MikeBild/cdk-cdn-construct","owner":"MikeBild","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-16T08:57:12.000Z","size":221,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T02:47:00.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MikeBild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-08-12T07:17:14.000Z","updated_at":"2021-08-16T08:57:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"02ecd274-eff8-41f6-8e91-fcb82092668b","html_url":"https://github.com/MikeBild/cdk-cdn-construct","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeBild%2Fcdk-cdn-construct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeBild%2Fcdk-cdn-construct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeBild%2Fcdk-cdn-construct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeBild%2Fcdk-cdn-construct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikeBild","download_url":"https://codeload.github.com/MikeBild/cdk-cdn-construct/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247772938,"owners_count":20993627,"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":[],"created_at":"2024-10-10T12:44:54.942Z","updated_at":"2025-04-08T03:36:48.586Z","avatar_url":"https://github.com/MikeBild.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Serverless based CDN using the AWS-CDK\n\n**WORK IN PROGRESS**\n\nThis project tries to implement a simple way to deploy static web content like Single-Page-Applications (SPA) or Static-Websites into the cloud using a AWS S3 bucket and a distribute it via a CDN using AWS CloudFront.\n\n## Intention and conceptual background\n\nReusable application blocks are already commonplace in many areas of software development. (e.g. UI-Libraries, NPM-Modules, etc.) Only with reusable modules/components is it really possible to beeing productive in application development. But at the moment you still need a lot of special cloud know-how to be able to use the Serverless-Cloud architecture effectively in your own project. This project tries to establish a complete and reusable Serverless-Application-Blocks (also called cloud modules) which you can easily integrate, deploy and use in your own application stack using the AWS-CDK.\n\n## Architecture and implementation\n\nThis project is a reusable AWS-CDK stack implementation that creates a AWS S3 bucket to deploy your static content into it and distribute the content via a CDN using AWS CloudFront.\n\n![Architecture](cdk-cdn.png)\n\nYou can use it in your own AWS-CDK-App like this:\n\n```typescript\n#!/usr/bin/env node\nimport { join } from 'path';\nimport { App } from '@aws-cdk/core';\nimport { CdkCdnConstructStack } from 'cdk-cdn-construct';\n\nconst app = new App();\n\n// your own stacks ...\n\nnew CdkCdnConstructStack(app, 'My-Stack-Name', {\n  namespace: `my-app-namespace`,\n  env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION },\n});\n\n// your own stacks ...\n```\n\nTBD\n\n## Setup\n\n`npm install cdk-cdn-construct`\n\n## CLI Configuration\n\nCreate a **.env** file like:\n\n```\nCDK_DEFAULT_REGION=eu-central-1\nCDK_DEFAULT_ACCOUNT=default\nCDK_CDN_NAME=your-host-and-bucket-name\nCDK_CDN_PATH=./build\nCDK_CDN_DOMAIN=example.com\n```\n\nAdd this line to your **package.json**:\n\n```json\n{\n  \"scripts\": {\n    \"deploy\": \"export $(cat .env | xargs) \u0026\u0026 cdk deploy --all --require-approval never --app cdk-cdn-construct\"\n  }\n}\n```\n\n**Deploy the examples using AWS-Vault**\n\n`aws-vault exec \u003cyour-profile-name\u003e --no-session -- yarn deploy`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebild%2Fcdk-cdn-construct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikebild%2Fcdk-cdn-construct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebild%2Fcdk-cdn-construct/lists"}