For Amazon AL2023 version, use dnf
. DNF is the successor to YUM (from AL2).
https://docs.aws.amazon.com/linux/al2023/ug/package-management.html
To install python3:
sudo dnf install python3
Some images should have it already installed:
Package python3-3.9.16-1.amzn2023.0.9.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!