aws / aws/jsii

(cdk migrate): While running `cdk migrate` with python, error received (NameError: name 'props_access_keys_rotated_param_max_access_key_age' is not defined.)

Open
#4,652 4 comments 0 reactions 0 assignees View on GitHub
bug effort/small jsii p2
Dominant language
TypeScript
Stars
2.9k
Forks
267
Avg merge
1d 25m
Merged PRs (30d)
14

Description

### Describe the bug

1. Use the AWS Config Conformance Pack YAML file:
https://github.com/awslabs/aws-config-rules/blob/master/aws-config-conformance-packs/Operational-Best-Practices-for-CMMC-2.0-Level-2.yaml

2. Run the CDK migrate command:
```
cdk migrate --stack-name Comformance --language python --from-path Operational-Best-Practices-for-CMMC-2.0-Level-2.yaml
```

3. Attempt to synthesize the stack:
```
cdk synth
```

### Regression Issue

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

### Last Known Working CDK Version

_No response_

### Expected Behavior

Expected to synthezie

### Current Behavior

Failes error stated above

### Reproduction Steps

1. Use the AWS Config Conformance Pack YAML file:
https://github.com/awslabs/aws-config-rules/blob/master/aws-config-conformance-packs/Operational-Best-Practices-for-CMMC-2.0-Level-2.yaml

2. Run the CDK migrate command:
```
cdk migrate --stack-name Comformance --language python --from-path Operational-Best-Practices-for-CMMC-2.0-Level-2.yaml
```

3. Attempt to synthesize the stack:
```
cdk synth
```

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.160.0 (build 7a8ae02)

### Framework Version

_No response_

### Node.js Version

v18.20.4

### OS

MacOS, confirmed it with Windows as well

### Language

Python

### Language Version

Python 3.12.5

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the linked Operational-Best-Practices-for-CMMC-2.0-Level-2.yaml file by running cdk migrate --language python, then cdk synth. Trace where the generated Python references props_access_keys_rotated_param_max_access_key_age and confirm that the migration output synthesizes successfully without the NameError.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js, python, typescript
Domain
cli, cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.