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

[BUG] - CloudFormation helper scripts fail on Ubuntu 24.04 #2025

Open frh-td opened 2 months ago

frh-td commented 2 months ago

Name of the resource

Other

Resource Name

No response

Issue Description

Running CloudFormation helper scripts (version 2.0-29 installed from https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz) fails on Ubuntu 24.04.

The errors are related to use of the imp module, which was removed in Python 3.12. If I fix those, there are also errors related to from .packages.six.moves imports.

Expected Behavior

cfn-init and the other helper scripts should run without errors.

Observed Behavior

When run, the scripts produce Python errors.

Test Cases

Other Details

No response

b0tting commented 2 days ago

+1 on this. It is currently not possible to deploy Ubuntu 24.04 on EC2 with the helper scripts (ie. cfn-signal). The issues are all related to deprecated imports that are now either removed (imp) or were moved out of the package.six.moves into their own classes. If I solve all of these the cfn-* tools work as expected.

Are the helper scripts on github? I can't find them, so I can't offer a pull request.

b0tting commented 14 hours ago

NB: AWS support suggested installing Python 3.11, that works if you install the helper scripts from a virtual environment. I have a gist with that solution here: https://gist.github.com/b0tting/f1a83a8ecca42ae37cc2c40d6174cead