aws / aws/aws-cdk

(custom-resource-handler): hardcoded partition in s3 auto-delete-objects-handler

Open
#33,212 2 comments 0 reactions 1 assignee Claimed by @GavinZZ View on GitHub
@aws-cdk/aws-s3 @aws-cdk/custom-resources bug p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
74

Description

### Describe the bug

When the linter was turned on in `custom-resource-handlers`, it alerted us to this line that was introduced [here](https://github.com/aws/aws-cdk/issues/29581) that fails the linter rule `@cdklabs/no-literal-partition`. This is our own custom linter rule that makes sure that we do not hardcode the `aws` partition anywhere because there are other partitions that need to be considered.

https://github.com/aws/aws-cdk/blob/c8de5bef0304f85aee69b2b646c90653bfe11fff/packages/%40aws-cdk/custom-resource-handlers/lib/aws-s3/auto-delete-objects-handler/index.ts#L54

At best this is something that we need to scrutinize and document why we are allowing. At worst we need to fix this as a bug.

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Last Known Working CDK Version

_No response_

### Expected Behavior

no literal partitions

### Current Behavior

literal partition

### Reproduction Steps

see code

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

latest

### Framework Version

_No response_

### Node.js Version

latest

### OS

mac

### Language

TypeScript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.