{"id":19274117,"url":"https://github.com/sbstjn/archive","last_synced_at":"2025-08-23T09:10:07.347Z","repository":{"id":137670542,"uuid":"325661077","full_name":"sbstjn/archive","owner":"sbstjn","description":"Amazon S3 Replication with KMS, CDK, and CloudFormation StackSets.","archived":false,"fork":false,"pushed_at":"2022-11-01T17:55:40.000Z","size":191,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-21T22:36:47.418Z","etag":null,"topics":["aws","cdk","s3"],"latest_commit_sha":null,"homepage":"https://sbstjn.com/blog/aws-cdk-s3-bucket-reginal-replication-kms/","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/sbstjn.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-30T22:32:27.000Z","updated_at":"2021-12-19T18:41:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"85f73098-450f-48a5-8840-306ee7bcbfb2","html_url":"https://github.com/sbstjn/archive","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":"sbstjn/cdk-template","purl":"pkg:github/sbstjn/archive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Farchive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Farchive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Farchive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Farchive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbstjn","download_url":"https://codeload.github.com/sbstjn/archive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Farchive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746301,"owners_count":24813557,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"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","s3"],"created_at":"2024-11-09T20:45:11.619Z","updated_at":"2025-08-23T09:10:07.328Z","avatar_url":"https://github.com/sbstjn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S3 Archive with Regional Replications\n\n[![MIT License](https://badgen.now.sh/badge/License/MIT/blue)](https://github.com/sbstjn/archive/blob/master/LICENSE.md)\n[![sbstjn.com](https://badgen.now.sh/badge/Read/Blog%20Post/purple)](https://sbstjn.com/blog/aws-cdk-s3-bucket-reginal-replication-kms/)\n\n\u003e Use the AWS Cloud Development Kit to deploy an Amazon S3 Bucket in your desired region and enable regional bucket replications for backups.\n\n## Architecture\n\n* CloudFormation Stack with S3 Bucket, KMS, and StackSet\n* CloudFormation StackSet for S3 regional replication\n\n## Usage\n\n### Prerequisites\n\nTo use self-managed StackSets, you need to [create two IAM roles](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html) first. You can create them manually using the AWS Management Console or use the official CloudFormation templates provided by AWS:\n\n- [AWSCloudFormationStackSetAdministrationRole.yml](https://s3.amazonaws.com/cloudformation-stackset-sample-templates-us-east-1/AWSCloudFormationStackSetAdministrationRole.yml)\n- [AWSCloudFormationStackSetExecutionRole.yml](https://s3.amazonaws.com/cloudformation-stackset-sample-templates-us-east-1/AWSCloudFormationStackSetExecutionRole.yml)\n\n### Configuration\n\nModify `aws/index.ts` to configure your archive and replication:\n\n```js\nconst prefix = 'example'\nconst option = {\n  prefix,\n  env: {\n    region: 'eu-central-1'\n  },\n  replications: [\n    'eu-west-1',\n    'eu-north-1'\n  ]\n}\n```\n\n### Deployment\n\n```bash\n# Deploy CloudFormation Stack with CDK\n\n$ \u003e npx cdk deploy\n\n[…]\n\nOutputs:\nArchive.BucketName = example-archive\nArchive.BucketRegion = eu-central-1\nArchive.BucketReplications = eu-west-1, eu-north-1\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Farchive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbstjn%2Farchive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Farchive/lists"}