aws / aws/aws-cdk

CDK Deploy: Cannot invoke "String.contains(java.lang.CharSequence)" because "errorMsg" is null

Open
#32,741 10 comments 0 reactions 1 assignee Assigned to @pahud View on GitHub
@aws-cdk/aws-iam bug closed-for-staleness p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

After destroying a stack and re deploying it, IAM resource creations fail with internal error:

```
Resource handler returned message: "Cannot invoke "String.contains(java.lang.CharSequence)" because "errorMsg" is null" (RequestToken: 3578c1be-920b-222a-4c9e-0f3596bce26c, HandlerErrorCode: InternalFailure)
```

The issue suggests a low-level internal AWS CloudFormation or IAM glitch.

### Regression Issue

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

### Last Known Working CDK Version

_No response_

### Expected Behavior

Deploy stack

### Current Behavior

After destroying a stack and re deploying it, IAM resource creations fail with internal error:

```
Resource handler returned message: "Cannot invoke "String.contains(java.lang.CharSequence)" because "errorMsg" is null" (RequestToken: 3578c1be-920b-222a-4c9e-0f3596bce26c, HandlerErrorCode: InternalFailure)
```

The issue suggests a low-level internal AWS CloudFormation or IAM glitch.

### Reproduction Steps

Destroy stack and re deploy it with AWS CDK 2.174.0

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.174.0

### Framework Version

2.174.0

### Node.js Version

22.4.1

### OS

MacOS 15.2

### Language

TypeScript

### Language Version

5.5.2

### 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.