aws / aws/aws-cdk-cli

(CDK Migrate CLI): CDK Migrate command does not filter out type Custom::* resource with flag --filter resource-type-prefix

Open
#1,571 3 comments 0 reactions 0 assignees View on GitHub
bug effort/medium p1
Dominant language
TypeScript
Stars
105
Forks
122
Avg merge
1d 17h
Merged PRs (30d)
71

Description

### Describe the bug

I have an existing stack with one CR and one Lambda function. Following commands all face the same error:

```
cdk migrate --language typescript --from-stack --stack-name 'CustomResourceCrossRegionExport' --filter resource-type-prefix="AWS::Lambda::"
cdk migrate --language typescript --from-stack --stack-name 'CustomResourceCrossRegionExport' --filter resource-type-prefix="AWS::DynamoDB::"
```

### Expected Behavior

The filter should filter the Custom:: resource out and only import the Lambda function.

### Current Behavior

Error:

```
Migrate failed for `CustomResourceCrossRegionExport`: stack generation failed due to error 'TransmuteError: invalid resource type name: Custom::GetExportsValueFromRegion'
```

### Reproduction Steps

Deploy a CFN stack with one CR one Lambda function Function. Use the command described above

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

1.128

### Framework Version

_No response_

### Node.js Version

20

### OS

MacOS

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