aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 53 forks source link

Getting ModuleNotFoundError: No module named 'imp' while running cfn-signal with python3.12 #2078

Open tgyanen opened 4 days ago

tgyanen commented 4 days ago

Name of the resource

Other

Resource Name

cfn-signal

Issue Description

cfn-signal does not work with python3.12

Expected Behavior

cfn-signal should be able to send the signal succesfully

Observed Behavior

Traceback (most recent call last): File "/usr/local/bin/cfn-signal", line 20, in from cfnbootstrap.cfn_client import CloudFormationClient File "/usr/local/lib/python3.12/site-packages/cfnbootstrap/cfn_client.py", line 24, in from cfnbootstrap import aws_client, util File "/usr/local/lib/python3.12/site-packages/cfnbootstrap/aws_client.py", line 23, in from cfnbootstrap import util, public_constants File "/usr/local/lib/python3.12/site-packages/cfnbootstrap/util.py", line 17, in from cfnbootstrap import endpoint_tool File "/usr/local/lib/python3.12/site-packages/cfnbootstrap/endpoint_tool.py", line 16, in from cfnbootstrap.resources import documents File "/usr/local/lib/python3.12/site-packages/cfnbootstrap/resources/documents/init.py", line 17, in import imp ModuleNotFoundError: No module named 'imp'

Test Cases

Install python3.12 on Amazon Linux 2023 or Amazon Linux 2. Use python3.12 to run the cfn-signal

Other Details

No response