AWS::CloudFormation::Init - Support Python 3 for helper scripts
Currently aws-cfn-bootstrap scripts use Python 2 only syntax, so they are incompatible with Python3.
Latest version of the scripts on the bucket seems that the aws-cfn-bootstrap scripts are untouched since almost a year:
<Contents>
<Key>aws-cfn-bootstrap-latest.tar.gz</Key>
<LastModified>2018-09-04T23:12:44.000Z</LastModified>
<ETag>"1787d9d75f764f4a79c899ce073d23a8"</ETag>
<Size>462514</Size>
<StorageClass>STANDARD</StorageClass>
</Contents>
Python 2 End Of Life is coming at the end of this year (2019).
Current Linux distributions only ships Python3.
-> Make helper scripts Python 3 compatible.
aws-cfn-bootstrap scripts can be used on machines with only Python 3 installed.
Original AWS Forums message: https://forums.aws.amazon.com/thread.jspa?threadID=305749&tstart=75
Any update on this? Python 2 is now officially dead, but still required for the CloudFormation helper scripts.
I too am wondering what the status of this is. In the past week Ubuntu 20.04 developers seem to be culling Python2 packages which had been letting me limp along with installing aws-cfn-bootstrap-latest but now it appears that the end is here.
It would also be nice to support IMDSv2 as well. https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/
Can these scripts be open-sourced and managed on github so people can contribute? I would be happy to submit a PR somewhere for IMDSv2 support.
I too am wondering what the status of this is. In the past week Ubuntu 20.04 developers seem to be culling Python2 packages which had been letting me limp along with installing
aws-cfn-bootstrap-latestbut now it appears that the end is here.
In the middle of rolling out RHEL 8 into AWS. Kind of painful to have to install a wholly-deprecated language-version just so can execute CFn templates to deploy those new instances. :(
FYI, this is what I'm using to bootstrap cfn-init on Ubuntu 20 until a Python 3 release of cfn-init is made.
apt-get install -y python2 python-setuptools wget
wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz
tar -xzvf aws-cfn-bootstrap-latest.tar.gz
cd aws-cfn-bootstrap-1.4/
python2 setup.py install
# replace shebang to specify python2
sed -i "s~/usr/bin/env python~/usr/bin/env python2~" /usr/local/bin/cfn-*
I'd like to see this updated to work for python3.
I need python 3 support too.
Any expected timeline when can we get this with python 3 ?
Short answer: about six weeks. Longer answer: aws-cfn-bootstrap package is currently being migrated from Python 2.x to Python 3. The team is actively working on getting this shipped. Current estimate is on or shortly after July 15, 2020.
Short answer: about six weeks. Longer answer:
aws-cfn-bootstrappackage is currently being migrated from Python 2.x to Python 3. The team is actively working on getting this shipped. Current estimate is on or shortly after July 15, 2020.
@luiseduardocolon any idea if the plan is to package it in the same way aws cli v2 is being self-contained ? If so would be a massive step fwd as folks won't have to rely on a specific python3 runtime
python /usr/lib/python2.7/dist-packages/easy_install.py --script-dir /opt/aws/bin https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz
Easy install is... a little easier? from the point you have the tar down.
A standalone cfn-signal would be ideal
Short answer: about six weeks. Longer answer:
aws-cfn-bootstrappackage is currently being migrated from Python 2.x to Python 3. The team is actively working on getting this shipped. Current estimate is on or shortly after July 15, 2020.
@luiseduardocolon any update when this will be ready? the previously estimated timeline has already passed.
Looks like there is a python3 compatible version on their official docs
Helper scripts now support Python 3.4. See this doc page for more info (thanks @lenguatako ).
Most helpful comment
Short answer: about six weeks. Longer answer:
aws-cfn-bootstrappackage is currently being migrated from Python 2.x to Python 3. The team is actively working on getting this shipped. Current estimate is on or shortly after July 15, 2020.