{"id":19769378,"url":"https://github.com/abiydv/aws-cf-codepipeline","last_synced_at":"2026-06-15T07:34:22.006Z","repository":{"id":177337854,"uuid":"168804591","full_name":"abiydv/aws-cf-codepipeline","owner":"abiydv","description":"Cloudformation template to create continuous delivery codepipeline","archived":false,"fork":false,"pushed_at":"2019-04-04T11:58:08.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-28T11:04:18.877Z","etag":null,"topics":["aws","aws-cloudformation","aws-codebuild","aws-codepipeline","aws-ecs","codebuild","codepipeline","cross-account"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abiydv.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-02T07:00:20.000Z","updated_at":"2019-07-03T02:22:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"9cbe4384-4da5-46af-bb07-1f872fb6cbe6","html_url":"https://github.com/abiydv/aws-cf-codepipeline","commit_stats":null,"previous_names":["abiydv/aws-cf-codepipeline"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abiydv/aws-cf-codepipeline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Faws-cf-codepipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Faws-cf-codepipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Faws-cf-codepipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Faws-cf-codepipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abiydv","download_url":"https://codeload.github.com/abiydv/aws-cf-codepipeline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiydv%2Faws-cf-codepipeline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34353193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"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","aws-cloudformation","aws-codebuild","aws-codepipeline","aws-ecs","codebuild","codepipeline","cross-account"],"created_at":"2024-11-12T04:42:51.297Z","updated_at":"2026-06-15T07:34:22.001Z","avatar_url":"https://github.com/abiydv.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Cross Account Codepipeline\n[![CodeFactor](https://www.codefactor.io/repository/github/abiydv/aws-cf-codepipeline/badge)](https://www.codefactor.io/repository/github/abiydv/aws-cf-codepipeline)\n\n![cli](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-cli_small.png)\n![cf](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-cf_small.png)\n![github](https://github.com/abiydv/ref-docs/blob/master/images/logos/github_small.png)\n![cp](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-cp_small.png)\n![cb](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-cb_small.png)\n![ecr](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-ecr_small.png)\n![iam](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-iamrole_small.png)\n![sns](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-sns_small.png)\n![s3](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-s3_small.png)\n![kms](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-kms_small.png)\n![cwe](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-cwevent_small.png)\n![ecsf](https://github.com/abiydv/ref-docs/blob/master/images/logos/aws-ecs-fargate_small.png)\n\nUse this to create a cross account AWS Codepipeline which runs in a dedicated account and deploys artifacts in other accounts\n\n- Source - github\n- Buid - AWS CodeBuild\n- Deploy - AWS Codepipeline ECS deployment\n\n## Architecture\n\nThis is a simplified view of the solution detailing out all the components in use.\n\n![cross-account-pipeline](https://github.com/abiydv/ref-docs/blob/master/images/arch/CICD_GH.png)\n\nThe various pipeline stages can be visualized as - \n\n![pipeline-flow](https://github.com/abiydv/ref-docs/blob/master/images/arch/CICD_GH_STAGES.png)\n\n## How to use\nTo create the ECS clusters in the respective accounts, you can use the [ecs templates](../ecs/). To setup the cross account codepipeline, follow these steps - \n\n### Step 1\nFirst up, execute the base template `codepipeline-base.yaml` to setup the Codepipeline S3 artifact bucket, ECR repo and the KMS Key in the **tools** account (In the account where the pipeline will reside). Note down the ARN this template outputs, we will need it next.\n\n```\naws cloudformation validate-template --template-body file://codepipeline-base.yaml \\\n--profile aws-tools-account\n```\n\n```\naws cloudformation create-stack --stack-name codepipeline-base-stack \\ \n--template-body file://codepipeline-base.yaml \\\n--profile aws-tools-account --capabilities CAPABILITY_IAM\n```\n\n### Step 2\nNext, execute the `codepipeline-access.yaml` in **ALL** the accounts you want the codepipeline to deploy to. For example, you might run this in **dev**, **qa** and **prod** accounts where your ECS clusters are. This template needs the KMS Key ARN as input from step 1.\n\n```\naws cloudformation validate-template --template-body file://codepipeline-access.yaml \\\n--profile aws-dev-account\n```\n\n```\naws cloudformation create-stack --stack-name codepipeline-access-stack \\\n--template-body file://codepipeline-access.yaml \\\n--parameters ParameterKey=KMSKeyArn,ParameterValue=\"KMS_KEY_ARN\" \\\n--profile aws-dev-account --capabilities CAPABILITY_NAMED_IAM\n```\n\n```\naws cloudformation create-stack --stack-name codepipeline-access-stack \\\n--template-body file://codepipeline-access.yaml \\\n--parameters ParameterKey=KMSKeyArn,ParameterValue=\"KMS_KEY_ARN\" \\\n--profile aws-qa-account --capabilities CAPABILITY_NAMED_IAM\n```\n\n```\naws cloudformation create-stack --stack-name codepipeline-access-stack \\\n--template-body file://codepipeline-access.yaml \\\n--parameters ParameterKey=KMSKeyArn,ParameterValue=\"KMS_KEY_ARN\" \\\n--profile aws-prod-account --capabilities CAPABILITY_NAMED_IAM\n```\n\n### Step 3\nFinally, execute the `codepipeline-stack.yaml` in the **tools** AWS account to setup the codepipeline, codebuild project, IAM roles (for codepipeline, codebuild), SNS Topics (for approve/notify emails), cloudwatch event rules (for notifying on pipeline and buildproject state change).\n\n```\naws cloudformation validate-template --template-body file://codepipeline-stack.yaml \\\n--profile aws-tools-account\n```\n\n```\naws cloudformation create-stack --stack-name codepipeline-stack \\\n--template-body file://codepipeline-stack.yaml \\\n--profile aws-tools-account --capabilities CAPABILITY_IAM\n```\n\n## Contact\n\nDrop me a note or open an issue if something doesn't work out.\n\nCheers! :thumbsup:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiydv%2Faws-cf-codepipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabiydv%2Faws-cf-codepipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiydv%2Faws-cf-codepipeline/lists"}