{"id":49984907,"url":"https://github.com/aws-samples/terraform-aws-codecommit-s3-backups","last_synced_at":"2026-05-18T20:07:32.117Z","repository":{"id":137021667,"uuid":"609279806","full_name":"aws-samples/terraform-aws-codecommit-s3-backups","owner":"aws-samples","description":"Backup your AWS CodeCommit repositories to S3 with Terraform","archived":false,"fork":false,"pushed_at":"2026-04-12T05:01:32.000Z","size":125,"stargazers_count":13,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-03T00:14:25.302Z","etag":null,"topics":["aws","codecommit","s3","terraform"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/aws-samples/codecommit-s3-backups/aws/latest","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-03T18:59:56.000Z","updated_at":"2026-04-12T05:01:33.000Z","dependencies_parsed_at":"2024-04-05T10:30:25.986Z","dependency_job_id":"f896a44d-ca6e-451a-95db-b12967472585","html_url":"https://github.com/aws-samples/terraform-aws-codecommit-s3-backups","commit_stats":null,"previous_names":["aws-samples/terraform-aws-codecommit-s3-backups","aws-samples/aws-codecommit-s3-backups-with-terraform"],"tags_count":13,"template":false,"template_full_name":"amazon-archives/__template_MIT-0","purl":"pkg:github/aws-samples/terraform-aws-codecommit-s3-backups","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fterraform-aws-codecommit-s3-backups","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fterraform-aws-codecommit-s3-backups/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fterraform-aws-codecommit-s3-backups/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fterraform-aws-codecommit-s3-backups/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws-samples","download_url":"https://codeload.github.com/aws-samples/terraform-aws-codecommit-s3-backups/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fterraform-aws-codecommit-s3-backups/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33153662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","codecommit","s3","terraform"],"created_at":"2026-05-18T20:07:30.404Z","updated_at":"2026-05-18T20:07:32.102Z","avatar_url":"https://github.com/aws-samples.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"## aws-terraform-codeCommit-s3-backups\n\nBackup AWS CodeCommit repositories to Amazon S3. \n\n(or risk discovering that [deleting an AWS CodeCommit repository is a one-way operation](https://aws.amazon.com/codecommit/faqs/))\n\n## Module Inputs\n\n```hcl\nmodule \"codecommit-s3-backups\" {\n  source  = \"aws-samples/codecommit-s3-backups/aws\"\n  version = \"2.2.x\"\n  name    = \"codecommit-s3-backup\" \n}\n```\nThe `name` is used in the resource names (AWS CodeBuild project, IAM Roles, etc). \n\n### Optional Inputs\n\n```hcl\nmodule \"codecommit_s3_backup\" {\n  ...\n  kms_key               = aws_kms_key.this.arn\n  access_logging_bucket = aws_s3_bucket.this.id\n }\n```\n\n`kms_key` is the arn of an existing AWS KMS key. It encrypts the Amazon S3 bucket and Amazon CloudWatch Log group. The AWS KMS key policy will need to follow [CloudWatch Logs guidance for AWS KMS](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html) and [CodeBuild guidance for AWS KMS](https://docs.aws.amazon.com/codebuild/latest/userguide/setting-up-kms.html). \n\n`access_logging_bucket` is the arn of an Amazon S3 access logging bucket. \n\n\n## Architecture\n\u003cdiv align=\"center\"\u003e\n\u003cimg alt=\"architecture\" width=\"600\" src=\"./img/architecture.png\" /\u003e\n\u003c/div\u003e\nA\n1. Users push code to a repository in CodeCommit.\n2. Amazon EventBridge monitors for changes to any repository.\n3. EventBridge invokes AWS CodeBuild and sends it information about the repository. \n4. CodeBuild clones the repository and packages it into a .zip file.\n5. CodeBuild uploads the .zip file to an S3 bucket. \n\n## Related Resources\n\n- [Automate event-driven backups from CodeCommit to Amazon S3 using CodeBuild and CloudWatch Events](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/automate-event-driven-backups-from-codecommit-to-amazon-s3-using-codebuild-and-cloudwatch-events.html)\n- [Terraform Registry: aws-samples/codecommit-s3-backups/aws](https://registry.terraform.io/modules/aws-samples/codecommit-s3-backups/aws/latest)\n\n## Security\n\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.\n\n## License\n\nThis library is licensed under the MIT-0 License. See the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-samples%2Fterraform-aws-codecommit-s3-backups","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws-samples%2Fterraform-aws-codecommit-s3-backups","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-samples%2Fterraform-aws-codecommit-s3-backups/lists"}