I checked my ec2 system version:
cat /etc/system-release
Amazon Linux release 2 (Karoo)
cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
The new version of certbot seems to require snapd to install, but Amazon Linux release 2 does not seem to support the installation of snapd.
sudo yum install snapd
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00
No package snapd available.
Error: Nothing to do
I did not see the relevant system version in the installation teaching of snapd:

I don’t know if Amazon Linux release 2 should be classified in CentOS?
Amazon Linux release 2 is not included in the options, nor did I see the related words.
Epel-release and dnf are mentioned in the CentOS teaching, but they don’t seem to support installation.

Or ec2 just used other methods to install certbot?
AWS has another way to install certbot, instructions are here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html#letsencrypt