(cdk/pipelines): Shared KMS between pipelines
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
There should be a natural way of sharing one KMS across all pipelines. Right now each pipeline created, creates an AWS Key Management Service (AWS KMS) Customer Master Key (CMK), and it implies lot of costs if you need to deploy multiple stacks into multiple accounts. I know you can set a KMS using `'@aws-cdk/aws-codepipeline'` with `'@aws-cdk/pipelines'`, but it would be more practical if we just set a `useDefaultKMS` flag or something like that, because you need to start specifying a bucket and more steps and it's really complex.
### Use Case
Paying just $1 dollar for one KMS (CMK) instead of having one KMS (CMK) per pipeline defined.
### Proposed Solution
Having a flag for use a default, created by CDK, CMK would be great. CDK could create the key the first time and store the ARN in SSM for reference or use it from Cloudformation as reference.
### Other
* [x] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change
---
This is a :rocket: Feature Request
Contributor guide
Research direction
Start by reading the cdk/pipelines package and its integration with @aws-cdk/aws-codepipeline, focusing on how each pipeline currently selects or creates a KMS CMK. Review the existing bucket and key configuration paths before deciding how a shared default should be represented. Done means multiple pipelines can reuse one CDK-managed key without requiring callers to provide a bucket, while existing configuration remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- ci-cd, cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100