{"id":19811141,"url":"https://github.com/accenture/cna-aws-cdk-patterns","last_synced_at":"2026-02-28T04:46:47.367Z","repository":{"id":40748753,"uuid":"334907146","full_name":"Accenture/cna-aws-cdk-patterns","owner":"Accenture","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-06T18:55:46.000Z","size":1213,"stargazers_count":3,"open_issues_count":11,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-09-08T23:14:09.558Z","etag":null,"topics":["aws","cdk","infrastructure-as-code","static-website"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Accenture.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-01T10:08:09.000Z","updated_at":"2021-05-11T16:11:36.000Z","dependencies_parsed_at":"2023-02-06T08:02:25.291Z","dependency_job_id":null,"html_url":"https://github.com/Accenture/cna-aws-cdk-patterns","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Accenture/cna-aws-cdk-patterns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fcna-aws-cdk-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fcna-aws-cdk-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fcna-aws-cdk-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fcna-aws-cdk-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Accenture","download_url":"https://codeload.github.com/Accenture/cna-aws-cdk-patterns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fcna-aws-cdk-patterns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29924848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","cdk","infrastructure-as-code","static-website"],"created_at":"2024-11-12T09:24:58.444Z","updated_at":"2026-02-28T04:46:47.352Z","avatar_url":"https://github.com/Accenture.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloud-native Accelerator: CDK Patterns for AWS\n\n## Usage\n\n### Install\n\nTo install this construct to your CDK project you need to run\n\n```bash\nnpm install @Accenture/cna-aws-cdk-patterns\n```\n\n\n## Static Website CDK Construct\n\nThis project contains a CDK construct for creating the infrastructure needed for hosting a static website. It also contains templates for CI/CD pipelines for deploying static content and *Single Page Applications* (SPA) to the static website infrastructure.\n\n### Architecture\n\nThe infrastructure for hosting consists of the following AWS services:\n\n* AWS S3\n* CloudFront\n* ACM\n* Route 53\n\nAdditionally, the CI/CD pipelines are based on the following AWS services:\n\n* CodePipeline\n* CodeBuild\n\n### Create Static Website\n\nThis CDK Construct contains everything which is needed to create the infrastructure for hosting the Website. Therefore, the following code is sufficient for creating a Stack with the website:\n\n```typescript\nimport { Construct, Stack, StackProps } from '@aws-cdk/core';\nimport { StaticWebsite } from '@Accenture/cna-aws-cdk-patterns';\n\nexport class StaticWebsiteStack extends Stack {\n  constructor(scope: Construct, id: string, props?: StackProps) {\n    super(scope, id, props);\n    \n    new StaticWebsite(this, 'simple-static-website', {\n      name: 'simple-static-website'\n    });\n  }\n}\n```\n\nIf you have want to use you own custom domain for the static website you can provide a Route 53 Hosted Zone and the domain name as input:\n\n```typescript\nimport { Construct, Stack, StackProps } from '@aws-cdk/core';\nimport { StaticWebsite } from '@Accenture/cna-aws-cdk-patterns';\n\nexport class StaticWebsiteStack extends Stack {\n  constructor(scope: Construct, id: string, props?: StackProps) {\n    super(scope, id, props);\n\n    // Look up the hosted zone for the domainName in Route 53\n    const hostedZone = HostedZone.fromLookup(this, 'hosted-zone', {\n      domainName: 'example.com'\n    });\n    \n    new StaticWebsite(this, 'simple-static-website', {\n      name: 'simple-static-website',\n      hostedZone: hostedZone,\n      domainName: 'www.example.com'\n    });\n  }\n}\n```\n\nWith this configuration a SSL certificate is created in ACM and a DNS record is added to point to the CloudFront distribution.\n\n**Important:** The stack for the website needs to be created in the AWS Region *us-east-1*.\n\n## Useful commands\n\n * `npm run build`   compile typescript to js\n * `npm run watch`   watch for changes and compile\n * `npm run test`    perform the jest unit tests\n * `cdk deploy`      deploy this stack to your default AWS account/region\n * `cdk diff`        compare deployed stack with current state\n * `cdk synth`       emits the synthesized CloudFormation template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fcna-aws-cdk-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccenture%2Fcna-aws-cdk-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fcna-aws-cdk-patterns/lists"}