(s3): allow adding BucketMetrics to unowned buckets
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
BucketMetrics allow one to have per prefix cloudwatch metrics on buckets. The IBucket interface does not allow adding new ones. The IBucket interface is however the only way to get to an existing bucket within the CDK.
### Use Case
We are having a data architecture where multiple processes are writing to a central S3 bucket (think data-lake of sorts). We want to be able to build cloud-watch dashboards/alarms on the metrics of the different prefixes being written to. The bucket already exists and can not be made CDK managed right now. Whenever we deploy a new stack that writes to a new prefix in the bucket, we would like to be able to define a metrics filter, that we can see the metrics in cloud-watch. The console UI allows me to do that, but that is not desirable, since we are constantly adding new processes that write to new prefixes.
I believe this is similar to https://github.com/aws/aws-cdk/issues/2004 just with BucketMetrics.
### Proposed Solution
I don't know how do do that right now.
### Other
* [ ] :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 tracing the IBucket interface and BucketMetrics API in the CDK, then compare the related issue #2004 and the existing S3 metrics behavior. Done means an imported or otherwise unowned bucket can accept prefix CloudWatch metrics filters through the CDK and expose them for dashboards or alarms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100