aws / aws/aws-cdk

AWS CDK CLI: China partition not taken into account when validating notification Sns Topic

Open
#29,719 2 comments 0 reactions 0 assignees View on GitHub
bug cli effort/medium p2 package/tools
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
71

Description

### Describe the bug

The `cdk deploy` commands allows you to specify SNS topics for CloudFormation notifications with the `--notification-arns` option.

However, when deploying in a China region, with a valid SNS Topic in China, the command will error out with:

```
Notification arn arn:aws-cn:sns:cn-northwest-1:012345678901:topic is not a valid arn for an SNS topic
```

### Expected Behavior

The CLI should allow the China partition (aws-cn) when validating the SNS topic.

### Current Behavior

The CLI exits.

### Reproduction Steps

```
cdk deploy --notification-arns arn:aws-cn:sns:cn-northwest-1:012345678901:my-topic
```

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.135.0

### Framework Version

_No response_

### Node.js Version

v18.18.2

### OS

Ubuntu

### Language

TypeScript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with cdk deploy --notification-arns using the supplied arn:aws-cn SNS ARN, then trace the CLI's notification ARN validation. The issue is done when a valid China-region SNS topic is accepted while invalid SNS ARNs are still rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cli, cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.