{"id":22803144,"url":"https://github.com/nikovirtala/cdk-amplify-console","last_synced_at":"2025-04-19T20:22:39.291Z","repository":{"id":37457527,"uuid":"265933615","full_name":"nikovirtala/cdk-amplify-console","owner":"nikovirtala","description":"Configure AWS Amplify Console deployment using AWS CDK","archived":false,"fork":false,"pushed_at":"2023-09-11T03:03:52.000Z","size":228,"stargazers_count":14,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T12:51:18.886Z","etag":null,"topics":["amplify","aws","cdk","cdk-examples","cicd"],"latest_commit_sha":null,"homepage":"https://amplified.host","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/nikovirtala.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}},"created_at":"2020-05-21T19:24:22.000Z","updated_at":"2024-02-13T09:58:30.000Z","dependencies_parsed_at":"2023-01-19T11:30:36.509Z","dependency_job_id":null,"html_url":"https://github.com/nikovirtala/cdk-amplify-console","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikovirtala%2Fcdk-amplify-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikovirtala%2Fcdk-amplify-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikovirtala%2Fcdk-amplify-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikovirtala%2Fcdk-amplify-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikovirtala","download_url":"https://codeload.github.com/nikovirtala/cdk-amplify-console/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249792679,"owners_count":21326394,"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":["amplify","aws","cdk","cdk-examples","cicd"],"created_at":"2024-12-12T09:09:03.246Z","updated_at":"2025-04-19T20:22:39.275Z","avatar_url":"https://github.com/nikovirtala.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Configure AWS Amplify Console with AWS CDK\n\n## TL;DR\n\nIn this example, I'll show you how to configure AWS Amplify Console using the AWS Cloud Development Kit (CDK).\n\nThis example enables the following configuration:\n\n- Connect to the page [source repository](https://github.com/nikovirtala/amplify-console-demo/) in GitHub\n- Enable deployment from `master` and `dev` branches\n- Enable feature branch preview deployments\n- Deploy artifacts from source repository root and subfolders\n- Configure custom domain `amplified.host`\n  - `master` branch: https://amplified.host\n  - `dev` branch: https://dev.amplified.host\n\nAll this configuration is done on: `lib/cdk-amplify-console-stack.ts`\n\nThe sample code reads the GitHub Personal Access Token from AWS Secrets Manager. You can store the secret there, using the following CLI command:\n\n`aws secretsmanager create-secret --name github-access-token --secret-string \u003cgithub-personal-access-token\u003e`\n\n## The Stack\n\n### AWS Amplify Console\n\n\u003e The [AWS Amplify Console](https://aws.amazon.com/amplify/console/) provides a Git-based workflow for hosting fullstack serverless web apps with continuous deployment. A fullstack serverless app consists of a backend built with cloud resources such as GraphQL or REST APIs, file and data storage, and a frontend built with single page application frameworks such as React, Angular, Vue, or Gatsby.\n\u003e\n\u003e AWS Amplify Console supports common Single Page App (SPA) frameworks (e.g. React, Angular, Vue.js, Ionic, Ember), as well as static-site generators like Gatsby, Eleventy, Hugo, VuePress, and Jekyll.\n\n### AWS Cloud Development Kit\n\n\u003e The [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/index.html) (AWS CDK) is a software development framework for defining your cloud infrastructure in code and provisioning it through AWS CloudFormation.\n\nIn my example we use Typescript, and the project was inited with the command: `cdk init app --language typescript`\n\n### `aws-amplify` CDK Module\n\nIn this example we use [aws-amplify CDK module](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-amplify-readme.html).\n\n### GitHub Actions\n\n![](https://github.com/nikovirtala/cdk-amplify-console/workflows/Deploy%20to%20AWS%20Amplify%20Console/badge.svg)\n\n## To-Do\n\n- [x] Complete the GitHub Actions workflow\n\n## Useful commands\n\n- `npm run build` compile typescript to js\n- `npm run watch` watch for changes and compile\n- `cdk deploy` deploy this stack to your default AWS account/region\n- `cdk diff` compare deployed stack with the current state\n- `cdk synth` emits the synthesized CloudFormation template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikovirtala%2Fcdk-amplify-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikovirtala%2Fcdk-amplify-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikovirtala%2Fcdk-amplify-console/lists"}