Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
nishikkr opened this issue Oct 1, 2024 · 4 comments
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort jsii p2

Comments

@nishikkr
Copy link

nishikkr commented Oct 1, 2024

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

@nishikkr nishikkr added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 1, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 and removed needs-triage This issue or PR still needs to be triaged. labels Oct 2, 2024
@khushail khushail self-assigned this Oct 2, 2024
@khushail
Copy link
Contributor

khushail commented Oct 2, 2024

Hi @nishikkr , thanks for reaching out.

I downloaded this yaml file and was able to migrate this yaml to my stack in Python on Mac-

Screenshot 2024-10-02 at 11 10 43 AM

snippet of stack created successfully -

Screenshot 2024-10-02 at 11 12 52 AM

The directory structure created -

Screenshot 2024-10-02 at 11 18 43 AM

I did the same for Typescript language and it succedded with that as well -

Screenshot 2024-10-02 at 11 21 37 AM Screenshot 2024-10-02 at 11 20 40 AM

Here is a useful post published by CDK Team on CDK Migrate command. Might be helpful.

I would request you to try again and get back if the issue persists. Thanks.

@khushail khushail added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Oct 2, 2024
@khushail khushail changed the title (python): (NameError: name 'props_access_keys_rotated_param_max_access_key_age' is not defined.) (cdk migrate): While running cdk migrate with python, error received (NameError: name 'props_access_keys_rotated_param_max_access_key_age' is not defined.) Oct 2, 2024
@nishikkr
Copy link
Author

nishikkr commented Oct 2, 2024

Sorry I didn’t describe the issue clear enough cdk migrate does complete without the error for both language but for cdk synth fails on python but doesn’t for typescript

@khushail
Copy link
Contributor

khushail commented Oct 2, 2024

@nishikkr , thanks for clarifying. I will investigate it further and get back to you.

@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Oct 2, 2024
@khushail
Copy link
Contributor

khushail commented Oct 2, 2024

@nishikkr , I am able to repro this in Python (however it succeeds in Typescript)-

NameError: name 'props_access_keys_rotated_param_max_access_key_age' is not defined. Did you mean: 'access_keys_rotated_param_max_access_key_age'?
Screenshot 2024-10-02 at 2 08 39 PM

This is related to JSII Runtime so marking it as appropriate for JSII team and moving to JSII Repo for further investigation.

@khushail khushail added jsii effort/small Small work item – less than a day of effort and removed bug This issue is a bug. investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Oct 2, 2024
@khushail khushail transferred this issue from aws/aws-cdk Oct 2, 2024
@khushail khushail removed their assignment Oct 2, 2024
@khushail khushail added the bug This issue is a bug. label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort jsii p2
Projects
None yet
Development

No branches or pull requests

2 participants