{"id":20157038,"url":"https://github.com/almmiko/aws-previews-deployment","last_synced_at":"2025-04-09T22:52:39.748Z","repository":{"id":55430739,"uuid":"475776672","full_name":"almmiko/aws-previews-deployment","owner":"almmiko","description":"Build AWS Infrastructure for Preview Environments","archived":false,"fork":false,"pushed_at":"2022-04-04T17:54:41.000Z","size":350,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T22:52:35.235Z","etag":null,"topics":["aws","cdktf","terraform"],"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/almmiko.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":"2022-03-30T07:56:06.000Z","updated_at":"2023-03-14T11:57:16.000Z","dependencies_parsed_at":"2022-08-15T00:10:24.310Z","dependency_job_id":null,"html_url":"https://github.com/almmiko/aws-previews-deployment","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/almmiko%2Faws-previews-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almmiko%2Faws-previews-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almmiko%2Faws-previews-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almmiko%2Faws-previews-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/almmiko","download_url":"https://codeload.github.com/almmiko/aws-previews-deployment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125641,"owners_count":21051766,"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","cdktf","terraform"],"created_at":"2024-11-13T23:43:34.357Z","updated_at":"2025-04-09T22:52:39.729Z","avatar_url":"https://github.com/almmiko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Infrastructure for Preview Environments ![terraform](https://img.shields.io/static/v1?label=\u0026message=terraform\u0026color=7B42BC\u0026logo=terraform\u0026style=flat\u0026logoColor=white) ![aws](https://img.shields.io/static/v1?label=\u0026message=aws\u0026color=232F3E\u0026logo=amazonaws\u0026style=flat\u0026logoColor=white)\n\nThe AWS infrastructure for showcasing **How to Build Preview Environments for Modern CI/CD Workflows Using Terraform CDK.**\n\nYou will deploy [Create React App](https://github.com/facebook/create-react-app), but you can replace the app with any other front-end framework.\n\nThe AWS infrastructure is managed using [Terraform Cloud Development Kit](https://www.terraform.io/cdktf).\n\n## Getting Started\n\nInstall [terraform CLI](https://learn.hashicorp.com/tutorials/terraform/install-cli).\n\nTo install Terraform CDK run:\n```bash\nnpm install --global cdktf-cli@latest\n```\n\nCreate an [AWS profile](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) with permission to have access to:\n- IAM\n- S3\n- CloudFront\n- VPC\n- Lambda\n- LambdaExecute\n- Route53\n- CertificateManager\n\nInstall dependencies:\n```bash\ncd terraform\nnpm i\n```\n\n## Configuration\n\nIn `terraform/main.ts` file add your configuration:\n\n```js\nconst configuration = {\n    BUCKET_NAME: \"\",\n    AWS_REGION: \"\",\n    AWS_PROFILE: \"\",\n    DOMAIN_NAME: \"\",\n    WILCARD_DOMAIN_NAME: \"\",\n};\n```\n\nTo build the example app\n```bash\ncd app\nnpm i\nnpm run build\n```\n\nTo upload the example app, replace placeholder values in the `terraform/utils/s3-upload.js` file and run:\n\n```bash\nnpm run s3:upload\n```\n\n## Commands\n\nTo run deployment plan:\n```bash\nnpm run plan\n```\n\nTo deploy resources:\n```bash\nnpm run deploy\n```\n\nTo synthesize infrastructure configuration:\n```bash\nnpm run synth\n```\n\nTo destroy deployed resources:\n```bash\nnpm run destroy\n```\n\n\u003e ⚠️ Lambda@Edge can't be destroyed in one run. Wait until AWS removes replicas and re-run destroy command.\n\n\n## License ![licence-MIT](https://img.shields.io/badge/license-MIT-green)\n\nThis project is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmmiko%2Faws-previews-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falmmiko%2Faws-previews-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmmiko%2Faws-previews-deployment/lists"}