aws / aws/aws-cdk-cli

migrate: EngineLifecycleSupport when scanning AWS::RDS

Open
#639 2 comments 1 reaction 0 assignees View on GitHub
bug effort/medium p1
Dominant language
TypeScript
Stars
105
Forks
122
Avg merge
2d 2h
Merged PRs (30d)
69

Description

### Describe the bug

When I run the following command I get an error about EngineLifecycleSupport
`cdk migrate --language python --from-scan --stack-name cdkMigrateFromScan --filter resource-type-prefix="AWS::RDS::" --ignore-errors --debug --trace --verbose`

Returns the following error

```
[14:48:14] CDK toolkit version: 2.162.1 (build 10aa526)
[14:48:14] Command line arguments: {
_: [ 'migrate' ],
language: 'python',
l: 'python',
'from-scan': '',
fromScan: '',
'stack-name': 'cdkMigrateFromScan',
n: 'cdkMigrateFromScan',
stackName: 'cdkMigrateFromScan',
filter: [ 'resource-type-prefix=AWS::RDS::' ],
'ignore-errors': true,
ignoreErrors: true,
debug: true,
trace: true,
verbose: 1,
v: 1,
lookups: true,
json: false,
j: false,
ec2creds: undefined,
i: undefined,
'version-reporting': undefined,
versionReporting: undefined,
'path-metadata': undefined,
pathMetadata: undefined,
'asset-metadata': undefined,
assetMetadata: undefined,
'role-arn': undefined,
r: undefined,
roleArn: undefined,
staging: true,
'no-color': false,
noColor: false,
ci: false,
'$0': '..\\..\\..\\AppData\\Roaming\\npm\\node_modules\\aws-cdk\\bin\\cdk'
}
[14:48:14] merged settings: {
versionReporting: true,
assetMetadata: true,
pathMetadata: true,
output: 'cdk.out',
context: {},
debug: true,
language: 'python',
toolkitBucket: {},
staging: true,
bundlingStacks: [],
lookups: true
}
[14:48:15] Notices refreshed
[14:48:15] [trace] SdkProvider#withAwsCliCompatibleDefaults()
[14:48:15] Determining if we're on an EC2 instance.
[14:48:15] Does not look like an EC2 instance.
[14:48:15] Toolkit stack: CDKToolkit
This command is an experimental feature.
[14:48:15] [trace] SdkProvider#forEnvironment()
[14:48:15] [trace] SdkProvider#resolveEnvironment()
[14:48:15] [trace] SdkProvider#defaultAccount()
[14:48:15] [trace] SdkProvider#defaultCredentials()
[14:48:15] Resolving default credentials
[14:48:15] [trace] SDK#currentAccount()
[14:48:15] [trace] SDK#forceCredentialRetrieval()
[14:48:15] Retrieved account ID 475716527515 from disk cache
[14:48:15] [trace] SdkProvider#obtainBaseCredentials()
[14:48:15] [trace] SdkProvider#defaultAccount()
[14:48:15] [trace] SdkProvider#defaultCredentials()
[14:48:15] [trace] SDK#validateCredentials()
[14:48:18] [trace] SDK#cloudFormation()
Using the latest successful scan which is 0 days, 1 hours, and 0 minutes old.
Applying filters to resource scan.
finding related resources.
Found 48 resources.
Generating CFN template from scanned resources.
Please wait, template creation in progress. This may take a couple minutes.
[CREATE_IN_PROGRESS] Template Creation in Progress
Template successfully generated!
❌ Migrate failed for `cdkMigrateFromScan`: CdkMigrateFromScanStack could not be generated because EngineLifecycleSupport is not a valid property for resource RDSDBInstance00||||REDACTED|||| of type AWS::RDS::DBInstance
[14:48:48] [trace] SdkProvider#forEnvironment()
[14:48:48] [trace] SdkProvider#resolveEnvironment()
[14:48:48] [trace] SdkProvider#defaultAccount()
[14:48:48] [trace] SdkProvider#obtainBaseCredentials()
[14:48:48] [trace] SdkProvider#defaultAccount()
[14:48:48] [trace] SdkProvider#defaultCredentials()
[14:48:48] [trace] SDK#validateCredentials()
[14:48:48] [trace] SDK#cloudFormation()
[14:48:48] [trace] SDK#wrapServiceErrorHandling()
[14:48:48] Reading cached notices from ||||PATH REDACTED||||\.cdk\cache\notices.json
CdkMigrateFromScanStack could not be generated because EngineLifecycleSupport is not a valid property for resource RDSDBInstance00||||REDACTED|||| of type AWS::RDS::DBInstance
[14:48:48] Error: CdkMigrateFromScanStack could not be generated because EngineLifecycleSupport is not a valid property for resource RDSDBInstance00||||REDACTED|||| of type AWS::RDS::DBInstance
at generateStack (||||PATH REDACTED||||\AppData\Roaming\npm\node_modules\aws-cdk\lib\commands\migrate.ts:89:11)
at CdkToolkit.migrate (||||PATH REDACTED||||\AppData\Roaming\npm\node_modules\aws-cdk\lib\cdk-toolkit.ts:869:21)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at exec4 (||||PATH REDACTED||||\AppData\Roaming\npm\node_modules\aws-cdk\lib\cli.ts:454:12)
```

### Regression Issue

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

### Last Known Working CDK Version

_No response_

### Expected Behavior

Create a migrated CDK project of an RDS Database.

### Current Behavior

Fails with Error see above.

### Reproduction Steps

Have an rds database with the option then try to create a migration with the command above.

### Possible Solution

Do not fail on that property. I looked for it and can not find it in the Web Console so I can not remove it.

### Additional Information/Context

_No response_

### CDK CLI Version

2.162.1 (build 10aa526)

### Framework Version

_No response_

### Node.js Version

v20.18.0

### OS

WIndows 11

### Language

Python

### Language Version

3.12.6

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported cdk migrate command, then inspect generateStack in lib/commands/migrate.ts, where the failure is reported. Verify how the scanned AWS::RDS::DBInstance properties are handled; done means the migration creates a CDK project without rejecting EngineLifecycleSupport.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.