id
stringlengths
8
78
source
stringclasses
743 values
chunk_id
int64
1
5.05k
text
stringlengths
593
49.7k
al2-ug-008
al2-ug.pdf
8
nspr nss nss-pem nss-softokn nss-softokn-freebl 1.3.0 4.25.0 3.53.1 1.0.3 3.53.1 3.53.1 User Guide AL2 AMI 2.1 0.26 0.92 2.9.8 6.0 6.0 6.0 2.0 2.7.1 0.52.15 0.52.15 1.3.0 4.35.0 3.90.0 1.0.3 3.90.0 3.90.0 AL1 and AL2 AMI comparison 29 Amazon Linux 2 Package nss-sysinit nss-tools nss-util ntp ntpdate ntsysv numactl numactl-libs openldap openssh openssh-clients openssh-server openssl openssl-libs os-prober p11-kit p11-kit-trust pam pam_ccreds pam_krb5 AL1 AMI AL2 AMI User Guide 3.90.0 3.90.0 3.90.0 1.7.4 2.0.9 2.4.44 7.4p1 7.4p1 7.4p1 1.0.2k 1.0.2k 1.58 0.23.22 0.23.22 1.1.8 3.53.1 3.53.1 3.53.1 4.2.8p15 4.2.8p15 1.3.49.3 2.0.7 2.4.40 7.4p1 7.4p1 7.4p1 1.0.2k 0.18.5 0.18.5 1.1.8 10 2.3.11 AL1 and AL2 AMI comparison 30 AL1 AMI AL2 AMI User Guide Amazon Linux 2 Package pam_passwdqc parted passwd pciutils pciutils-libs pcre pcre2 perl perl-Carp perl-Digest perl-Digest-HMAC perl-Digest-MD5 perl-Digest-SHA perl-Encode perl-Exporter perl-File-Path 1.0.5 2.1 0.79 3.1.10 3.1.10 8.21 5.16.3 1.26 1.17 1.03 2.52 5.85 2.51 5.68 2.09 perl-File-Temp 0.23.01 perl-Filter perl-Getopt-Long perl-HTTP-Tiny 1.49 2.40 0.033 3.1 0.79 3.5.1 3.5.1 8.32 10.23 5.16.3 1.26 2.51 5.68 2.09 0.23.01 1.49 2.40 0.033 AL1 and AL2 AMI comparison 31 Amazon Linux 2 Package perl-PathTools perl-Pod-Escapes perl-Pod-Perldoc perl-Pod-Simple perl-Pod-Usage perl-Scalar-List-Utils perl-Socket perl-Storable perl-Text-ParseWords perl-Time-HiRes perl-Time-Local perl-constant perl-libs perl-macros perl-parent perl-podlators perl-threads perl-threads-shared pinentry pkgconfig AL1 AMI AL2 AMI User Guide 3.40 1.04 3.20 3.28 1.63 1.27 2.010 2.45 3.29 1.9725 1.2300 1.27 5.16.3 5.16.3 0.225 2.5.1 1.87 1.43 0.7.6 0.27.1 3.40 1.04 3.20 3.28 1.63 1.27 2.010 2.45 3.29 1.9725 1.2300 1.27 5.16.3 5.16.3 0.225 2.5.1 1.87 1.43 0.8.1 0.27.1 AL1 and AL2 AMI comparison 32 Amazon Linux 2 Package plymouth plymouth-core-libs plymouth-scripts pm-utils policycoreutils popt postfix procmail procps procps-ng psacct psmisc pth pygpgme pyliblzma pystache python python-babel python-backports python-backports-ssl_match_ hostname AL1 AMI AL2 AMI User Guide 1.4.1 2.1.12 1.13 3.22 3.2.8 6.3.2 22.20 2.0.7 0.8.9 0.8.9 0.8.9 1.4.1 2.5 1.13 2.10.1 3.3.10 6.6.1 22.20 2.0.7 0.3 0.5.3 0.5.3 2.7.18 0.9.6 1.0 3.5.0.1 AL1 and AL2 AMI comparison 33 Amazon Linux 2 Package python-cffi python-chardet python-configobj python-daemon python-devel python-docutils python-enum34 python-idna python-iniparse python-ipaddress python-jinja2 python-jsonpatch python-jsonpointer python-jwcrypto python-kitchen python-libs python-lockfile python-markupsafe python-pillow python-ply AL1 AMI AL2 AMI User Guide 1.6.0 2.2.1 4.7.2 1.6 2.7.18 0.12 1.0.4 2.4 0.4 1.0.16 2.7.2 1.2 1.9 0.4.2 1.1.1 2.7.18 0.9.1 0.11 2.0.0 3.4 AL1 and AL2 AMI comparison 34 Amazon Linux 2 Package python-pycparser python-pycurl python-repoze-lru python-requests python-simplejson python-urlgrabber python-urllib3 python2-botocore python2-colorama python2-cryptography python2-dateutil python2-futures python2-jmespath python2-jsonschema python2-oauthlib python2-pyasn1 python2-rpm python2-rsa python2-s3transfer python2-setuptools AL1 AMI AL2 AMI User Guide 2.14 7.19.0 0.4 2.6.0 3.2.0 3.10 1.25.9 1.18.6 0.3.9 1.7.2 2.6.1 3.0.5 0.9.3 2.5.1 2.0.1 0.1.9 4.11.3 3.4.1 0.3.3 41.2.0 AL1 and AL2 AMI comparison 35 User Guide AL2 AMI 1.11.0 Amazon Linux 2 Package python2-six python27 python27-PyYAML python27-babel python27-backports AL1 AMI 2.7.18 3.10 0.9.4 1.0 python27-backports-ssl_matc h_hostname 3.4.0.2 python27-boto python27-botocore python27-chardet python27-colorama python27-configobj python27-crypto python27-daemon python27-dateutil 2.48.0 1.17.31 2.0.1 0.4.1 4.7.2 2.6.1 1.5.2 2.1 python27-devel 2.7.18 python27-docutils python27-ecdsa python27-futures python27-imaging python27-iniparse 0.11 0.11 3.0.3 1.1.6 0.3.1 AL1 and AL2 AMI comparison 36 Amazon Linux 2 Package python27-jinja2 python27-jmespath python27-jsonpatch python27-jsonpointer python27-kitchen python27-libs python27-lockfile python27-markupsafe AL1 AMI AL2 AMI User Guide 2.7.2 0.9.2 1.2 1.0 1.1.1 2.7.18 0.8 0.11 python27-paramiko 1.15.1 python27-pip python27-ply python27-pyasn1 9.0.3 3.4 0.1.7 python27-pycurl 7.19.0 python27-pygpgme python27-pyliblzma python27-pystache python27-pyxattr python27-requests python27-rsa 0.3 0.5.3 0.5.3 0.5.0 1.2.3 3.4.1 python27-setuptools 36.2.7 AL1 and AL2 AMI comparison 37 Amazon Linux 2 Package python27-simplejson python27-six python27-urlgrabber python27-urllib3 python27-virtualenv python3 python3-daemon python3-docutils python3-libs python3-lockfile python3-pip python3-pystache python3-setuptools python3-simplejson pyxattr qrencode-libs quota quota-nls rdate readline AL1 AMI AL2 AMI User Guide 3.6.5 1.8.0 3.10 1.24.3 15.1.0 4.00 4.00 6.2 3.7.16 2.2.3 0.14 3.7.16 0.11.0 20.2.2 0.5.4 49.1.3 3.2.0 0.5.1 3.4.1 4.01 4.01 1.4 6.2 AL1 and AL2 AMI comparison 38 Amazon Linux 2 Package rmt rng-tools rootfiles rpcbind rpm rpm-build-libs rpm-libs rpm-plugin-systemd-inhibit rpm-python27 rsync rsyslog ruby ruby20 ruby20-irb ruby20-libs rubygem20-bigdecimal rubygem20-json rubygem20-psych rubygem20-rdoc AL1 AMI AL2 AMI User Guide 6.8 8.1 0.2.0 4.11.3 4.11.3 4.11.3 4.11.3 3.1.2 8.24.0 0.4 5 8.1 0.2.0 4.11.3 4.11.3 4.11.3 4.11.3 3.0.6 5.8.10 2.0 2.0.0.648 2.0.0.648 2.0.0.648 1.2.0 1.8.3 2.0.0 4.2.2 rubygems20 2.0.14.1 AL1 and AL2 AMI comparison 39 Amazon Linux 2 Package scl-utils screen sed selinux-policy selinux-policy-targeted sendmail setserial setup setuptool sgpio shadow-utils shared-mime-info slang sqlite sssd-client strace sudo sysctl-defaults sysfsutils sysstat AL1 AMI 4.0.3 4.2.1 8.14.4 2.17 2.8.14 1.2.0.10 4.1.4.2 1.1 2.2.1 3.7.17 1.8.23 1.0 2.1.0 User Guide AL2 AMI 20130529 4.1.0 4.2.2 3.13.1 3.13.1 2.17 2.8.71 1.19.11 1.2.0.10 4.1.5.1 1.8 2.2.4 3.7.17 1.16.5 4.26 1.8.23 1.0 10.1.5 AL1 and AL2 AMI comparison 40 Amazon Linux 2 Package system-release systemd systemd-libs systemd-sysv systemtap-runtime sysvinit sysvinit-tools tar tcp_wrappers tcp_wrappers-libs tcpdump tcsh teamd time tmpwatch traceroute ttmkfdir tzdata tzdata-java udev AL1 AMI 2018.03 2.87 1.26 7.6 7.6 1.7 2.9.16 2.0.14 3.0.9 2023c 2023c 173 User Guide AL2 AMI 2 219 219 219 4.5 2.88 1.26 7.6 7.6 4.9.2 6.18.01 1.27 1.7 2.0.22 2023c AL1 and AL2 AMI comparison 41 Amazon Linux 2 Package unzip update-motd upstart
al2-ug-009
al2-ug.pdf
9
1.0 2.1.0 User Guide AL2 AMI 20130529 4.1.0 4.2.2 3.13.1 3.13.1 2.17 2.8.71 1.19.11 1.2.0.10 4.1.5.1 1.8 2.2.4 3.7.17 1.16.5 4.26 1.8.23 1.0 10.1.5 AL1 and AL2 AMI comparison 40 Amazon Linux 2 Package system-release systemd systemd-libs systemd-sysv systemtap-runtime sysvinit sysvinit-tools tar tcp_wrappers tcp_wrappers-libs tcpdump tcsh teamd time tmpwatch traceroute ttmkfdir tzdata tzdata-java udev AL1 AMI 2018.03 2.87 1.26 7.6 7.6 1.7 2.9.16 2.0.14 3.0.9 2023c 2023c 173 User Guide AL2 AMI 2 219 219 219 4.5 2.88 1.26 7.6 7.6 4.9.2 6.18.01 1.27 1.7 2.0.22 2023c AL1 and AL2 AMI comparison 41 Amazon Linux 2 Package unzip update-motd upstart usermode ustr util-linux vim-common vim-data vim-enhanced vim-filesystem vim-minimal virt-what wget which words xfsdump xfsprogs xorg-x11-font-utils xorg-x11-fonts-Type1 AL1 AMI AL2 AMI User Guide 6.0 1.1.2 1.111 1.0.4 2.30.2 9.0.2081 9.0.2081 9.0.2081 9.0.2081 9.0.2081 1.18 1.14 2.20 3.0 3.1.8 5.0.0 6.0 1.0.1 0.6.5 1.0.4 2.23.2 9.0.1712 9.0.1712 9.0.1712 9.0.1712 9.0.1712 1.18 2.19 3.0 7.2 7.2 xxd 9.0.1712 9.0.2081 AL1 and AL2 AMI comparison 42 AL1 AMI AL2 AMI User Guide Amazon Linux 2 Package xz xz-libs yajl yum yum-langpacks yum-metadata-parser yum-plugin-priorities 5.2.2 5.2.2 3.4.3 1.1.4 1.1.31 yum-plugin-upgrade-helper 1.1.31 yum-utils zip zlib 1.1.31 3.0 1.2.8 5.2.2 5.2.2 2.0.4 3.4.3 0.4.2 1.1.4 1.1.31 1.1.31 3.0 1.2.7 Comparing packages installed on AL1 and AL2 base container images Package AL1 Container AL2 Container amazon-linux-extras basesystem bash bzip2-libs 10.0 4.2.46 1.0.6 2.0.3 10.0 4.2.46 1.0.6 ca-certificates 2023.2.62 2023.2.62 AL1 and AL2 container comparison 43 Amazon Linux 2 Package chkconfig coreutils cpio curl cyrus-sasl-lib db4 db4-utils diffutils elfutils-libelf expat file-libs filesystem findutils gawk gdbm glib2 glibc glibc-common glibc-langpack-en glibc-minimal-langpack AL1 Container AL2 Container User Guide 1.3.49.3 8.22 7.61.1 2.1.23 4.7.25 4.7.25 0.168 2.1.0 5.37 2.4.30 3.1.7 1.8.0 2.36.3 2.17 2.17 1.7.4 8.22 2.12 8.3.0 2.1.26 3.3 0.176 2.1.0 5.11 3.2 4.5.11 4.0.2 1.13 2.56.1 2.26 2.26 2.26 2.26 AL1 and AL2 container comparison 44 Amazon Linux 2 Package gmp gnupg2 gpgme grep gzip info keyutils-libs krb5-libs libacl libassuan libattr libblkid libcap libcom_err libcrypt libcurl libdb libdb-utils libffi libgcc AL1 Container AL2 Container User Guide 6.0.0 2.0.28 1.4.3 2.20 1.5 5.1 1.5.8 1.15.1 2.2.49 2.0.3 2.4.46 2.16 1.43.5 7.61.1 3.0.13 6.0.0 2.0.22 1.3.2 2.20 5.1 1.5.8 1.15.1 2.2.51 2.1.0 2.4.46 2.30.2 2.54 1.42.9 2.26 8.3.0 5.3.21 5.3.21 3.0.13 7.3.1 AL1 and AL2 container comparison 45 Amazon Linux 2 Package libgcc72 libgcrypt libgpg-error libicu libidn2 libmetalink libmount libnghttp2 libpsl libselinux libsepol libssh2 libstdc++ libstdc++72 libtasn1 libunistring libuuid libverto libxml2 libxml2-python27 AL1 Container AL2 Container User Guide 7.2.1 1.5.3 1.11 50.2 2.3.0 1.33.0 0.6.2 2.1.10 2.1.7 1.4.2 7.2.1 2.3 0.9.3 0.2.5 2.9.1 2.9.1 1.5.3 1.12 2.3.0 0.1.3 2.30.2 1.41.0 2.5 2.5 1.4.3 7.3.1 4.10 0.9.3 2.30.2 0.2.5 2.9.1 AL1 and AL2 container comparison 46 Amazon Linux 2 Package lua make ncurses ncurses-base ncurses-libs nspr nss nss-pem nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util openldap openssl openssl-libs p11-kit p11-kit-trust pcre pinentry AL1 Container AL2 Container User Guide 5.1.4 3.82 5.7 5.7 5.7 4.25.0 3.53.1 1.0.3 3.53.1 3.53.1 3.53.1 3.53.1 3.53.1 2.4.40 1.0.2k 0.18.5 0.18.5 8.21 0.7.6 5.1.4 6.0 6.0 6.0 4.35.0 3.90.0 1.0.3 3.90.0 3.90.0 3.90.0 3.90.0 3.90.0 2.4.44 1.0.2k 0.23.22 0.23.22 8.32 0.8.1 AL1 and AL2 container comparison 47 Amazon Linux 2 Package pkgconfig popt pth pygpgme pyliblzma python python-iniparse python-libs python-pycurl python-urlgrabber python2-rpm python27 python27-chardet python27-iniparse python27-kitchen python27-libs python27-pycurl python27-pygpgme python27-pyliblzma python27-pyxattr AL1 Container AL2 Container User Guide 1.13 2.0.7 0.3 0.5.3 2.7.18 0.4 2.7.18 7.19.0 3.10 4.11.3 0.27.1 1.13 2.0.7 2.7.18 2.0.1 0.3.1 1.1.1 2.7.18 7.19.0 0.3 0.5.3 0.5.0 AL1 and AL2 container comparison 48 Amazon Linux 2 Package AL1 Container AL2 Container User Guide python27-urlgrabber 3.10 pyxattr readline rpm rpm-build-libs rpm-libs rpm-python27 sed setup shared-mime-info sqlite sysctl-defaults 6.2 4.11.3 4.11.3 4.11.3 4.11.3 4.2.1 2.8.14 1.1 3.7.17 1.0 0.5.1 6.2 4.11.3 4.11.3 4.11.3 4.2.2 2.8.71 1.8 3.7.17 system-release 2018.03 2 tar tzdata vim-data vim-minimal xz-libs yum yum-metadata-parser 1.26 2023c 5.2.2 3.4.3 1.1.4 2023c 9.0.2081 9.0.2081 5.2.2 3.4.3 1.1.4 AL1 and AL2 container comparison 49 Amazon Linux 2 Package yum-plugin-ovl yum-plugin-priorities yum-utils zlib AL1 Container AL2 Container User Guide 1.1.31 1.1.31 1.1.31 1.2.8 1.1.31 1.1.31 1.2.7 AL1 and AL2 container comparison 50 Amazon Linux 2 User Guide AL2 on Amazon EC2 Note AL2 is no longer the current version of Amazon Linux. AL2023 is the successor to AL2. For more information, see Comparing AL2 and AL2023 and the list of Package changes in AL2023 in the AL2023 User Guide. Topics • Launch Amazon EC2 instance with AL2 AMI • Find the latest AL2 AMI using Systems Manager • Connect to an Amazon EC2 instance • AL2 AMI boot mode • Package repository • Using cloud-init on AL2 • Configure AL2 instances • User provided kernels • AL2 AMI release notifications • Configure the AL2 MATE desktop connection • AL2 Tutorials Launch Amazon EC2 instance with AL2 AMI You can launch an Amazon EC2 instance with the AL2 AMI. For more information, see
al2-ug-010
al2-ug.pdf
10
Comparing AL2 and AL2023 and the list of Package changes in AL2023 in the AL2023 User Guide. Topics • Launch Amazon EC2 instance with AL2 AMI • Find the latest AL2 AMI using Systems Manager • Connect to an Amazon EC2 instance • AL2 AMI boot mode • Package repository • Using cloud-init on AL2 • Configure AL2 instances • User provided kernels • AL2 AMI release notifications • Configure the AL2 MATE desktop connection • AL2 Tutorials Launch Amazon EC2 instance with AL2 AMI You can launch an Amazon EC2 instance with the AL2 AMI. For more information, see Step 1: Launch an instance. Find the latest AL2 AMI using Systems Manager Amazon EC2 provides AWS Systems Manager public parameters for public AMIs maintained by AWS that you can use when launching instances. For example, the EC2-provided parameter / Launch Amazon EC2 instance with AL2 AMI 51 Amazon Linux 2 User Guide aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2 is available in all Regions and always points to the latest version of the AL2 AMI in a given Region. To find the latest AL2023 AMI using AWS Systems Manager, see Get started with AL2023. The Amazon EC2 AMI public parameters are available from the following path: /aws/service/ami-amazon-linux-latest You can view a list of all Amazon Linux AMIs in the current AWS Region by running the following AWS CLI command. aws ssm get-parameters-by-path --path /aws/service/ami-amazon-linux-latest --query "Parameters[].Name" To launch an instance using a public parameter The following example uses the EC2-provided public parameter to launch an m5.xlarge instance using the latest AL2 AMI. To specify the parameter in the command, use the following syntax: resolve:ssm:public- parameter, where resolve:ssm is the standard prefix and public-parameter is the path and name of the public parameter. In this example, the --count and --security-group parameters are not included. For --count, the default is 1. If you have a default VPC and a default security group, they are used. aws ec2 run-instances --image-id resolve:ssm:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64- gp2 --instance-type m5.xlarge --key-name MyKeyPair For more information, see Using public parameters in the AWS Systems Manager User Guide and Query for the latest Amazon Linux AMI IDs Using AWS Systems Manager Parameter Store. Connect to an Amazon EC2 instance There are several ways to connect to your Amazon Linux instance, including SSH, AWS Systems Manager Session Manager, and EC2 Instance Connect. For more information, see Connect to your Linux instance in the Amazon EC2 User Guide. Connect to an Amazon EC2 instance 52 Amazon Linux 2 SSH users and sudo User Guide Amazon Linux does not allow remote root secure shell (SSH) by default. Also, password authentication is disabled to prevent brute force attacks. To enable SSH logins to an Amazon Linux instance, you must provide your key pair to the instance at launch. You must also set the security group used to launch your instance to allow SSH access. By default, the only account that can log in remotely using SSH is ec2-user. This account also has sudo privileges. If you enable remote root login, be aware that it is less secure than relying on key pairs and a secondary user. AL2 AMI boot mode AL2 AMIs don't have a boot mode parameter set. Instances launched from AL2 AMIs follow the default boot mode value of the instance type. For more information, see Boot modes in the Amazon EC2 User Guide. Package repository This information applies to AL2. For information about AL2023, see Manage packages and operating system updates in AL2023 in the Amazon Linux 2023 User Guide. AL2 and AL1 are designed to be used with online package repositories hosted in each Amazon EC2 AWS Region. The repositories are available in all Regions and are accessed using yum update tools. Hosting repositories in each Region enables us to deploy updates quickly and without any data transfer charges. Important The last version of AL1 reached EOL on December 31, 2023 and will not receive any security updates or bug fixes starting January 1, 2024. For more information, see Amazon Linux AMI end-of-life. If you don't need to preserve data or customizations for your instances, you can launch new instances using the current AL2 AMI. If you do need to preserve data or customizations for your instances, you can maintain those instances through the Amazon Linux package repositories. These repositories contain all the updated packages. You can choose to apply these updates to your running instances. Earlier versions of the AMI and update packages continue to be available for use, even as new versions are released. AL2 AMI boot mode 53 Amazon Linux 2 Note User Guide To update and install packages without internet access on an Amazon EC2 instance, see How can I update yum or install packages without internet access on my Amazon EC2 instances running AL1, AL2, or AL2023? To install packages, use
al2-ug-011
al2-ug.pdf
11
instances, you can maintain those instances through the Amazon Linux package repositories. These repositories contain all the updated packages. You can choose to apply these updates to your running instances. Earlier versions of the AMI and update packages continue to be available for use, even as new versions are released. AL2 AMI boot mode 53 Amazon Linux 2 Note User Guide To update and install packages without internet access on an Amazon EC2 instance, see How can I update yum or install packages without internet access on my Amazon EC2 instances running AL1, AL2, or AL2023? To install packages, use the following command: [ec2-user ~]$ sudo yum install package If you find that Amazon Linux doesn't contain an application that you need, you can install the application directly on your Amazon Linux instance. Amazon Linux uses RPMs and yum for package management, and that is likely the most direct way to install new applications. You should check to see if an application is available in our central Amazon Linux repository first, because many applications are available there. From there, you can add these applications to your Amazon Linux instance. To upload your applications onto a running Amazon Linux instance, use scp or sftp and then configure the application by logging in to your instance. Your applications can also be uploaded during the instance launch by using the PACKAGE_SETUP action from the built-in cloud-init package. For more information, see Using cloud-init on AL2. Security updates Security updates are provided using the package repositories. Both security updates and updated AMI security alerts are published in the Amazon Linux Security Center. For more information about AWS security policies or to report a security problem, see AWS Cloud Security. AL1 and AL2 are configured to download and install critical or important security updates at launch time. Kernel updates are not included in this configuration. In AL2023, this configuration has changed compared to AL1 and AL2. For more information about security updates for AL2023, see Security updates and features in the Amazon Linux 2023 User Guide. We recommend that you make the necessary updates for your use case after launch. For example, you might want to apply all updates (not just security updates) at launch, or evaluate each update and apply only the ones applicable to your system. This is controlled using the following cloud- Security updates 54 Amazon Linux 2 User Guide init setting: repo_upgrade. The following snippet of cloud-init configuration shows how you can change the settings in the user data text you pass to your instance initialization: #cloud-config repo_upgrade: security The possible values for repo_upgrade are as follows: critical Apply outstanding critical security updates. important Apply outstanding critical and important security updates. medium Apply outstanding critical, important, and medium security updates. low Apply all outstanding security updates, including low-severity security updates. security Apply outstanding critical or important updates that Amazon marks as security updates. bugfix Apply updates that Amazon marks as bug fixes. Bug fixes are a larger set of updates, which include security updates and fixes for various other minor bugs. all Apply all applicable available updates, regardless of their classification. none Don't apply any updates to the instance on start up. Note Amazon Linux does not mark any updates as bugfix. To apply non-security related updates from Amazon Linux use repo_upgrade: all. Security updates 55 Amazon Linux 2 User Guide The default setting for repo_upgrade is security. That is, if you don't specify a different value in your user data, by default, Amazon Linux performs the security upgrades at launch for any packages installed at that time. Amazon Linux also notifies you of any updates to the installed packages by listing the number of available updates upon login using the /etc/motd file. To install these updates, you need to run sudo yum upgrade on the instance. Repository configuration For AL1 and AL2, AMIs are a snapshot of the packages available at the time the AMI was created, with the exception of security updates. Any packages not on the original AMI, but installed at runtime, will be the latest version available. To get the latest packages available for AL2, run yum update -y. Troubleshooting tip If you get a cannot allocate memory error running yum update on nano instance types, such as t3.nano, you might need to allocate swap space to enable the update. For AL2023, the repository configuration has changed compared to AL1 and AL2. For more information about the AL2023 repository, see Managing packages and operating system updates. Versions up to AL2023 were configured to deliver a continuous flow of updates to roll from one minor version of Amazon Linux to the next version, also called rolling releases. As a best practice, we recommend you update your AMI to the latest available AMI rather than launching old AMIs and
al2-ug-012
al2-ug.pdf
12
memory error running yum update on nano instance types, such as t3.nano, you might need to allocate swap space to enable the update. For AL2023, the repository configuration has changed compared to AL1 and AL2. For more information about the AL2023 repository, see Managing packages and operating system updates. Versions up to AL2023 were configured to deliver a continuous flow of updates to roll from one minor version of Amazon Linux to the next version, also called rolling releases. As a best practice, we recommend you update your AMI to the latest available AMI rather than launching old AMIs and applying updates. In-place upgrades are not supported between major Amazon Linux versions, such as from AL1 to AL2 or from AL2 to AL2023. For more information, see Amazon Linux availability. Using cloud-init on AL2 The cloud-init package is an open-source application built by Canonical that is used to bootstrap Linux images in a cloud computing environment, such as Amazon EC2. Amazon Linux contains a customized version of cloud-init. This allows you to specify actions that should happen to your instance at boot time. You can pass desired actions to cloud-init through the user data fields when launching an instance. This means you can use common AMIs for many use cases and configure them dynamically at startup. Amazon Linux also uses cloud-init to perform initial configuration of the ec2-user account. Repository configuration 56 Amazon Linux 2 User Guide For more information, see the cloud-init documentation. Amazon Linux uses the cloud-init actions found in /etc/cloud/cloud.cfg.d and /etc/cloud/ cloud.cfg. You can create your own cloud-init action files in /etc/cloud/cloud.cfg.d. All files in this directory are read by cloud-init. They are read in lexical order, and later files overwrite values in earlier files. The cloud-init package performs these (and other) common configuration tasks for instances at boot: • Set the default locale. • Set the hostname. • Parse and handle user data. • Generate host private SSH keys. • Add a user's public SSH keys to .ssh/authorized_keys for easy login and administration. • Prepare the repositories for package management. • Handle package actions defined in user data. • Run user scripts found in user data. • Mount instance store volumes, if applicable. • By default, the ephemeral0 instance store volume is mounted at /media/ephemeral0 if it is present and contains a valid file system; otherwise, it is not mounted. • By default, any swap volumes associated with the instance are mounted (only for m1.small and c1.medium instance types). • You can override the default instance store volume mount with the following cloud-init directive: #cloud-config mounts: - [ ephemeral0 ] For more control over mounts, see Mounts in the cloud-init documentation. • Instance store volumes that support TRIM are not formatted when an instance launches, so you must partition and format them before you can mount them. For more information, see Instance store volume TRIM support. You can use the disk_setup module to partition and Using cloud-init on AL2 57 Amazon Linux 2 User Guide format your instance store volumes at boot. For more information, see Disk Setup in the cloud- init documentation. Supported user data formats The cloud-init package supports user data handling of a variety of formats: • Gzip • If user data is gzip compressed, cloud-init decompresses the data and handles it appropriately. • MIME multipart • Using a MIME multipart file, you can specify more than one type of data. For example, you could specify both a user data script and a cloud config type. Each part of the multipart file can be handled by cloud-init if it is one of the supported formats. • Base64 decoding • If user data is base64-encoded, cloud-init determines if it can understand the decoded data as one of the supported types. If it understands the decoded data, it decodes the data and handles it appropriately. If not, it returns the base64 data intact. • User data script • Begins with #! or Content-Type: text/x-shellscript. • The script is run by /etc/init.d/cloud-init-user-scripts during the first boot cycle. This occurs late in the boot process (after the initial configuration actions are performed). • Include file • Begins with #include or Content-Type: text/x-include-url. • This content is an include file. The file contains a list of URLs, one per line. Each of the URLs is read, and their content passed through this same set of rules. The content read from the URL can be gzip compressed, MIME-multi-part, or plaintext. • Cloud config data • Begins with #cloud-config or Content-Type: text/cloud-config. • This content is cloud config data. • Upstart job (not supported on AL2) • Begins with #upstart-job or Content-Type: text/upstart-job. • This content is stored in a file in /etc/init, and upstart consumes the content as it does with other upstart jobs. Supported user data formats
al2-ug-013
al2-ug.pdf
13
an include file. The file contains a list of URLs, one per line. Each of the URLs is read, and their content passed through this same set of rules. The content read from the URL can be gzip compressed, MIME-multi-part, or plaintext. • Cloud config data • Begins with #cloud-config or Content-Type: text/cloud-config. • This content is cloud config data. • Upstart job (not supported on AL2) • Begins with #upstart-job or Content-Type: text/upstart-job. • This content is stored in a file in /etc/init, and upstart consumes the content as it does with other upstart jobs. Supported user data formats 58 Amazon Linux 2 • Cloud boothook User Guide • Begins with #cloud-boothook or Content-Type: text/cloud-boothook. • This content is boothook data. It is stored in a file under /var/lib/cloud and then runs immediately. • This is the earliest hook available. There is no mechanism provided for running it only one time. The boothook must take care of this itself. It is provided with the instance ID in the environment variable INSTANCE_ID. Use this variable to provide a once-per-instance set of boothook data. Configure AL2 instances After you have successfully launched and logged into your AL2 instance, you can make changes to it. There are many different ways you can configure an instance to meet the needs of a specific application. The following are some common tasks to help get you started. Contents • Common configuration scenarios • Manage software on your AL2 instance • Processor state control for your Amazon EC2 AL2 instance • I/O scheduler for AL2 • Change the hostname of your AL2 instance • Set up dynamic DNS on your AL2 instance • Configure your network interface using ec2-net-utils for AL2 Common configuration scenarios The base distribution of Amazon Linux contains the software packages and utilities that are required for basic server operations. However, many more software packages are available in various software repositories, and even more packages are available for you to build from source code. For more information on installing and building software from these locations, see Manage software on your AL2 instance. Amazon Linux instances come pre-configured with an ec2-user, but you may want to add other users that do not have super-user privileges. For more information on adding and removing users, see Manage users on your Linux instance in the Amazon EC2 User Guide. Configure instances 59 Amazon Linux 2 User Guide If you have your own network with a domain name registered to it, you can change the hostname of an instance to identify itself as part of that domain. You can also change the system prompt to show a more meaningful name without changing the hostname settings. For more information, see Change the hostname of your AL2 instance. You can configure an instance to use a dynamic DNS service provider. For more information, see Set up dynamic DNS on your AL2 instance. When you launch an instance in Amazon EC2, you have the option of passing user data to the instance that can be used to perform common configuration tasks and even run scripts after the instance starts. You can pass two types of user data to Amazon EC2: cloud-init directives and shell scripts. For more information, see Run commands on your Linux instance at launch in the Amazon EC2 User Guide. Manage software on your AL2 instance The base distribution of Amazon Linux contains the software packages and utilities that are required for basic server operations. This information applies to AL2. For information about AL2023, see Manage packages and operating system updates in AL2023 in the Amazon Linux 2023 User Guide. It is important to keep software up to date. Many packages in a Linux distribution are updated frequently to fix bugs, add features, and protect against security exploits. For more information, see Update instance software on your AL2 instance. By default, AL2 instances launch with the following repositories enabled: • amzn2-core • amzn2extra-docker While there are many packages available in these repositories that are updated by AWS, there might be a package that you want to install that is contained in another repository. For more information, see Add repositories on an AL2 instance. For help finding and installing packages in enabled repositories, see Find and install software packages on an AL2 instance. Not all software is available in software packages stored in repositories; some software must be compiled on an instance from its source code. For more information, see Prepare to compile software on an AL2 instance. Manage software 60 Amazon Linux 2 User Guide AL2 instances manage their software using the yum package manager. The yum package manager can install, remove, and update software, as well as manage all of the dependencies for each package. Contents • Update instance software on your AL2 instance • Add repositories
al2-ug-014
al2-ug.pdf
14
packages in enabled repositories, see Find and install software packages on an AL2 instance. Not all software is available in software packages stored in repositories; some software must be compiled on an instance from its source code. For more information, see Prepare to compile software on an AL2 instance. Manage software 60 Amazon Linux 2 User Guide AL2 instances manage their software using the yum package manager. The yum package manager can install, remove, and update software, as well as manage all of the dependencies for each package. Contents • Update instance software on your AL2 instance • Add repositories on an AL2 instance • Find and install software packages on an AL2 instance • Prepare to compile software on an AL2 instance Update instance software on your AL2 instance It is important to keep software up to date. Packages in a Linux distribution are updated frequently to fix bugs, add features, and protect against security exploits. When you first launch and connect to an Amazon Linux instance, you might see a message asking you to update software packages for security purposes. This section shows how to update an entire system, or just a single package. This information applies to AL2. For information about AL2023, see Manage packages and operating system updates in AL2023 in the Amazon Linux 2023 User Guide. For information about changes and updates to AL2, see AL2 release notes. For information about changes and updates to AL2023, see AL2023 release notes. Important If you launched an EC2 instance that uses an Amazon Linux 2 AMI into an IPv6-only subnet, you must connect to the instance and run sudo amazon-linux-https disable. This lets your AL2 instance connect to the yum repository in S3 over IPv6 using the http patch service. To update all packages on an AL2 instance 1. (Optional) Start a screen session in your shell window. Sometimes you might experience a network interruption that can disconnect the SSH connection to your instance. If this happens during a long software update, it can leave the instance in a recoverable, although confused Manage software 61 Amazon Linux 2 User Guide state. A screen session allows you to continue running the update even if your connection is interrupted, and you can reconnect to the session later without problems. a. Execute the screen command to begin the session. [ec2-user ~]$ screen b. If your session is disconnected, log back into your instance and list the available screens. [ec2-user ~]$ screen -ls There is a screen on: 17793.pts-0.ip-12-34-56-78 (Detached) 1 Socket in /var/run/screen/S-ec2-user. c. Reconnect to the screen using the screen -r command and the process ID from the previous command. [ec2-user ~]$ screen -r 17793 d. When you are finished using screen, use the exit command to close the session. [ec2-user ~]$ exit [screen is terminating] 2. Run the yum update command. Optionally, you can add the --security flag to apply only security updates. [ec2-user ~]$ sudo yum update 3. Review the packages listed, enter y, and press Enter to accept the updates. Updating all of the packages on a system can take several minutes. The yum output shows the status of the update while it is running. 4. (Optional) Reboot your instance to ensure that you are using the latest packages and libraries from your update; kernel updates are not loaded until a reboot occurs. Updates to any glibc libraries should also be followed by a reboot. For updates to packages that control services, it might be sufficient to restart the services to pick up the updates, but a system reboot ensures that all previous package and library updates are complete. Manage software 62 Amazon Linux 2 User Guide To update a single package on an AL2 instance Use this procedure to update a single package (and its dependencies) and not the entire system. 1. Run the yum update command with the name of the package to update. [ec2-user ~]$ sudo yum update openssl 2. Review the package information listed, enter y, and press Enter to accept the update or updates. Sometimes there will be more than one package listed if there are package dependencies that must be resolved. The yum output shows the status of the update while it is running. 3. (Optional) Reboot your instance to ensure that you are using the latest packages and libraries from your update; kernel updates are not loaded until a reboot occurs. Updates to any glibc libraries should also be followed by a reboot. For updates to packages that control services, it might be sufficient to restart the services to pick up the updates, but a system reboot ensures that all previous package and library updates are complete. Add repositories on an AL2 instance This information applies to AL2. For information about AL2023, see Deterministic upgrades through versioned repositories on
al2-ug-015
al2-ug.pdf
15
while it is running. 3. (Optional) Reboot your instance to ensure that you are using the latest packages and libraries from your update; kernel updates are not loaded until a reboot occurs. Updates to any glibc libraries should also be followed by a reboot. For updates to packages that control services, it might be sufficient to restart the services to pick up the updates, but a system reboot ensures that all previous package and library updates are complete. Add repositories on an AL2 instance This information applies to AL2. For information about AL2023, see Deterministic upgrades through versioned repositories on AL2023 in the Amazon Linux 2023 User Guide. By default, AL2 instances launch with the following repositories enabled: • amzn2-core • amzn2extra-docker While there are many packages available in these repositories that are updated by Amazon Web Services, there might be a package that you want to install that is contained in another repository. To install a package from a different repository with yum, you need to add the repository information to the /etc/yum.conf file or to its own repository.repo file in the /etc/ yum.repos.d directory. You can do this manually, but most yum repositories provide their own repository.repo file at their repository URL. To determine what yum repositories are already installed List the installed yum repositories with the following command: Manage software 63 Amazon Linux 2 User Guide [ec2-user ~]$ yum repolist all The resulting output lists the installed repositories and reports the status of each. Enabled repositories display the number of packages they contain. To add a yum repository to /etc/yum.repos.d 1. Find the location of the .repo file. This will vary depending on the repository you are adding. In this example, the .repo file is at https://www.example.com/repository.repo. 2. Add the repository with the yum-config-manager command. [ec2-user ~]$ sudo yum-config-manager --add-repo https:// www.example.com/repository.repo Loaded plugins: priorities, update-motd, upgrade-helper adding repo from: https://www.example.com/repository.repo grabbing file https://www.example.com/repository.repo to /etc/ yum.repos.d/repository.repo repository.repo | 4.0 kB 00:00 repo saved to /etc/yum.repos.d/repository.repo After you install a repository, you must enable it as described in the next procedure. To enable a yum repository in /etc/yum.repos.d Use the yum-config-manager command with the --enable repository flag. The following command enables the Extra Packages for Enterprise Linux (EPEL) repository from the Fedora project. By default, this repository is present in /etc/yum.repos.d on Amazon Linux AMI instances, but it is not enabled. [ec2-user ~]$ sudo yum-config-manager --enable epel For more information, and to download the latest version of this package, see https:// fedoraproject.org/wiki/EPEL. Find and install software packages on an AL2 instance You can use a package management tool to find and install software packages. In Amazon Linux 2, the default software package management tool is YUM. In AL2023, the default software package Manage software 64 Amazon Linux 2 User Guide management tool is DNF. For more information, see Package management tool in the Amazon Linux 2023 User Guide. Find software packages on an AL2 instance You can use the yum search command to search the descriptions of packages that are available in your configured repositories. This is especially helpful if you don't know the exact name of the package you want to install. Simply append the keyword search to the command; for multiple word searches, wrap the search query with quotation marks. [ec2-user ~]$ yum search "find" The following is example output. Loaded plugins: extras_suggestions, langpacks, priorities, update-motd ============================== N/S matched: find =============================== findutils.x86_64 : The GNU versions of find utilities (find and xargs) gedit-plugin-findinfiles.x86_64 : gedit findinfiles plugin ocaml-findlib-devel.x86_64 : Development files for ocaml-findlib perl-File-Find-Rule.noarch : Perl module implementing an alternative interface to File::Find robotfindskitten.x86_64 : A game/zen simulation. You are robot. Your job is to find kitten. mlocate.x86_64 : An utility for finding files by name ocaml-findlib.x86_64 : Objective CAML package manager and build helper perl-Devel-Cycle.noarch : Find memory cycles in objects perl-Devel-EnforceEncapsulation.noarch : Find access violations to blessed objects perl-File-Find-Rule-Perl.noarch : Common rules for searching for Perl things perl-File-HomeDir.noarch : Find your home and other directories on any platform perl-IPC-Cmd.noarch : Finding and running system commands made easy perl-Perl-MinimumVersion.noarch : Find a minimum required version of perl for Perl code texlive-xesearch.noarch : A string finder for XeTeX valgrind.x86_64 : Tool for finding memory management bugs in programs valgrind.i686 : Tool for finding memory management bugs in programs Multiple word search queries in quotation marks only return results that match the exact query. If you don't see the expected package, simplify your search to one keyword and then scan the results. You can also try keyword synonyms to broaden your search. For more information about packages for AL2, see the following: • AL2 Extras Library Manage software 65 Amazon Linux 2 • Package repository Install software packages on an AL2 instance User Guide In AL2, the yum package management tool searches all of your enabled
al2-ug-016
al2-ug.pdf
16
bugs in programs valgrind.i686 : Tool for finding memory management bugs in programs Multiple word search queries in quotation marks only return results that match the exact query. If you don't see the expected package, simplify your search to one keyword and then scan the results. You can also try keyword synonyms to broaden your search. For more information about packages for AL2, see the following: • AL2 Extras Library Manage software 65 Amazon Linux 2 • Package repository Install software packages on an AL2 instance User Guide In AL2, the yum package management tool searches all of your enabled repositories for different software packages and handles any dependencies in the software installation process. For information about installing software packages in AL2023, see Managing packages and operating system updates in the Amazon Linux 2023 User Guide. To install a package from a repository Use the yum install package command, replacing package with the name of the software to install. For example, to install the links text-based web browser, enter the following command. [ec2-user ~]$ sudo yum install links To install RPM package files that you have downloaded You can also use yum install to install RPM package files that you have downloaded from the internet. To do this, append the path name of an RPM file to the installation command instead of a repository package name. [ec2-user ~]$ sudo yum install my-package.rpm To list installed packages To view a list of installed packages on your instance, use the following command. [ec2-user ~]$ yum list installed Prepare to compile software on an AL2 instance Open-source software is available on the internet that has not been pre-compiled and made available for download from a package repository. You might eventually discover a software package that you need to compile yourself, from its source code. For your system to be able to compile software in AL2 and Amazon Linux, you need to install several development tools, such as make, gcc, and autoconf. Manage software 66 Amazon Linux 2 User Guide Because software compilation is not a task that every Amazon EC2 instance requires, these tools are not installed by default, but they are available in a package group called "Development Tools" that is easily added to an instance with the yum groupinstall command. [ec2-user ~]$ sudo yum groupinstall "Development Tools" Software source code packages are often available for download (from websites such as https:// github.com/ and http://sourceforge.net/) as a compressed archive file, called a tarball. These tarballs will usually have the .tar.gz file extension. You can decompress these archives with the tar command. [ec2-user ~]$ tar -xzf software.tar.gz After you have decompressed and unarchived the source code package, you should look for a README or INSTALL file in the source code directory that can provide you with further instructions for compiling and installing the source code. To retrieve source code for Amazon Linux packages Amazon Web Services provides the source code for maintained packages. You can download the source code for any installed packages with the yumdownloader --source command. Run the yumdownloader --source package command to download the source code for package. For example, to download the source code for the htop package, enter the following command. [ec2-user ~]$ yumdownloader --source htop Loaded plugins: priorities, update-motd, upgrade-helper Enabling amzn-updates-source repository Enabling amzn-main-source repository amzn-main-source | 1.9 kB 00:00:00 amzn-updates-source | 1.9 kB 00:00:00 (1/2): amzn-updates-source/latest/primary_db | 52 kB 00:00:00 (2/2): amzn-main-source/latest/primary_db | 734 kB 00:00:00 htop-1.0.1-2.3.amzn1.src.rpm Manage software 67 Amazon Linux 2 User Guide The location of the source RPM is in the directory from which you ran the command. Processor state control for your Amazon EC2 AL2 instance C-states control the sleep levels that a core can enter when it is idle. C-states are numbered starting with C0 (the shallowest state where the core is totally awake and executing instructions) and go to C6 (the deepest idle state where a core is powered off). P-states control the desired performance (in CPU frequency) from a core. P-states are numbered starting from P0 (the highest performance setting where the core is allowed to use Intel Turbo Boost Technology to increase frequency if possible), and they go from P1 (the P-state that requests the maximum baseline frequency) to P15 (the lowest possible frequency). You might want to change the C-state or P-state settings to increase processor performance consistency, reduce latency, or tune your instance for a specific workload. The default C-state and P-state settings provide maximum performance, which is optimal for most workloads. However, if your application would benefit from reduced latency at the cost of higher single- or dual-core frequencies, or from consistent performance at lower frequencies as opposed to bursty Turbo Boost frequencies, consider experimenting with the C-state or P-state settings that are available to these instances. For information about Amazon EC2 instance types
al2-ug-017
al2-ug.pdf
17
frequency) to P15 (the lowest possible frequency). You might want to change the C-state or P-state settings to increase processor performance consistency, reduce latency, or tune your instance for a specific workload. The default C-state and P-state settings provide maximum performance, which is optimal for most workloads. However, if your application would benefit from reduced latency at the cost of higher single- or dual-core frequencies, or from consistent performance at lower frequencies as opposed to bursty Turbo Boost frequencies, consider experimenting with the C-state or P-state settings that are available to these instances. For information about Amazon EC2 instance types that provide the ability for the operating system to control processor C-states and P-states, see Processor state control for your Amazon EC2 instance in the Amazon EC2 User Guide. The following sections describe the different processor state configurations and how to monitor the effects of your configuration. These procedures were written for, and apply to Amazon Linux; however, they might also work for other Linux distributions with a Linux kernel version of 3.9 or newer. Note The examples on this page use the following: • The turbostat utility to display processor frequency and C-state information. The turbostat utility is available on Amazon Linux by default. • The stress command to simulate a workload. To install stress, first enable the EPEL repository by running sudo amazon-linux-extras install epel, and then run sudo yum install -y stress. Processor state control 68 Amazon Linux 2 User Guide If the output does not display the C-state information, include the --debug option in the command (sudo turbostat --debug stress <options>). Contents • Highest performance with maximum Turbo Boost frequency • High performance and low latency by limiting deeper C-states • Baseline performance with the lowest variability Highest performance with maximum Turbo Boost frequency This is the default processor state control configuration for the Amazon Linux AMI, and it is recommended for most workloads. This configuration provides the highest performance with lower variability. Allowing inactive cores to enter deeper sleep states provides the thermal headroom required for single or dual core processes to reach their maximum Turbo Boost potential. The following example shows a c4.8xlarge instance with two cores actively performing work reaching their maximum processor Turbo Boost frequency. [ec2-user ~]$ sudo turbostat stress -c 2 -t 10 stress: info: [30680] dispatching hogs: 2 cpu, 0 io, 0 vm, 0 hdd stress: info: [30680] successful run completed in 10s pk cor CPU %c0 GHz TSC SMI %c1 %c3 %c6 %c7 %pc2 %pc3 %pc6 %pc7 Pkg_W RAM_W PKG_% RAM_% 5.54 3.44 2.90 0 9.18 0.00 85.28 0.00 0.00 0.00 0.00 0.00 94.04 32.70 54.18 0.00 0 0 0 0.12 3.26 2.90 0 3.61 0.00 96.27 0.00 0.00 0.00 0.00 0.00 48.12 18.88 26.02 0.00 0 0 18 0.12 3.26 2.90 0 3.61 0 1 1 0.12 3.26 2.90 0 4.11 0.00 95.77 0.00 0 1 19 0.13 3.27 2.90 0 4.11 0 2 2 0.13 3.28 2.90 0 4.45 0.00 95.42 0.00 0 2 20 0.11 3.27 2.90 0 4.47 0 3 3 0.05 3.42 2.90 0 99.91 0.00 0.05 0.00 0 3 21 97.84 3.45 2.90 0 2.11 ... 1 1 10 0.06 3.33 2.90 0 99.88 0.01 0.06 0.00 1 1 28 97.61 3.44 2.90 0 2.32 Processor state control 69 Amazon Linux 2 ... 10.002556 sec User Guide In this example, vCPUs 21 and 28 are running at their maximum Turbo Boost frequency because the other cores have entered the C6 sleep state to save power and provide both power and thermal headroom for the working cores. vCPUs 3 and 10 (each sharing a processor core with vCPUs 21 and 28) are in the C1 state, waiting for instruction. In the following example, all 18 cores are actively performing work, so there is no headroom for maximum Turbo Boost, but they are all running at the "all core Turbo Boost" speed of 3.2 GHz. [ec2-user ~]$ sudo turbostat stress -c 36 -t 10 stress: info: [30685] dispatching hogs: 36 cpu, 0 io, 0 vm, 0 hdd stress: info: [30685] successful run completed in 10s pk cor CPU %c0 GHz TSC SMI %c1 %c3 %c6 %c7 %pc2 %pc3 %pc6 %pc7 Pkg_W RAM_W PKG_% RAM_% 99.27 3.20 2.90 0 0.26 0.00 0.47 0.00 0.00 0.00 0.00 0.00 228.59 31.33 199.26 0.00 0 0 0 99.08 3.20 2.90 0 0.27 0.01 0.64 0.00 0.00 0.00 0.00 0.00 114.69 18.55 99.32 0.00 0 0 18 98.74 3.20 2.90 0 0.62 0 1 1 99.14 3.20 2.90 0 0.09 0.00 0.76 0.00 0 1 19 98.75 3.20 2.90 0 0.49 0 2 2 99.07 3.20 2.90 0 0.10 0.02 0.81 0.00 0 2 20 98.73 3.20 2.90 0 0.44 0 3 3 99.02 3.20 2.90 0 0.24 0.00 0.74 0.00 0 3 21 99.13 3.20 2.90 0 0.13 0
al2-ug-018
al2-ug.pdf
18
3.20 2.90 0 0.26 0.00 0.47 0.00 0.00 0.00 0.00 0.00 228.59 31.33 199.26 0.00 0 0 0 99.08 3.20 2.90 0 0.27 0.01 0.64 0.00 0.00 0.00 0.00 0.00 114.69 18.55 99.32 0.00 0 0 18 98.74 3.20 2.90 0 0.62 0 1 1 99.14 3.20 2.90 0 0.09 0.00 0.76 0.00 0 1 19 98.75 3.20 2.90 0 0.49 0 2 2 99.07 3.20 2.90 0 0.10 0.02 0.81 0.00 0 2 20 98.73 3.20 2.90 0 0.44 0 3 3 99.02 3.20 2.90 0 0.24 0.00 0.74 0.00 0 3 21 99.13 3.20 2.90 0 0.13 0 4 4 99.26 3.20 2.90 0 0.09 0.00 0.65 0.00 0 4 22 98.68 3.20 2.90 0 0.67 0 5 5 99.19 3.20 2.90 0 0.08 0.00 0.73 0.00 0 5 23 98.58 3.20 2.90 0 0.69 0 6 6 99.01 3.20 2.90 0 0.11 0.00 0.89 0.00 0 6 24 98.72 3.20 2.90 0 0.39 ... High performance and low latency by limiting deeper C-states C-states control the sleep levels that a core may enter when it is inactive. You may want to control C-states to tune your system for latency versus performance. Putting cores to sleep takes time, and although a sleeping core allows more headroom for another core to boost to a higher frequency, it takes time for that sleeping core to wake back up and perform work. For example, if a core that Processor state control 70 Amazon Linux 2 User Guide is assigned to handle network packet interrupts is asleep, there may be a delay in servicing that interrupt. You can configure the system to not use deeper C-states, which reduces the processor reaction latency, but that in turn also reduces the headroom available to other cores for Turbo Boost. A common scenario for disabling deeper sleep states is a Redis database application, which stores the database in system memory for the fastest possible query response time. To limit deeper sleep states on AL2 1. Open the /etc/default/grub file with your editor of choice. [ec2-user ~]$ sudo vim /etc/default/grub 2. Edit the GRUB_CMDLINE_LINUX_DEFAULT line and add the intel_idle.max_cstate=1 and processor.max_cstate=1 options to set C1 as the deepest C-state for idle cores. GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 nvme_core.io_timeout=4294967295 intel_idle.max_cstate=1 processor.max_cstate=1" GRUB_TIMEOUT=0 The intel_idle.max_cstate=1 option configures the C-state limit for Intel-based instances, and the processor.max_cstate=1 option configures the C-state limit for AMD- based instances. It is safe to add both options to your configuration. This allows a single configuration to set the desired behavior on both Intel and AMD. 3. Save the file and exit your editor. 4. Run the following command to rebuild the boot configuration. [ec2-user ~]$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg 5. Reboot your instance to enable the new kernel option. [ec2-user ~]$ sudo reboot To limit deeper sleep states on Amazon Linux AMI 1. Open the /boot/grub/grub.conf file with your editor of choice. Processor state control 71 Amazon Linux 2 User Guide [ec2-user ~]$ sudo vim /boot/grub/grub.conf 2. Edit the kernel line of the first entry and add the intel_idle.max_cstate=1 and processor.max_cstate=1 options to set C1 as the deepest C-state for idle cores. # created by imagebuilder default=0 timeout=1 hiddenmenu title Amazon Linux 2014.09 (3.14.26-24.46.amzn1.x86_64) root (hd0,0) kernel /boot/vmlinuz-3.14.26-24.46.amzn1.x86_64 root=LABEL=/ console=ttyS0 intel_idle.max_cstate=1 processor.max_cstate=1 initrd /boot/initramfs-3.14.26-24.46.amzn1.x86_64.img The intel_idle.max_cstate=1 option configures the C-state limit for Intel-based instances, and the processor.max_cstate=1 option configures the C-state limit for AMD- based instances. It is safe to add both options to your configuration. This allows a single configuration to set the desired behavior on both Intel and AMD. 3. Save the file and exit your editor. 4. Reboot your instance to enable the new kernel option. [ec2-user ~]$ sudo reboot The following example shows a c4.8xlarge instance with two cores actively performing work at the "all core Turbo Boost" core frequency. [ec2-user ~]$ sudo turbostat stress -c 2 -t 10 stress: info: [5322] dispatching hogs: 2 cpu, 0 io, 0 vm, 0 hdd stress: info: [5322] successful run completed in 10s pk cor CPU %c0 GHz TSC SMI %c1 %c3 %c6 %c7 %pc2 %pc3 %pc6 %pc7 Pkg_W RAM_W PKG_% RAM_% 5.56 3.20 2.90 0 94.44 0.00 0.00 0.00 0.00 0.00 0.00 0.00 131.90 31.11 199.47 0.00 0 0 0 0.03 2.08 2.90 0 99.97 0.00 0.00 0.00 0.00 0.00 0.00 0.00 67.23 17.11 99.76 0.00 0 0 18 0.01 1.93 2.90 0 99.99 Processor state control 72 Amazon Linux 2 User Guide 0 1 1 0.02 1.96 2.90 0 99.98 0.00 0.00 0.00 0 1 19 99.70 3.20 2.90 0 0.30 ... 1 1 10 0.02 1.97 2.90 0 99.98 0.00 0.00 0.00 1 1 28 99.67 3.20 2.90 0 0.33 1 2 11 0.04 2.63 2.90 0 99.96 0.00 0.00 0.00 1 2 29 0.02 2.11 2.90 0 99.98 ... In this example, the cores for vCPUs 19 and 28
al2-ug-019
al2-ug.pdf
19
2.90 0 99.97 0.00 0.00 0.00 0.00 0.00 0.00 0.00 67.23 17.11 99.76 0.00 0 0 18 0.01 1.93 2.90 0 99.99 Processor state control 72 Amazon Linux 2 User Guide 0 1 1 0.02 1.96 2.90 0 99.98 0.00 0.00 0.00 0 1 19 99.70 3.20 2.90 0 0.30 ... 1 1 10 0.02 1.97 2.90 0 99.98 0.00 0.00 0.00 1 1 28 99.67 3.20 2.90 0 0.33 1 2 11 0.04 2.63 2.90 0 99.96 0.00 0.00 0.00 1 2 29 0.02 2.11 2.90 0 99.98 ... In this example, the cores for vCPUs 19 and 28 are running at 3.2 GHz, and the other cores are in the C1 C-state, awaiting instruction. Although the working cores are not reaching their maximum Turbo Boost frequency, the inactive cores will be much faster to respond to new requests than they would be in the deeper C6 C-state. Baseline performance with the lowest variability You can reduce the variability of processor frequency with P-states. P-states control the desired performance (in CPU frequency) from a core. Most workloads perform better in P0, which requests Turbo Boost. But you may want to tune your system for consistent performance rather than bursty performance that can happen when Turbo Boost frequencies are enabled. Intel Advanced Vector Extensions (AVX or AVX2) workloads can perform well at lower frequencies, and AVX instructions can use more power. Running the processor at a lower frequency, by disabling Turbo Boost, can reduce the amount of power used and keep the speed more consistent. For more information about optimizing your instance configuration and workload for AVX, see the Intel website . CPU idle drivers control P-state. Newer CPU generations require updated CPU idle drivers that correspond to the kernel level as follows: • Linux kernel versions 5.6 and higher (for example, m6i) – Supports Intel Icelake. • Linux kernel versions 5.10 and higher (for example, m6a) – Supports AMD Milan. To detect if a running system's kernel recognizes the CPU, run the following command. if [ -d /sys/devices/system/cpu/cpu0/cpuidle ]; then echo "C-state control enabled"; else echo "Kernel cpuidle driver does not recognize this CPU generation"; fi If the output of this command indicates a lack of support, we recommend that you upgrade the kernel. Processor state control 73 Amazon Linux 2 User Guide This section describes how to limit deeper sleep states and disable Turbo Boost (by requesting the P1 P-state) to provide low-latency and the lowest processor speed variability for these types of workloads. To limit deeper sleep states and disable Turbo Boost on AL2 1. Open the /etc/default/grub file with your editor of choice. [ec2-user ~]$ sudo vim /etc/default/grub 2. Edit the GRUB_CMDLINE_LINUX_DEFAULT line and add the intel_idle.max_cstate=1 and processor.max_cstate=1 options to set C1 as the deepest C-state for idle cores. GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 nvme_core.io_timeout=4294967295 intel_idle.max_cstate=1 processor.max_cstate=1" GRUB_TIMEOUT=0 The intel_idle.max_cstate=1 option configures the C-state limit for Intel-based instances, and the processor.max_cstate=1 option configures the C-state limit for AMD- based instances. It is safe to add both options to your configuration. This allows a single configuration to set the desired behavior on both Intel and AMD. 3. Save the file and exit your editor. 4. Run the following command to rebuild the boot configuration. [ec2-user ~]$ grub2-mkconfig -o /boot/grub2/grub.cfg 5. Reboot your instance to enable the new kernel option. [ec2-user ~]$ sudo reboot 6. When you need the low processor speed variability that the P1 P-state provides, run the following command to disable Turbo Boost. [ec2-user ~]$ sudo sh -c "echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo" 7. When your workload is finished, you can re-enable Turbo Boost with the following command. [ec2-user ~]$ sudo sh -c "echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo" Processor state control 74 Amazon Linux 2 User Guide To limit deeper sleep states and disable Turbo Boost on Amazon Linux AMI 1. Open the /boot/grub/grub.conf file with your editor of choice. [ec2-user ~]$ sudo vim /boot/grub/grub.conf 2. Edit the kernel line of the first entry and add the intel_idle.max_cstate=1 and processor.max_cstate=1 options to set C1 as the deepest C-state for idle cores. # created by imagebuilder default=0 timeout=1 hiddenmenu title Amazon Linux 2014.09 (3.14.26-24.46.amzn1.x86_64) root (hd0,0) kernel /boot/vmlinuz-3.14.26-24.46.amzn1.x86_64 root=LABEL=/ console=ttyS0 intel_idle.max_cstate=1 processor.max_cstate=1 initrd /boot/initramfs-3.14.26-24.46.amzn1.x86_64.img The intel_idle.max_cstate=1 option configures the C-state limit for Intel-based instances, and the processor.max_cstate=1 option configures the C-state limit for AMD- based instances. It is safe to add both options to your configuration. This allows a single configuration to set the desired behavior on both Intel and AMD. 3. Save the file and exit your editor. 4. Reboot your instance to enable the new kernel option. [ec2-user ~]$ sudo reboot 5. When you need the low processor speed variability that the P1 P-state provides, run the following command to disable Turbo Boost. [ec2-user ~]$ sudo sh -c "echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo" 6. When your workload
al2-ug-020
al2-ug.pdf
20
the C-state limit for Intel-based instances, and the processor.max_cstate=1 option configures the C-state limit for AMD- based instances. It is safe to add both options to your configuration. This allows a single configuration to set the desired behavior on both Intel and AMD. 3. Save the file and exit your editor. 4. Reboot your instance to enable the new kernel option. [ec2-user ~]$ sudo reboot 5. When you need the low processor speed variability that the P1 P-state provides, run the following command to disable Turbo Boost. [ec2-user ~]$ sudo sh -c "echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo" 6. When your workload is finished, you can re-enable Turbo Boost with the following command. [ec2-user ~]$ sudo sh -c "echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo" Processor state control 75 Amazon Linux 2 User Guide The following example shows a c4.8xlarge instance with two vCPUs actively performing work at the baseline core frequency, with no Turbo Boost. [ec2-user ~]$ sudo turbostat stress -c 2 -t 10 stress: info: [5389] dispatching hogs: 2 cpu, 0 io, 0 vm, 0 hdd stress: info: [5389] successful run completed in 10s pk cor CPU %c0 GHz TSC SMI %c1 %c3 %c6 %c7 %pc2 %pc3 %pc6 %pc7 Pkg_W RAM_W PKG_% RAM_% 5.59 2.90 2.90 0 94.41 0.00 0.00 0.00 0.00 0.00 0.00 0.00 128.48 33.54 200.00 0.00 0 0 0 0.04 2.90 2.90 0 99.96 0.00 0.00 0.00 0.00 0.00 0.00 0.00 65.33 19.02 100.00 0.00 0 0 18 0.04 2.90 2.90 0 99.96 0 1 1 0.05 2.90 2.90 0 99.95 0.00 0.00 0.00 0 1 19 0.04 2.90 2.90 0 99.96 0 2 2 0.04 2.90 2.90 0 99.96 0.00 0.00 0.00 0 2 20 0.04 2.90 2.90 0 99.96 0 3 3 0.05 2.90 2.90 0 99.95 0.00 0.00 0.00 0 3 21 99.95 2.90 2.90 0 0.05 ... 1 1 28 99.92 2.90 2.90 0 0.08 1 2 11 0.06 2.90 2.90 0 99.94 0.00 0.00 0.00 1 2 29 0.05 2.90 2.90 0 99.95 The cores for vCPUs 21 and 28 are actively performing work at the baseline processor speed of 2.9 GHz, and all inactive cores are also running at the baseline speed in the C1 C-state, ready to accept instructions. I/O scheduler for AL2 The I/O scheduler is a part of the Linux operating system that sorts and merges I/O requests and determines the order in which they are processed. I/O schedulers are particularly beneficial for devices such as magnetic hard drives, where seek time can be expensive and where it is optimal to merge co-located requests. I/O schedulers have less of an effect with solid state devices and virtualized environments. This is because for solid state devices, sequential and random access don't differ, and for virtualized environments, the host provides its own layer of scheduling. This topic discusses the Amazon Linux I/O scheduler. For more information about the I/O scheduler used by other Linux distributions, refer to their respective documentation. I/O scheduler 76 Amazon Linux 2 Topics • Supported schedulers • Default scheduler • Change the scheduler Supported schedulers User Guide Amazon Linux supports the following I/O schedulers: • deadline — The Deadline I/O scheduler sorts I/O requests and handles them in the most efficient order. It guarantees a start time for each I/O request. It also gives I/O requests that have been pending for too long a higher priority. • cfq — The Completely Fair Queueing (CFQ) I/O scheduler attempts to fairly allocate I/O resources between processes. It sorts and inserts I/O requests into per-process queues. • noop — The No Operation (noop) I/O scheduler inserts all I/O requests into a FIFO queue and then merges them into a single request. This scheduler does not do any request sorting. Default scheduler No Operation (noop) is the default I/O scheduler for Amazon Linux. This scheduler is used for the following reasons: • Many instance types use virtualized devices where the underlying host performs scheduling for the instance. • Solid state devices are used in many instance types where the benefits of an I/O scheduler have less effect. • It is the least invasive I/O scheduler, and it can be customized if needed. Change the scheduler Changing the I/O scheduler can increase or decrease performance based on whether the scheduler results in more or fewer I/O requests being completed in a given time. This is largely dependent on your workload, the generation of the instance type that's being used, and the type of device being accessed. If you change the I/O scheduler being used, we recommend that you use a tool, such as iotop, to measure I/O performance and to determine whether the change is beneficial for your use case. I/O scheduler 77 Amazon Linux 2 User Guide You can view the I/O scheduler for a device using the following command, which uses nvme0n1
al2-ug-021
al2-ug.pdf
21
performance based on whether the scheduler results in more or fewer I/O requests being completed in a given time. This is largely dependent on your workload, the generation of the instance type that's being used, and the type of device being accessed. If you change the I/O scheduler being used, we recommend that you use a tool, such as iotop, to measure I/O performance and to determine whether the change is beneficial for your use case. I/O scheduler 77 Amazon Linux 2 User Guide You can view the I/O scheduler for a device using the following command, which uses nvme0n1 as an example. Replace nvme0n1 in the following command with the device listed in /sys/block on your instance. $ cat /sys/block/nvme0n1/queue/scheduler To set the I/O scheduler for the device, use the following command. $ echo cfq|deadline|noop > /sys/block/nvme0n1/queue/scheduler For example, to set the I/O scheduler for an xvda device from noop to cfq, use the following command. $ echo cfq > /sys/block/xvda/queue/scheduler Change the hostname of your AL2 instance When you launch an instance into a private VPC, Amazon EC2 assigns a guest OS hostname. The type of hostname that Amazon EC2 assigns depends on your subnet settings. For more information about EC2 hostnames, see Amazon EC2 instance hostname types in the Amazon EC2 User Guide. A typical Amazon EC2 private DNS name for an EC2 instance configured to use IP- based naming with an IPv4 address looks something like this: ip-12-34-56-78.us- west-2.compute.internal, where the name consists of the internal domain, the service (in this case, compute), the region, and a form of the private IPv4 address. Part of this hostname is displayed at the shell prompt when you log into your instance (for example, ip-12-34-56-78). Each time you stop and restart your Amazon EC2 instance (unless you are using an Elastic IP address), the public IPv4 address changes, and so does your public DNS name, system hostname, and shell prompt. Important This information applies to Amazon Linux. For information about other distributions, see their specific documentation. Change the hostname 78 Amazon Linux 2 User Guide Change the system hostname If you have a public DNS name registered for the IP address of your instance (such as webserver.mydomain.com), you can set the system hostname so your instance identifies itself as a part of that domain. This also changes the shell prompt so that it displays the first portion of this name instead of the hostname supplied by AWS (for example, ip-12-34-56-78). If you do not have a public DNS name registered, you can still change the hostname, but the process is a little different. In order for your hostname update to persist, you must verify that the preserve_hostname cloud-init setting is set to true. You can run the following command to edit or add this setting: sudo vi /etc/cloud/cloud.cfg If the preserve_hostname setting is not listed, add the following line of text to the end of the file: preserve_hostname: true To change the system hostname to a public DNS name Follow this procedure if you already have a public DNS name registered. 1. • For AL2: Use the hostnamectl command to set your hostname to reflect the fully qualified domain name (such as webserver.mydomain.com). [ec2-user ~]$ sudo hostnamectl set-hostname webserver.mydomain.com • For Amazon Linux AMI: On your instance, open the /etc/sysconfig/network configuration file in your favorite text editor and change the HOSTNAME entry to reflect the fully qualified domain name (such as webserver.mydomain.com). HOSTNAME=webserver.mydomain.com 2. Reboot the instance to pick up the new hostname. [ec2-user ~]$ sudo reboot Change the hostname 79 Amazon Linux 2 User Guide Alternatively, you can reboot using the Amazon EC2 console (on the Instances page, select the instance and choose Instance state, Reboot instance). 3. Log into your instance and verify that the hostname has been updated. Your prompt should show the new hostname (up to the first ".") and the hostname command should show the fully-qualified domain name. [ec2-user@webserver ~]$ hostname webserver.mydomain.com To change the system hostname without a public DNS name 1. • For AL2: Use the hostnamectl command to set your hostname to reflect the desired system hostname (such as webserver). [ec2-user ~]$ sudo hostnamectl set-hostname webserver.localdomain • For Amazon Linux AMI: On your instance, open the /etc/sysconfig/network configuration file in your favorite text editor and change the HOSTNAME entry to reflect the desired system hostname (such as webserver). HOSTNAME=webserver.localdomain 2. Open the /etc/hosts file in your favorite text editor and change the entry beginning with 127.0.0.1 to match the example below, substituting your own hostname. 127.0.0.1 webserver.localdomain webserver localhost4 localhost4.localdomain4 3. Reboot the instance to pick up the new hostname. [ec2-user ~]$ sudo reboot Alternatively, you can reboot using the Amazon EC2 console (on the Instances page, select the instance and choose Instance state, Reboot instance). 4. Log into your instance
al2-ug-022
al2-ug.pdf
22
On your instance, open the /etc/sysconfig/network configuration file in your favorite text editor and change the HOSTNAME entry to reflect the desired system hostname (such as webserver). HOSTNAME=webserver.localdomain 2. Open the /etc/hosts file in your favorite text editor and change the entry beginning with 127.0.0.1 to match the example below, substituting your own hostname. 127.0.0.1 webserver.localdomain webserver localhost4 localhost4.localdomain4 3. Reboot the instance to pick up the new hostname. [ec2-user ~]$ sudo reboot Alternatively, you can reboot using the Amazon EC2 console (on the Instances page, select the instance and choose Instance state, Reboot instance). 4. Log into your instance and verify that the hostname has been updated. Your prompt should show the new hostname (up to the first ".") and the hostname command should show the fully-qualified domain name. Change the hostname 80 Amazon Linux 2 User Guide [ec2-user@webserver ~]$ hostname webserver.localdomain You can also implement more programmatic solutions, such as specifying user data to configure your instance. If your instance is part of an Auto Scaling group, you can use lifecycle hooks to define user data. For more information, see Run commands on your Linux instance at launch and Lifecycle hook for instance launch in the AWS CloudFormation User Guide. Change the shell prompt without affecting the hostname If you do not want to modify the hostname for your instance, but you would like to have a more useful system name (such as webserver) displayed than the private name supplied by AWS (for example, ip-12-34-56-78), you can edit the shell prompt configuration files to display your system nickname instead of the hostname. To change the shell prompt to a host nickname 1. Create a file in /etc/profile.d that sets the environment variable called NICKNAME to the value you want in the shell prompt. For example, to set the system nickname to webserver, run the following command. [ec2-user ~]$ sudo sh -c 'echo "export NICKNAME=webserver" > /etc/profile.d/ prompt.sh' 2. Open the /etc/bashrc (Red Hat) or /etc/bash.bashrc (Debian/Ubuntu) file in your favorite text editor (such as vim or nano). You need to use sudo with the editor command because /etc/bashrc and /etc/bash.bashrc are owned by root. 3. Edit the file and change the shell prompt variable (PS1) to display your nickname instead of the hostname. Find the following line that sets the shell prompt in /etc/bashrc or /etc/ bash.bashrc (several surrounding lines are shown below for context; look for the line that starts with [ "$PS1"): # Turn on checkwinsize shopt -s checkwinsize [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " # You might want to have e.g. tty in prompt (e.g. more virtual machines) # and console windows Change the hostname 81 Amazon Linux 2 User Guide Change the \h (the symbol for hostname) in that line to the value of the NICKNAME variable. # Turn on checkwinsize shopt -s checkwinsize [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@$NICKNAME \W]\\$ " # You might want to have e.g. tty in prompt (e.g. more virtual machines) # and console windows 4. (Optional) To set the title on shell windows to the new nickname, complete the following steps. a. Create a file named /etc/sysconfig/bash-prompt-xterm. [ec2-user ~]$ sudo touch /etc/sysconfig/bash-prompt-xterm b. Make the file executable using the following command. [ec2-user ~]$ sudo chmod +x /etc/sysconfig/bash-prompt-xterm c. Open the /etc/sysconfig/bash-prompt-xterm file in your favorite text editor (such as vim or nano). You need to use sudo with the editor command because /etc/ sysconfig/bash-prompt-xterm is owned by root. d. Add the following line to the file. echo -ne "\033]0;${USER}@${NICKNAME}:${PWD/#$HOME/~}\007" 5. Log out and then log back in to pick up the new nickname value. Change the hostname on other Linux distributions The procedures on this page are intended for use with Amazon Linux only. For more information about other Linux distributions, see their specific documentation and the following articles: • How do I assign a static hostname to a private Amazon EC2 instance running RHEL 7 or Centos 7? Set up dynamic DNS on your AL2 instance When you launch an EC2 instance, it is assigned a public IP address and a public Domain Name System (DNS) name that you can use to reach it from the internet. Because there are so many Set up dynamic DNS 82 Amazon Linux 2 User Guide hosts in the Amazon Web Services domain, these public names must be quite long for each name to remain unique. A typical Amazon EC2 public DNS name looks something like this: ec2-12-34-56-78.us-west-2.compute.amazonaws.com, where the name consists of the Amazon Web Services domain, the service (in this case, compute), the AWS Region, and a form of the public IP address. Dynamic DNS services provide custom DNS host names within their domain area that can be easy to remember and that can also be more relevant to your host's use case.
al2-ug-023
al2-ug.pdf
23
many Set up dynamic DNS 82 Amazon Linux 2 User Guide hosts in the Amazon Web Services domain, these public names must be quite long for each name to remain unique. A typical Amazon EC2 public DNS name looks something like this: ec2-12-34-56-78.us-west-2.compute.amazonaws.com, where the name consists of the Amazon Web Services domain, the service (in this case, compute), the AWS Region, and a form of the public IP address. Dynamic DNS services provide custom DNS host names within their domain area that can be easy to remember and that can also be more relevant to your host's use case. Some of these services are also free of charge. You can use a dynamic DNS provider with Amazon EC2 and configure the instance to update the IP address associated with a public DNS name each time the instance starts. There are many different providers to choose from, and the specific details of choosing a provider and registering a name with them are outside the scope of this guide. To use dynamic DNS with Amazon EC2 1. Sign up with a dynamic DNS service provider and register a public DNS name with their service. This procedure uses the free service from noip.com/free as an example. 2. Configure the dynamic DNS update client. After you have a dynamic DNS service provider and a public DNS name registered with their service, point the DNS name to the IP address for your instance. Many providers (including noip.com) allow you to do this manually from your account page on their website, but many also support software update clients. If an update client is running on your EC2 instance, your dynamic DNS record is updated each time the IP address changes, as happens after a shutdown and restart. In this example, you install the noip2 client, which works with the service provided by noip.com. a. Enable the Extra Packages for Enterprise Linux (EPEL) repository to gain access to the noip2 client. Note AL2 instances have the GPG keys and repository information for the EPEL repository installed by default. For more information, and to download the latest version of this package, see https://fedoraproject.org/wiki/EPEL. [ec2-user ~]$ sudo amazon-linux-extras install epel -y b. Install the noip package. Set up dynamic DNS 83 Amazon Linux 2 User Guide [ec2-user ~]$ sudo yum install -y noip c. Create the configuration file. Enter the login and password information when prompted and answer the subsequent questions to configure the client. [ec2-user ~]$ sudo noip2 -C 3. Enable the noip service. [ec2-user ~]$ sudo systemctl enable noip.service 4. Start the noip service. [ec2-user ~]$ sudo systemctl start noip.service This command starts the client, which reads the configuration file (/etc/no-ip2.conf) that you created earlier and updates the IP address for the public DNS name that you chose. 5. Verify that the update client has set the correct IP address for your dynamic DNS name. Allow a few minutes for the DNS records to update, and then try to connect to your instance using SSH with the public DNS name that you configured in this procedure. Configure your network interface using ec2-net-utils for AL2 Amazon Linux 2 AMIs may contain additional scripts installed by AWS, known as ec2-net-utils. These scripts optionally automate the configuration of your network interfaces. These scripts are available for AL2 only. Note For Amazon Linux 2023, the amazon-ec2-net-utils package generates interface- specific configurations in the /run/systemd/network directory. For more information, see Networking service in the Amazon Linux 2023 User Guide. Use the following command to install the package on AL2 if it's not already installed, or update it if it's installed and additional updates are available: Configure network interfaces using ec2-net-utils 84 Amazon Linux 2 User Guide $ yum install ec2-net-utils The following components are part of ec2-net-utils: udev rules (/etc/udev/rules.d) Identifies network interfaces when they are attached, detached, or reattached to a running instance, and ensures that the hotplug script runs (53-ec2-network-interfaces.rules). Maps the MAC address to a device name (75-persistent-net-generator.rules, which generates 70-persistent-net.rules). hotplug script Generates an interface configuration file suitable for use with DHCP (/etc/sysconfig/ network-scripts/ifcfg-ethN). Also generates a route configuration file (/etc/ sysconfig/network-scripts/route-ethN). DHCP script Whenever the network interface receives a new DHCP lease, this script queries the instance metadata for Elastic IP addresses. For each Elastic IP address, it adds a rule to the routing policy database to ensure that outbound traffic from that address uses the correct network interface. It also adds each private IP address to the network interface as a secondary address. ec2ifup ethN (/usr/sbin/) Extends the functionality of the standard ifup. After this script rewrites the configuration files ifcfg-ethN and route-ethN, it runs ifup. ec2ifdown ethN (/usr/sbin/) Extends the functionality of the standard ifdown. After this script removes any rules for the network interface from the routing policy database, it runs ifdown. ec2ifscan
al2-ug-024
al2-ug.pdf
24
instance metadata for Elastic IP addresses. For each Elastic IP address, it adds a rule to the routing policy database to ensure that outbound traffic from that address uses the correct network interface. It also adds each private IP address to the network interface as a secondary address. ec2ifup ethN (/usr/sbin/) Extends the functionality of the standard ifup. After this script rewrites the configuration files ifcfg-ethN and route-ethN, it runs ifup. ec2ifdown ethN (/usr/sbin/) Extends the functionality of the standard ifdown. After this script removes any rules for the network interface from the routing policy database, it runs ifdown. ec2ifscan (/usr/sbin/) Checks for network interfaces that have not been configured and configures them. This script isn't available in the initial release of ec2-net-utils. To list any configuration files that were generated by ec2-net-utils, use the following command: $ ls -l /etc/sysconfig/network-scripts/*-eth? Configure network interfaces using ec2-net-utils 85 Amazon Linux 2 User Guide To disable the automation, you can add EC2SYNC=no to the corresponding ifcfg-ethN file. For example, use the following command to disable the automation for the eth1 interface: $ sed -i -e 's/^EC2SYNC=yes/EC2SYNC=no/' /etc/sysconfig/network-scripts/ifcfg-eth1 To disable the automation completely, you can remove the package using the following command: $ yum remove ec2-net-utils User provided kernels If you need a custom kernel on your Amazon EC2 instances, you can start with an AMI that is close to what you want, compile the custom kernel on your instance, and update the bootloader to point to the new kernel. This process varies depending on the virtualization type that your AMI uses. For more information, see Linux AMI virtualization types in the Amazon EC2 User Guide. Contents • HVM AMIs (GRUB) • Paravirtual AMIs (PV-GRUB) HVM AMIs (GRUB) HVM instance volumes are treated like actual physical disks. The boot process is similar to that of a bare metal operating system with a partitioned disk and bootloader, which enables it to work with all currently supported Linux distributions. The most common bootloader is GRUB or GRUB2. By default, GRUB does not send its output to the instance console because it creates an extra boot delay. For more information, see Instance console output in the Amazon EC2 User Guide. If you are installing a custom kernel, you should consider enabling GRUB output. You don't need to specify a fallback kernel, but we recommend that you have a fallback when you test a new kernel. GRUB can fall back to another kernel in the event that the new kernel fails. Having a fallback kernel enables the instance to boot even if the new kernel isn't found. The legacy GRUB for Amazon Linux uses /boot/grub/menu.lst. GRUB2 for AL2 uses /etc/ default/grub. For more information about updating the default kernel in the bootloader, see the documentation for your Linux distribution. User provided kernels 86 Amazon Linux 2 User Guide Paravirtual AMIs (PV-GRUB) AMIs that use paravirtual (PV) virtualization use a system called PV-GRUB during the boot process. PV-GRUB is a paravirtual bootloader that runs a patched version of GNU GRUB 0.97. When you start an instance, PV-GRUB starts the boot process and then chain loads the kernel specified by your image's menu.lst file. PV-GRUB understands standard grub.conf or menu.lst commands, which allows it to work with all currently supported Linux distributions. Older distributions such as Ubuntu 10.04 LTS, Oracle Enterprise Linux, or CentOS 5.x require a special "ec2" or "xen" kernel package, while newer distributions include the required drivers in the default kernel package. Most modern paravirtual AMIs use a PV-GRUB AKI by default (including all of the paravirtual Linux AMIs available in the Amazon EC2 Launch Wizard Quick Start menu), so there are no additional steps that you need to take to use a different kernel on your instance, provided that the kernel you want to use is compatible with your distribution. The best way to run a custom kernel on your instance is to start with an AMI that is close to what you want and then to compile the custom kernel on your instance and modify the menu.lst file to boot with that kernel. You can verify that the kernel image for an AMI is a PV-GRUB AKI. Run the following describe- images command (substituting your kernel image ID) and check whether the Name field starts with pv-grub: aws ec2 describe-images --filters Name=image-id,Values=aki-880531cd Contents • Limitations of PV-GRUB • Configure GRUB for paravirtual AMIs • Amazon PV-GRUB Kernel Image IDs • Update PV-GRUB Limitations of PV-GRUB PV-GRUB has the following limitations: • You can't use the 64-bit version of PV-GRUB to start a 32-bit kernel or vice versa. • You can't specify an Amazon ramdisk image (ARI) when using a PV-GRUB AKI. Paravirtual AMIs (PV-GRUB) 87 Amazon Linux 2 User Guide • AWS has tested and verified that PV-GRUB works with these file system formats:
al2-ug-025
al2-ug.pdf
25
your kernel image ID) and check whether the Name field starts with pv-grub: aws ec2 describe-images --filters Name=image-id,Values=aki-880531cd Contents • Limitations of PV-GRUB • Configure GRUB for paravirtual AMIs • Amazon PV-GRUB Kernel Image IDs • Update PV-GRUB Limitations of PV-GRUB PV-GRUB has the following limitations: • You can't use the 64-bit version of PV-GRUB to start a 32-bit kernel or vice versa. • You can't specify an Amazon ramdisk image (ARI) when using a PV-GRUB AKI. Paravirtual AMIs (PV-GRUB) 87 Amazon Linux 2 User Guide • AWS has tested and verified that PV-GRUB works with these file system formats: EXT2, EXT3, EXT4, JFS, XFS, and ReiserFS. Other file system formats might not work. • PV-GRUB can boot kernels compressed using the gzip, bzip2, lzo, and xz compression formats. • Cluster AMIs don't support or need PV-GRUB, because they use full hardware virtualization (HVM). While paravirtual instances use PV-GRUB to boot, HVM instance volumes are treated like actual disks, and the boot process is similar to the boot process of a bare metal operating system with a partitioned disk and bootloader. • PV-GRUB versions 1.03 and earlier don't support GPT partitioning; they support MBR partitioning only. • If you plan to use a logical volume manager (LVM) with Amazon Elastic Block Store (Amazon EBS) volumes, you need a separate boot partition outside of the LVM. Then you can create logical volumes with the LVM. Configure GRUB for paravirtual AMIs To boot PV-GRUB, a GRUB menu.lst file must exist in the image; the most common location for this file is /boot/grub/menu.lst. The following is an example of a menu.lst configuration file for booting an AMI with a PV-GRUB AKI. In this example, there are two kernel entries to choose from: Amazon Linux 2018.03 (the original kernel for this AMI), and Vanilla Linux 4.16.4 (a newer version of the Vanilla Linux kernel from https://www.kernel.org/). The Vanilla entry was copied from the original entry for this AMI, and the kernel and initrd paths were updated to the new locations. The default 0 parameter points the bootloader to the first entry it sees (in this case, the Vanilla entry), and the fallback 1 parameter points the bootloader to the next entry if there is a problem booting the first. default 0 fallback 1 timeout 0 hiddenmenu title Vanilla Linux 4.16.4 root (hd0) kernel /boot/vmlinuz-4.16.4 root=LABEL=/ console=hvc0 initrd /boot/initrd.img-4.16.4 title Amazon Linux 2018.03 (4.14.26-46.32.amzn1.x86_64) root (hd0) Paravirtual AMIs (PV-GRUB) 88 Amazon Linux 2 User Guide kernel /boot/vmlinuz-4.14.26-46.32.amzn1.x86_64 root=LABEL=/ console=hvc0 initrd /boot/initramfs-4.14.26-46.32.amzn1.x86_64.img You don't need to specify a fallback kernel in your menu.lst file, but we recommend that you have a fallback when you test a new kernel. PV-GRUB can fall back to another kernel in the event that the new kernel fails. Having a fallback kernel allows the instance to boot even if the new kernel isn't found. PV-GRUB checks the following locations for menu.lst, using the first one it finds: • (hd0)/boot/grub • (hd0,0)/boot/grub • (hd0,0)/grub • (hd0,1)/boot/grub • (hd0,1)/grub • (hd0,2)/boot/grub • (hd0,2)/grub • (hd0,3)/boot/grub • (hd0,3)/grub Note that PV-GRUB 1.03 and earlier only check one of the first two locations in this list. Amazon PV-GRUB Kernel Image IDs PV-GRUB AKIs are available in all Amazon EC2 regions, excluding Asia Pacific (Osaka). There are AKIs for both 32-bit and 64-bit architecture types. Most modern AMIs use a PV-GRUB AKI by default. We recommend that you always use the latest version of the PV-GRUB AKI, as not all versions of the PV-GRUB AKI are compatible with all instance types. Use the following describe-images command to get a list of the PV-GRUB AKIs for the current region: aws ec2 describe-images --owners amazon --filters Name=name,Values=pv-grub-*.gz PV-GRUB is the only AKI available in the ap-southeast-2 Region. You should verify that any AMI you want to copy to this Region is using a version of PV-GRUB that is available in this Region. Paravirtual AMIs (PV-GRUB) 89 Amazon Linux 2 User Guide The following are the current AKI IDs for each Region. Register new AMIs using an hd0 AKI. Note We continue to provide hd00 AKIs for backward compatibility in Regions where they were previously available. ap-northeast-1, Asia Pacific (Tokyo) Image ID Image Name aki-f975a998 pv-grub-hd0_1.05-i386.gz aki-7077ab11 pv-grub-hd0_1.05-x86_64.gz ap-southeast-1, Asia Pacific (Singapore) Region Image ID Image Name aki-17a40074 pv-grub-hd0_1.05-i386.gz aki-73a50110 pv-grub-hd0_1.05-x86_64.gz ap-southeast-2, Asia Pacific (Sydney) Image ID Image Name aki-ba5665d9 pv-grub-hd0_1.05-i386.gz aki-66506305 pv-grub-hd0_1.05-x86_64.gz eu-central-1, Europe (Frankfurt) Image ID Image Name aki-1419e57b pv-grub-hd0_1.05-i386.gz aki-931fe3fc pv-grub-hd0_1.05-x86_64.gz Paravirtual AMIs (PV-GRUB) 90 Amazon Linux 2 eu-west-1, Europe (Ireland) User Guide Image ID Image Name aki-1c9fd86f pv-grub-hd0_1.05-i386.gz aki-dc9ed9af pv-grub-hd0_1.05-x86_64.gz sa-east-1, South America (São Paulo) Image ID Image Name aki-7cd34110 pv-grub-hd0_1.05-i386.gz aki-912fbcfd pv-grub-hd0_1.05-x86_64.gz us-east-1, US East (N. Virginia) Image ID Image Name aki-04206613 pv-grub-hd0_1.05-i386.gz aki-5c21674b pv-grub-hd0_1.05-x86_64.gz us-gov-west-1, AWS GovCloud (US-West) Image ID Image Name aki-5ee9573f pv-grub-hd0_1.05-i386.gz aki-9ee55bff pv-grub-hd0_1.05-x86_64.gz us-west-1, US West (N. California) Image ID
al2-ug-026
al2-ug.pdf
26
Asia Pacific (Singapore) Region Image ID Image Name aki-17a40074 pv-grub-hd0_1.05-i386.gz aki-73a50110 pv-grub-hd0_1.05-x86_64.gz ap-southeast-2, Asia Pacific (Sydney) Image ID Image Name aki-ba5665d9 pv-grub-hd0_1.05-i386.gz aki-66506305 pv-grub-hd0_1.05-x86_64.gz eu-central-1, Europe (Frankfurt) Image ID Image Name aki-1419e57b pv-grub-hd0_1.05-i386.gz aki-931fe3fc pv-grub-hd0_1.05-x86_64.gz Paravirtual AMIs (PV-GRUB) 90 Amazon Linux 2 eu-west-1, Europe (Ireland) User Guide Image ID Image Name aki-1c9fd86f pv-grub-hd0_1.05-i386.gz aki-dc9ed9af pv-grub-hd0_1.05-x86_64.gz sa-east-1, South America (São Paulo) Image ID Image Name aki-7cd34110 pv-grub-hd0_1.05-i386.gz aki-912fbcfd pv-grub-hd0_1.05-x86_64.gz us-east-1, US East (N. Virginia) Image ID Image Name aki-04206613 pv-grub-hd0_1.05-i386.gz aki-5c21674b pv-grub-hd0_1.05-x86_64.gz us-gov-west-1, AWS GovCloud (US-West) Image ID Image Name aki-5ee9573f pv-grub-hd0_1.05-i386.gz aki-9ee55bff pv-grub-hd0_1.05-x86_64.gz us-west-1, US West (N. California) Image ID Image Name aki-43cf8123 pv-grub-hd0_1.05-i386.gz Paravirtual AMIs (PV-GRUB) 91 Amazon Linux 2 Image ID Image Name User Guide aki-59cc8239 pv-grub-hd0_1.05-x86_64.gz us-west-2, US West (Oregon) Image ID Image Name aki-7a69931a pv-grub-hd0_1.05-i386.gz aki-70cb0e10 pv-grub-hd0_1.05-x86_64.gz Update PV-GRUB We recommend that you always use the latest version of the PV-GRUB AKI, as not all versions of the PV-GRUB AKI are compatible with all instance types. Also, older versions of PV-GRUB are not available in all regions, so if you copy an AMI that uses an older version to a Region that does not support that version, you will be unable to boot instances launched from that AMI until you update the kernel image. Use the following procedures to check your instance's version of PV-GRUB and update it if necessary. To check your PV-GRUB version 1. Find the kernel ID for your instance. aws ec2 describe-instance-attribute --instance-id instance_id --attribute kernel -- region region { "InstanceId": "instance_id", "KernelId": "aki-70cb0e10" } The kernel ID for this instance is aki-70cb0e10. 2. View the version information of that kernel ID. aws ec2 describe-images --image-ids aki-70cb0e10 --region region Paravirtual AMIs (PV-GRUB) 92 Amazon Linux 2 { "Images": [ { "VirtualizationType": "paravirtual", "Name": "pv-grub-hd0_1.05-x86_64.gz", ... "Description": "PV-GRUB release 1.05, 64-bit" } ] } User Guide This kernel image is PV-GRUB 1.05. If your PV-GRUB version is not the newest version (as shown in Amazon PV-GRUB Kernel Image IDs), you should update it using the following procedure. To update your PV-GRUB version If your instance is using an older version of PV-GRUB, you should update it to the latest version. 1. Identify the latest PV-GRUB AKI for your Region and processor architecture from Amazon PV- GRUB Kernel Image IDs. 2. Stop your instance. Your instance must be stopped to modify the kernel image used. aws ec2 stop-instances --instance-ids instance_id --region region 3. Modify the kernel image used for your instance. aws ec2 modify-instance-attribute --instance-id instance_id --kernel kernel_id -- region region 4. Restart your instance. aws ec2 start-instances --instance-ids instance_id --region region AL2 AMI release notifications To be notified when new Amazon Linux AMIs are released, you can subscribe using Amazon SNS. AL2 AMI release notifications 93 Amazon Linux 2 User Guide For information about subscribing to notifications for AL2023, see Receiving notifications on new updates in the Amazon Linux 2023 User Guide. Note Standard support for AL1 ended on December 31, 2020. The AL1 maintenance support phase ended December 31, 2023. For more information about the AL1 EOL and maintenance support, see the blog post Update on Amazon Linux AMI end-of-life. To subscribe to Amazon Linux notifications 1. Open the Amazon SNS console at https://console.aws.amazon.com/sns/v3/home. 2. 3. 4. In the navigation bar, change the Region to US East (N. Virginia), if necessary. You must select the Region in which the SNS notification that you are subscribing to was created. In the navigation pane, choose Subscriptions, Create subscription. For the Create subscription dialog box, do the following: a. b. c. d. e. [AL2] For Topic ARN, copy and paste the following Amazon Resource Name (ARN): arn:aws:sns:us-east-1:137112412989:amazon-linux-2-ami-updates. [Amazon Linux] For Topic ARN, copy and paste the following Amazon Resource Name (ARN): arn:aws:sns:us-east-1:137112412989:amazon-linux-ami-updates. For Protocol, choose Email. For Endpoint, enter an email address that you can use to receive the notifications. Choose Create subscription. 5. You receive a confirmation email with the subject line "AWS Notification - Subscription Confirmation". Open the email and choose Confirm subscription to complete your subscription. Whenever AMIs are released, we send notifications to the subscribers of the corresponding topic. To stop receiving these notifications, use the following procedure to unsubscribe. To unsubscribe from Amazon Linux notifications 1. Open the Amazon SNS console at https://console.aws.amazon.com/sns/v3/home. AL2 AMI release notifications 94 Amazon Linux 2 User Guide 2. 3. In the navigation bar, change the Region to US East (N. Virginia), if necessary. You must use the Region in which the SNS notification was created. In the navigation pane, choose Subscriptions, select the subscription, and choose Actions, Delete subscriptions. 4. When prompted for confirmation, choose Delete. Amazon Linux AMI SNS message format The schema for the SNS message is as follows. { "description": "Validates output from AMI Release SNS message", "type": "object", "properties": { "v1": { "type": "object", "properties": { "ReleaseVersion": { "description": "Major
al2-ug-027
al2-ug.pdf
27
console at https://console.aws.amazon.com/sns/v3/home. AL2 AMI release notifications 94 Amazon Linux 2 User Guide 2. 3. In the navigation bar, change the Region to US East (N. Virginia), if necessary. You must use the Region in which the SNS notification was created. In the navigation pane, choose Subscriptions, select the subscription, and choose Actions, Delete subscriptions. 4. When prompted for confirmation, choose Delete. Amazon Linux AMI SNS message format The schema for the SNS message is as follows. { "description": "Validates output from AMI Release SNS message", "type": "object", "properties": { "v1": { "type": "object", "properties": { "ReleaseVersion": { "description": "Major release (ex. 2018.03)", "type": "string" }, "ImageVersion": { "description": "Full release (ex. 2018.03.0.20180412)", "type": "string" }, "ReleaseNotes": { "description": "Human-readable string with extra information", "type": "string" }, "Regions": { "type": "object", "description": "Each key will be a region name (ex. us-east-1)", "additionalProperties": { "type": "array", "items": { "type": "object", "properties": { "Name": { "description": "AMI Name (ex. amzn-ami- hvm-2018.03.0.20180412-x86_64-gp2)", "type": "string" }, AL2 AMI release notifications 95 Amazon Linux 2 User Guide "ImageId": { "description": "AMI Name (ex.ami-467ca739)", "type": "string" } }, "required": [ "Name", "ImageId" ] } } } }, "required": [ "ReleaseVersion", "ImageVersion", "ReleaseNotes", "Regions" ] } }, "required": [ "v1" ] } Configure the AL2 MATE desktop connection The MATE desktop environment is pre-installed and pre-configured in AMIs with the following description: ".NET Core x.x, Mono x.xx, PowerShell x.x, and MATE DE pre-installed to run your .NET applications on Amazon Linux 2 with Long Term Support (LTS)." The environment provides an intuitive graphical user interface for administering AL2 instances with minimal use of the command line. The interface uses graphical representations, such as icons, windows, toolbars, folders, wallpapers, and desktop widgets. Built-in, GUI-based tools are available to perform common tasks. For example, there are tools for adding and removing software, applying updates, organizing files, launching programs, and monitoring system health. Configure the MATE desktop connection 96 Amazon Linux 2 Important User Guide xrdp is the remote desktop software bundled in the AMI. By default, xrdp uses a self- signed TLS certificate to encrypt remote desktop sessions. Neither AWS nor the xrdp maintainers recommend using self-signed certificates in production. Instead, obtain a certificate from an appropriate certificate authority (CA) and install it on your instances. For more information about TLS configuration, see TLS security layer on the xrdp wiki. Note If you prefer to use a virtual network computing (VNC) service instead of xrdp, see the How do I install a GUI on my Amazon EC2 instance running AL2 AWS Knowledge Center article. Prerequisite To run the commands shown in this topic, you must install the AWS Command Line Interface (AWS CLI) or AWS Tools for Windows PowerShell, and configure your AWS profile. Options 1. Install the AWS CLI – For more information, see Installing the AWS CLI and Configuration basics in the AWS Command Line Interface User Guide. 2. Install the Tools for Windows PowerShell – For more information, see Installing the AWS Tools for Windows PowerShell and Shared credentials in the AWS Tools for Windows PowerShell User Guide. Tip As an alternative to doing a full installation of the AWS CLI, you can use AWS CloudShell for a browser-based, pre-authenticated shell that launches directly from the AWS Management Console. Check supported AWS Regions, to make sure it's available in the region you are working in. Prerequisite 97 Amazon Linux 2 User Guide Configure the RDP connection Follow these steps to set up a Remote Desktop Protocol (RDP) connection from your local machine to an AL2 instance running the MATE desktop environment. 1. To get the ID of the AMI for AL2 that includes MATE in the AMI name, you can use the describe-images command from your local command line tool. If you have not installed the command line tools, you can perform the following query directly from an AWS CloudShell session. For information about how to launch a shell session from CloudShell, see Getting started with AWS CloudShell. From the Amazon EC2 console, you can find the MATE-included AMI by launching an instance, and then entering MATE in the AMI search bar. The AL2 Quick Start with MATE pre-installed will appear in the search results. aws ec2 describe-images --filters "Name=name,Values=amzn2*MATE*" --query "Images[*].[ImageId,Name,Description]" [ [ "ami-0123example0abc12", "amzn2-x86_64-MATEDE_DOTNET-2020.12.04", ".NET Core 5.0, Mono 6.12, PowerShell 7.1, and MATE DE pre-installed to run your .NET applications on Amazon Linux 2 with Long Term Support (LTS)." ], [ "ami-0456example0def34", "amzn2-x86_64-MATEDE_DOTNET-2020.04.14", "Amazon Linux 2 with .Net Core, PowerShell, Mono, and MATE Desktop Environment" ] ] Choose the AMI that is appropriate for your use. 2. Launch an EC2 instance with the AMI that you located in the previous step. Configure the security group to allow for inbound TCP traffic to port 3389. For more information about configuring security groups, see Security groups
al2-ug-028
al2-ug.pdf
28
ec2 describe-images --filters "Name=name,Values=amzn2*MATE*" --query "Images[*].[ImageId,Name,Description]" [ [ "ami-0123example0abc12", "amzn2-x86_64-MATEDE_DOTNET-2020.12.04", ".NET Core 5.0, Mono 6.12, PowerShell 7.1, and MATE DE pre-installed to run your .NET applications on Amazon Linux 2 with Long Term Support (LTS)." ], [ "ami-0456example0def34", "amzn2-x86_64-MATEDE_DOTNET-2020.04.14", "Amazon Linux 2 with .Net Core, PowerShell, Mono, and MATE Desktop Environment" ] ] Choose the AMI that is appropriate for your use. 2. Launch an EC2 instance with the AMI that you located in the previous step. Configure the security group to allow for inbound TCP traffic to port 3389. For more information about configuring security groups, see Security groups for your VPC. This configuration enables you to use an RDP client to connect to the instance. 3. Connect to the instance using SSH. 4. Update the software and kernel on the instance. [ec2-user ~]$ sudo yum update Configure the RDP connection 98 Amazon Linux 2 User Guide After the update completes, reboot the instance to ensure that it is using the latest packages and libraries from the update; kernel updates are not loaded until a reboot occurs. [ec2-user ~]$ sudo reboot 5. Reconnect to the instance and run the following command on your Linux instance to set the password for ec2-user. [ec2-user ~]$ sudo passwd ec2-user 6. Install the certificate and key. If you already have a certificate and key, copy them to the /etc/xrdp/ directory as follows: • Certificate — /etc/xrdp/cert.pem • Key — /etc/xrdp/key.pem If you do not have a certificate and key, use the following command to generate them in the / etc/xrdp directory. $ sudo openssl req -x509 -sha384 -newkey rsa:3072 -nodes -keyout /etc/xrdp/key.pem -out /etc/xrdp/cert.pem -days 365 Note This command generates a certificate that is valid for 365 days. 7. Open an RDP client on the computer from which you will connect to the instance (for example, Remote Desktop Connection on a computer running Microsoft Windows). Enter ec2-user as the user name and enter the password that you set in the previous step. To disable xrdp on your Amazon EC2 instance You can disable xrdp at any time by running one of the following commands on your Linux instance. The following commands do not impact your ability to use MATE using an X11 server. [ec2-user ~]$ sudo systemctl disable xrdp Configure the RDP connection 99 Amazon Linux 2 User Guide [ec2-user ~]$ sudo systemctl stop xrdp To enable xrdp on your Amazon EC2 instance To re-enable xrdp so that you can connect to your AL2 instance running the MATE desktop environment, run one of the following commands on your Linux instance. [ec2-user ~]$ sudo systemctl enable xrdp [ec2-user ~]$ sudo systemctl start xrdp AL2 Tutorials The following tutorials show you how to perform common tasks using Amazon EC2 instances running AL2. For video tutorials, see AWS Instructional videos and labs. For AL2023 instructions, see Tutorials in the Amazon Linux 2023 User Guide. Tutorials • Tutorial: Install a LAMP server on AL2 • Tutorial: Configure SSL/TLS on AL2 • Tutorial: Host a WordPress blog on AL2 Tutorial: Install a LAMP server on AL2 The following procedures help you install an Apache web server with PHP and MariaDB (a community-developed fork of MySQL) support on your AL2 instance (sometimes called a LAMP web server or LAMP stack). You can use this server to host a static website or deploy a dynamic PHP application that reads and writes information to a database. Important If you are trying to set up a LAMP web server on a different distribution, such as Ubuntu or Red Hat Enterprise Linux, this tutorial will not work. For AL2023, see Install a LAMP server on AL2023. For Ubuntu, see the following Ubuntu community documentation: ApacheMySQLPHP. For other distributions, see their specific documentation. AL2 Tutorials 100 Amazon Linux 2 User Guide Option: Complete this tutorial using automation To complete this tutorial using AWS Systems Manager Automation instead of the following tasks, run the AWSDocs-InstallALAMPServer-AL2 Automation document. Tasks • Step 1: Prepare the LAMP server • Step 2: Test your LAMP server • Step 3: Secure the database server • Step 4: (Optional) Install phpMyAdmin • Troubleshoot • Related topics Step 1: Prepare the LAMP server Prerequisites • This tutorial assumes that you have already launched a new instance using AL2, with a public DNS name that is reachable from the internet. For more information, see Launch an instance in the Amazon EC2 User Guide. You must also have configured your security group to allow SSH (port 22), HTTP (port 80), and HTTPS (port 443) connections. For more information about these prerequisites, see Security group rules in the Amazon EC2 User Guide. • The following procedure installs the latest PHP version available on AL2, currently php8.2. If you plan to use PHP applications other than those described in this tutorial, you should check their compatibility
al2-ug-029
al2-ug.pdf
29
launched a new instance using AL2, with a public DNS name that is reachable from the internet. For more information, see Launch an instance in the Amazon EC2 User Guide. You must also have configured your security group to allow SSH (port 22), HTTP (port 80), and HTTPS (port 443) connections. For more information about these prerequisites, see Security group rules in the Amazon EC2 User Guide. • The following procedure installs the latest PHP version available on AL2, currently php8.2. If you plan to use PHP applications other than those described in this tutorial, you should check their compatibility with php8.2. To prepare the LAMP server 1. Connect to your instance. 2. To ensure that all of your software packages are up to date, perform a quick software update on your instance. This process may take a few minutes, but it is important to make sure that you have the latest security updates and bug fixes. The -y option installs the updates without asking for confirmation. If you would like to examine the updates before installing, you can omit this option. Install LAMP on AL2 101 Amazon Linux 2 User Guide [ec2-user ~]$ sudo yum update -y 3. Install the mariadb10.5 Amazon Linux Extras repositories to get the latest version of the MariaDB package. [ec2-user ~]$ sudo amazon-linux-extras install mariadb10.5 If you receive an error stating sudo: amazon-linux-extras: command not found, then your instance was not launched with an Amazon Linux 2 AMI (perhaps you are using the Amazon Linux AMI instead). You can view your version of Amazon Linux using the following command. cat /etc/system-release 4. Install the php8.2 Amazon Linux Extras repositories to get the latest version of the PHP package for AL2. [ec2-user ~]$ sudo amazon-linux-extras install php8.2 5. Now that your instance is current, you can install the Apache web server, MariaDB, and PHP software packages. Use the yum install command to install multiple software packages and all related dependencies at the same time [ec2-user ~]$ sudo yum install -y httpd You can view the current versions of these packages using the following command: yum info package_name 6. Start the Apache web server. [ec2-user ~]$ sudo systemctl start httpd 7. Use the systemctl command to configure the Apache web server to start at each system boot. [ec2-user ~]$ sudo systemctl enable httpd You can verify that httpd is on by running the following command: Install LAMP on AL2 102 Amazon Linux 2 User Guide [ec2-user ~]$ sudo systemctl is-enabled httpd 8. Add a security rule to allow inbound HTTP (port 80) connections to your instance if you have not already done so. By default, a launch-wizard-N security group was set up for your instance during initialization. This group contains a single rule to allow SSH connections. a. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/. b. Choose Instances and select your instance. c. On the Security tab, view the inbound rules. You should see the following rule: Port range Protocol Source 22 tcp 0.0.0.0/0 Warning Using 0.0.0.0/0 allows all IPv4 addresses to access your instance using SSH. This is acceptable for a short time in a test environment, but it's unsafe for production environments. In production, you authorize only a specific IP address or range of addresses to access your instance. d. Choose the link for the security group. Using the procedures in Add rules to a security group, add a new inbound security rule with the following values: • Type: HTTP • Protocol: TCP • Port Range: 80 • Source: Custom 9. Test your web server. In a web browser, type the public DNS address (or the public IP address) of your instance. If there is no content in /var/www/html, you should see the Apache test page. You can get the public DNS for your instance using the Amazon EC2 console (check the Public DNS column; if this column is hidden, choose Show/Hide Columns (the gear-shaped icon) and choose Public DNS). Verify that the security group for the instance contains a rule to allow HTTP traffic on port 80. For more information, see Add rules to security group. Install LAMP on AL2 103 Amazon Linux 2 User Guide Important If you are not using Amazon Linux, you may also need to configure the firewall on your instance to allow these connections. For more information about how to configure the firewall, see the documentation for your specific distribution. Apache httpd serves files that are kept in a directory called the Apache document root. The Amazon Linux Apache document root is /var/www/html, which by default is owned by root. To allow the ec2-user account to manipulate files in this directory, you must modify the ownership and permissions of the directory. There are many ways to accomplish this task. In this tutorial, you add ec2-user to the apache
al2-ug-030
al2-ug.pdf
30
Linux, you may also need to configure the firewall on your instance to allow these connections. For more information about how to configure the firewall, see the documentation for your specific distribution. Apache httpd serves files that are kept in a directory called the Apache document root. The Amazon Linux Apache document root is /var/www/html, which by default is owned by root. To allow the ec2-user account to manipulate files in this directory, you must modify the ownership and permissions of the directory. There are many ways to accomplish this task. In this tutorial, you add ec2-user to the apache group, to give the apache group ownership of the / var/www directory and assign write permissions to the group. To set file permissions 1. Add your user (in this case, ec2-user) to the apache group. [ec2-user ~]$ sudo usermod -a -G apache ec2-user Install LAMP on AL2 104 Amazon Linux 2 User Guide 2. Log out and then log back in again to pick up the new group, and then verify your membership. a. Log out (use the exit command or close the terminal window): [ec2-user ~]$ exit b. To verify your membership in the apache group, reconnect to your instance, and then run the following command: [ec2-user ~]$ groups ec2-user adm wheel apache systemd-journal 3. Change the group ownership of /var/www and its contents to the apache group. [ec2-user ~]$ sudo chown -R ec2-user:apache /var/www 4. To add group write permissions and to set the group ID on future subdirectories, change the directory permissions of /var/www and its subdirectories. [ec2-user ~]$ sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \; 5. To add group write permissions, recursively change the file permissions of /var/www and its subdirectories: [ec2-user ~]$ find /var/www -type f -exec sudo chmod 0664 {} \; Now, ec2-user (and any future members of the apache group) can add, delete, and edit files in the Apache document root, enabling you to add content, such as a static website or a PHP application. To secure your web server (Optional) A web server running the HTTP protocol provides no transport security for the data that it sends or receives. When you connect to an HTTP server using a web browser, the URLs that you visit, the content of webpages that you receive, and the contents (including passwords) of any HTML forms that you submit are all visible to eavesdroppers anywhere along the network pathway. The best Install LAMP on AL2 105 Amazon Linux 2 User Guide practice for securing your web server is to install support for HTTPS (HTTP Secure), which protects your data with SSL/TLS encryption. For information about enabling HTTPS on your server, see Tutorial: Configure SSL/TLS on AL2. Step 2: Test your LAMP server If your server is installed and running, and your file permissions are set correctly, your ec2-user account should be able to create a PHP file in the /var/www/html directory that is available from the internet. To test your LAMP server 1. Create a PHP file in the Apache document root. [ec2-user ~]$ echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php If you get a "Permission denied" error when trying to run this command, try logging out and logging back in again to pick up the proper group permissions that you configured in To set file permissions. 2. In a web browser, type the URL of the file that you just created. This URL is the public DNS address of your instance followed by a forward slash and the file name. For example: http://my.public.dns.amazonaws.com/phpinfo.php You should see the PHP information page: Install LAMP on AL2 106 Amazon Linux 2 User Guide If you do not see this page, verify that the /var/www/html/phpinfo.php file was created properly in the previous step. You can also verify that all of the required packages were installed with the following command. [ec2-user ~]$ sudo yum list installed httpd mariadb-server php-mysqlnd If any of the required packages are not listed in your output, install them with the sudo yum install package command. Also verify that the php7.2 and lamp-mariadb10.2-php7.2 extras are enabled in the output of the amazon-linux-extras command. 3. Delete the phpinfo.php file. Although this can be useful information, it should not be broadcast to the internet for security reasons. [ec2-user ~]$ rm /var/www/html/phpinfo.php You should now have a fully functional LAMP web server. If you add content to the Apache document root at /var/www/html, you should be able to view that content at the public DNS address for your instance. Step 3: Secure the database server The default installation of the MariaDB server has several features that are great for testing and development, but they should be disabled or removed for production servers. The Install LAMP on AL2 107 Amazon Linux 2 User Guide
al2-ug-031
al2-ug.pdf
31
can be useful information, it should not be broadcast to the internet for security reasons. [ec2-user ~]$ rm /var/www/html/phpinfo.php You should now have a fully functional LAMP web server. If you add content to the Apache document root at /var/www/html, you should be able to view that content at the public DNS address for your instance. Step 3: Secure the database server The default installation of the MariaDB server has several features that are great for testing and development, but they should be disabled or removed for production servers. The Install LAMP on AL2 107 Amazon Linux 2 User Guide mysql_secure_installation command walks you through the process of setting a root password and removing the insecure features from your installation. Even if you are not planning on using the MariaDB server, we recommend performing this procedure. To secure the MariaDB server 1. Start the MariaDB server. [ec2-user ~]$ sudo systemctl start mariadb 2. Run mysql_secure_installation. [ec2-user ~]$ sudo mysql_secure_installation a. When prompted, type a password for the root account. i. Type the current root password. By default, the root account does not have a password set. Press Enter. ii. Type Y to set a password, and type a secure password twice. For more information about creating a secure password, see https://identitysafe.norton.com/password- generator/. Make sure to store this password in a safe place. Setting a root password for MariaDB is only the most basic measure for securing your database. When you build or install a database-driven application, you typically create a database service user for that application and avoid using the root account for anything but database administration. Type Y to remove the anonymous user accounts. Type Y to disable the remote root login. Type Y to remove the test database. Type Y to reload the privilege tables and save your changes. b. c. d. e. 3. (Optional) If you do not plan to use the MariaDB server right away, stop it. You can restart it when you need it again. [ec2-user ~]$ sudo systemctl stop mariadb 4. (Optional) If you want the MariaDB server to start at every boot, type the following command. Install LAMP on AL2 108 Amazon Linux 2 User Guide [ec2-user ~]$ sudo systemctl enable mariadb Step 4: (Optional) Install phpMyAdmin phpMyAdmin is a web-based database management tool that you can use to view and edit the MySQL databases on your EC2 instance. Follow the steps below to install and configure phpMyAdmin on your Amazon Linux instance. Important We do not recommend using phpMyAdmin to access a LAMP server unless you have enabled SSL/TLS in Apache; otherwise, your database administrator password and other data are transmitted insecurely across the internet. For security recommendations from the developers, see Securing your phpMyAdmin installation. For general information about securing a web server on an EC2 instance, see Tutorial: Configure SSL/TLS on AL2. To install phpMyAdmin 1. Install the required dependencies. [ec2-user ~]$ sudo yum install php-mbstring php-xml -y 2. Restart Apache. [ec2-user ~]$ sudo systemctl restart httpd 3. Restart php-fpm. [ec2-user ~]$ sudo systemctl restart php-fpm 4. Navigate to the Apache document root at /var/www/html. [ec2-user ~]$ cd /var/www/html 5. Select a source package for the latest phpMyAdmin release from https:// www.phpmyadmin.net/downloads. To download the file directly to your instance, copy the link and paste it into a wget command, as in this example: Install LAMP on AL2 109 Amazon Linux 2 User Guide [ec2-user html]$ wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all- languages.tar.gz 6. Create a phpMyAdmin folder and extract the package into it with the following command. [ec2-user html]$ mkdir phpMyAdmin && tar -xvzf phpMyAdmin-latest-all- languages.tar.gz -C phpMyAdmin --strip-components 1 7. Delete the phpMyAdmin-latest-all-languages.tar.gz tarball. [ec2-user html]$ rm phpMyAdmin-latest-all-languages.tar.gz 8. (Optional) If the MySQL server is not running, start it now. [ec2-user ~]$ sudo systemctl start mariadb 9. In a web browser, type the URL of your phpMyAdmin installation. This URL is the public DNS address (or the public IP address) of your instance followed by a forward slash and the name of your installation directory. For example: http://my.public.dns.amazonaws.com/phpMyAdmin You should see the phpMyAdmin login page: Install LAMP on AL2 110 Amazon Linux 2 User Guide 10. Log in to your phpMyAdmin installation with the root user name and the MySQL root password you created earlier. Your installation must still be configured before you put it into service. We suggest that you begin by manually creating the configuration file, as follows: a. To start with a minimal configuration file, use your favorite text editor to create a new file, and then copy the contents of config.sample.inc.php into it. b. Save the file as config.inc.php in the phpMyAdmin directory that contains index.php. c. Refer to post-file creation instructions in the Using the Setup script section of the phpMyAdmin installation instructions for any additional setup. For information about using phpMyAdmin, see the phpMyAdmin User Guide.
al2-ug-032
al2-ug.pdf
32
you created earlier. Your installation must still be configured before you put it into service. We suggest that you begin by manually creating the configuration file, as follows: a. To start with a minimal configuration file, use your favorite text editor to create a new file, and then copy the contents of config.sample.inc.php into it. b. Save the file as config.inc.php in the phpMyAdmin directory that contains index.php. c. Refer to post-file creation instructions in the Using the Setup script section of the phpMyAdmin installation instructions for any additional setup. For information about using phpMyAdmin, see the phpMyAdmin User Guide. Install LAMP on AL2 111 Amazon Linux 2 Troubleshoot User Guide This section offers suggestions for resolving common problems you may encounter while setting up a new LAMP server. I can't connect to my server using a web browser Perform the following checks to see if your Apache web server is running and accessible. • Is the web server running? You can verify that httpd is on by running the following command: [ec2-user ~]$ sudo systemctl is-enabled httpd If the httpd process is not running, repeat the steps described in To prepare the LAMP server. • Is the firewall correctly configured? Verify that the security group for the instance contains a rule to allow HTTP traffic on port 80. For more information, see Add rules to security group. I can't connect to my server using HTTPS Perform the following checks to see if your Apache web server is configured to support HTTPS. • Is the web server correctly configured? After you install Apache, the server is configured for HTTP traffic. To support HTTPS, enable TLS on the server and install an SSL certificate. For information, see Tutorial: Configure SSL/TLS on AL2. • Is the firewall correctly configured? Verify that the security group for the instance contains a rule to allow HTTPS traffic on port 443. For more information, see Add rules to a security group. Related topics For more information about transferring files to your instance or installing a WordPress blog on your web server, see the following documentation: Install LAMP on AL2 112 Amazon Linux 2 User Guide • Transfer files to your Linux instance using WinSCP. • Transfer files to Linux instances using an SCP client. • Tutorial: Host a WordPress blog on AL2 For more information about the commands and software used in this tutorial, see the following webpages: • Apache web server: http://httpd.apache.org/ • MariaDB database server: https://mariadb.org/ • PHP programming language: http://php.net/ • The chmod command: https://en.wikipedia.org/wiki/Chmod • The chown command: https://en.wikipedia.org/wiki/Chown For more information about registering a domain name for your web server, or transferring an existing domain name to this host, see Creating and Migrating Domains and Subdomains to Amazon Route 53 in the Amazon Route 53 Developer Guide. Tutorial: Configure SSL/TLS on AL2 Secure Sockets Layer/Transport Layer Security (SSL/TLS) creates an encrypted channel between a web server and web client that protects data in transit from being eavesdropped on. This tutorial explains how to add support manually for SSL/TLS on an EC2 instance with AL2 and Apache web server. This tutorial assumes that you are not using a load balancer. If you are using Elastic Load Balancing, you can choose to configure SSL offload on the load balancer, using a certificate from AWS Certificate Manager instead. For historical reasons, web encryption is often referred to simply as SSL. While web browsers still support SSL, its successor protocol TLS is less vulnerable to attack. AL2 disables server-side support for all versions of SSL by default. Security standards bodies consider TLS 1.0 to be unsafe. TLS 1.0 and TLS 1.1 were formally deprecated in March 2021. This tutorial contains guidance based exclusively on enabling TLS 1.2. TLS 1.3 was finalized in 2018 and is available in AL2 as long as the underlying TLS library (OpenSSL in this tutorial) is supported and enabled. Clients must support TLS 1.2 or later by June 28, 2023. For more information about the updated encryption standards, see RFC 7568 and RFC 8446. This tutorial refers to modern web encryption simply as TLS. Configure SSL/TLS on AL2 113 Amazon Linux 2 Important User Guide These procedures are intended for use with AL2. We also assume that you are starting with a new Amazon EC2 instance. If you are trying to set up an EC2 instance running a different distribution, or an instance running an old version of AL2, some procedures in this tutorial might not work. For Ubuntu, see the following community documentation: Open SSL on Ubuntu. For Red Hat Enterprise Linux, see the following: Setting up the Apache HTTP Web Server. For other distributions, see their specific documentation. Note Alternatively, you can use AWS Certificate Manager (ACM) for AWS Nitro enclaves, which is an enclave application that allows you
al2-ug-033
al2-ug.pdf
33
with AL2. We also assume that you are starting with a new Amazon EC2 instance. If you are trying to set up an EC2 instance running a different distribution, or an instance running an old version of AL2, some procedures in this tutorial might not work. For Ubuntu, see the following community documentation: Open SSL on Ubuntu. For Red Hat Enterprise Linux, see the following: Setting up the Apache HTTP Web Server. For other distributions, see their specific documentation. Note Alternatively, you can use AWS Certificate Manager (ACM) for AWS Nitro enclaves, which is an enclave application that allows you to use public and private SSL/TLS certificates with your web applications and servers running on Amazon EC2 instances with AWS Nitro Enclaves. Nitro Enclaves is an Amazon EC2 capability that enables creation of isolated compute environments to protect and securely process highly sensitive data, such as SSL/ TLS certificates and private keys. ACM for Nitro Enclaves works with nginx running on your Amazon EC2 Linux instance to create private keys, to distribute certificates and private keys, and to manage certificate renewals. To use ACM for Nitro Enclaves, you must use an enclave-enabled Linux instance. For more information, see What is AWS Nitro Enclaves? and AWS Certificate Manager for Nitro Enclaves in the AWS Nitro Enclaves User Guide. Contents • Prerequisites • Step 1: Enable TLS on the server • Step 2: Obtain a CA-signed certificate • Step 3: Test and harden the security configuration • Troubleshoot Prerequisites Before you begin this tutorial, complete the following steps: Configure SSL/TLS on AL2 114 Amazon Linux 2 User Guide • Launch an Amazon EBS backed AL2 instance. For more information, see Launch an instance in the Amazon EC2 User Guide. • Configure your security groups to allow your instance to accept connections on the following TCP ports: • SSH (port 22) • HTTP (port 80) • HTTPS (port 443) For more information, see Security group rules in the Amazon EC2 User Guide. • Install the Apache web server. For step-by-step instructions, see Tutorial: Install a LAMP Web Server on AL2. Only the httpd package and its dependencies are needed, so you can ignore the instructions involving PHP and MariaDB. • To identify and authenticate websites, the TLS public key infrastructure (PKI) relies on the Domain Name System (DNS). To use your EC2 instance to host a public website, you need to register a domain name for your web server or transfer an existing domain name to your Amazon EC2 host. Numerous third-party domain registration and DNS hosting services are available for this, or you can use Amazon Route 53. Step 1: Enable TLS on the server Option: Complete this tutorial using automation To complete this tutorial using AWS Systems Manager Automation instead of the following tasks, run the automation document. This procedure takes you through the process of setting up TLS on AL2 with a self-signed digital certificate. Note A self-signed certificate is acceptable for testing but not production. If you expose your self-signed certificate to the internet, visitors to your site are greeted by security warnings. To enable TLS on a server 1. Connect to your instance and confirm that Apache is running. Configure SSL/TLS on AL2 115 Amazon Linux 2 User Guide [ec2-user ~]$ sudo systemctl is-enabled httpd If the returned value is not "enabled," start Apache and set it to start each time the system boots. [ec2-user ~]$ sudo systemctl start httpd && sudo systemctl enable httpd 2. To ensure that all of your software packages are up to date, perform a quick software update on your instance. This process may take a few minutes, but it is important to make sure that you have the latest security updates and bug fixes. Note The -y option installs the updates without asking for confirmation. If you would like to examine the updates before installing, you can omit this option. [ec2-user ~]$ sudo yum update -y 3. Now that your instance is current, add TLS support by installing the Apache module mod_ssl. [ec2-user ~]$ sudo yum install -y mod_ssl Your instance now has the following files that you use to configure your secure server and create a certificate for testing: • /etc/httpd/conf.d/ssl.conf The configuration file for mod_ssl. It contains directives telling Apache where to find encryption keys and certificates, the TLS protocol versions to allow, and the encryption ciphers to accept. • /etc/pki/tls/certs/make-dummy-cert A script to generate a self-signed X.509 certificate and private key for your server host. This certificate is useful for testing that Apache is properly set up to use TLS. Because it offers no proof of identity, it should not be used in production. If used in production, it triggers warnings in Web browsers. Configure SSL/TLS on AL2 116 Amazon Linux 2 User Guide 4. Run the script to
al2-ug-034
al2-ug.pdf
34
The configuration file for mod_ssl. It contains directives telling Apache where to find encryption keys and certificates, the TLS protocol versions to allow, and the encryption ciphers to accept. • /etc/pki/tls/certs/make-dummy-cert A script to generate a self-signed X.509 certificate and private key for your server host. This certificate is useful for testing that Apache is properly set up to use TLS. Because it offers no proof of identity, it should not be used in production. If used in production, it triggers warnings in Web browsers. Configure SSL/TLS on AL2 116 Amazon Linux 2 User Guide 4. Run the script to generate a self-signed dummy certificate and key for testing. [ec2-user ~]$ cd /etc/pki/tls/certs sudo ./make-dummy-cert localhost.crt This generates a new file localhost.crt in the /etc/pki/tls/certs/ directory. The specified file name matches the default that is assigned in the SSLCertificateFile directive in / etc/httpd/conf.d/ssl.conf. This file contains both a self-signed certificate and the certificate's private key. Apache requires the certificate and key to be in PEM format, which consists of Base64-encoded ASCII characters framed by "BEGIN" and "END" lines, as in the following abbreviated example. -----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD2KKx/8Zk94m1q 3gQMZF9ZN66Ls19+3tHAgQ5Fpo9KJDhzLjOOCI8u1PTcGmAah5kEitCEc0wzmNeo BCl0wYR6G0rGaKtK9Dn7CuIjvubtUysVyQoMVPQ97ldeakHWeRMiEJFXg6kZZ0vr GvwnKoMh3DlK44D9dX7IDua2PlYx5+eroA+1Lqf32ZSaAO0bBIMIYTHigwbHMZoT ... 56tE7THvH7vOEf4/iUOsIrEzaMaJ0mqkmY1A70qQGQKBgBF3H1qNRNHuyMcPODFs 27hDzPDinrquSEvoZIggkDMlh2irTiipJ/GhkvTpoQlv0fK/VXw8vSgeaBuhwJvS LXU9HvYq0U6O4FgD3nAyB9hI0BE13r1HjUvbjT7moH+RhnNz6eqqdscCS09VtRAo 4QQvAqOa8UheYeoXLdWcHaLP -----END PRIVATE KEY----- -----BEGIN CERTIFICATE----- MIIEazCCA1OgAwIBAgICWxQwDQYJKoZIhvcNAQELBQAwgbExCzAJBgNVBAYTAi0t MRIwEAYDVQQIDAlTb21lU3RhdGUxETAPBgNVBAcMCFNvbWVDaXR5MRkwFwYDVQQK DBBTb21lT3JnYW5pemF0aW9uMR8wHQYDVQQLDBZTb21lT3JnYW5pemF0aW9uYWxV bml0MRkwFwYDVQQDDBBpcC0xNzItMzEtMjAtMjM2MSQwIgYJKoZIhvcNAQkBFhVy ... z5rRUE/XzxRLBZOoWZpNWTXJkQ3uFYH6s/sBwtHpKKZMzOvDedREjNKAvk4ws6F0 CuIjvubtUysVyQoMVPQ97ldeakHWeRMiEJFXg6kZZ0vrGvwnKoMh3DlK44D9dlU3 WanXWehT6FiSZvB4sTEXXJN2jdw8g+sHGnZ8zCOsclknYhHrCVD2vnBlZJKSZvak 3ZazhBxtQSukFMOnWPP2a0DMMFGYUHOd0BQE8sBJxg== -----END CERTIFICATE----- The file names and extensions are a convenience and have no effect on function. For example, you can call a certificate cert.crt, cert.pem, or any other file name, so long as the related directive in the ssl.conf file uses the same name. Configure SSL/TLS on AL2 117 Amazon Linux 2 Note User Guide When you replace the default TLS files with your own customized files, be sure that they are in PEM format. 5. Open the /etc/httpd/conf.d/ssl.conf file using your favorite text editor (such as vim or nano) as root user and comment out the following line, because the self-signed dummy certificate also contains the key. If you do not comment out this line before you complete the next step, the Apache service fails to start. SSLCertificateKeyFile /etc/pki/tls/private/localhost.key 6. Restart Apache. [ec2-user ~]$ sudo systemctl restart httpd Note Make sure that TCP port 443 is accessible on your EC2 instance, as previously described. 7. Your Apache web server should now support HTTPS (secure HTTP) over port 443. Test it by entering the IP address or fully qualified domain name of your EC2 instance into a browser URL bar with the prefix https://. Because you are connecting to a site with a self-signed, untrusted host certificate, your browser may display a series of security warnings. Override the warnings and proceed to the site. If the default Apache test page opens, it means that you have successfully configured TLS on your server. All data passing between the browser and server is now encrypted. Note To prevent site visitors from encountering warning screens, you must obtain a trusted, CA-signed certificate that not only encrypts, but also publicly authenticates you as the owner of the site. Configure SSL/TLS on AL2 118 Amazon Linux 2 User Guide Step 2: Obtain a CA-signed certificate You can use the following process to obtain a CA-signed certificate: • Generate a certificate signing request (CSR) from a private key • Submit the CSR to a certificate authority (CA) • Obtain a signed host certificate • Configure Apache to use the certificate A self-signed TLS X.509 host certificate is cryptologically identical to a CA-signed certificate. The difference is social, not mathematical. A CA promises, at a minimum, to validate a domain's ownership before issuing a certificate to an applicant. Each web browser contains a list of CAs trusted by the browser vendor to do this. An X.509 certificate consists primarily of a public key that corresponds to your private server key, and a signature by the CA that is cryptographically tied to the public key. When a browser connects to a web server over HTTPS, the server presents a certificate for the browser to check against its list of trusted CAs. If the signer is on the list, or accessible through a chain of trust consisting of other trusted signers, the browser negotiates a fast encrypted data channel with the server and loads the page. Certificates generally cost money because of the labor involved in validating the requests, so it pays to shop around. A few CAs offer basic-level certificates free of charge. The most notable of these CAs is the Let's Encrypt project, which also supports the automation of the certificate creation and renewal process. For more information about using a Let's Encrypt certificate, see Get Certbot. If you plan to offer commercial-grade services, AWS Certificate Manager is a good option. Underlying the host certificate is the key. As of 2019, government and industry groups recommend using a minimum key (modulus) size of 2048 bits for RSA
al2-ug-035
al2-ug.pdf
35
money because of the labor involved in validating the requests, so it pays to shop around. A few CAs offer basic-level certificates free of charge. The most notable of these CAs is the Let's Encrypt project, which also supports the automation of the certificate creation and renewal process. For more information about using a Let's Encrypt certificate, see Get Certbot. If you plan to offer commercial-grade services, AWS Certificate Manager is a good option. Underlying the host certificate is the key. As of 2019, government and industry groups recommend using a minimum key (modulus) size of 2048 bits for RSA keys intended to protect documents, through 2030. The default modulus size generated by OpenSSL in AL2 is 2048 bits, which is suitable for use in a CA-signed certificate. In the following procedure, an optional step provided for those who want a customized key, for example, one with a larger modulus or using a different encryption algorithm. Configure SSL/TLS on AL2 119 Amazon Linux 2 Important User Guide These instructions for acquiring a CA-signed host certificate do not work unless you own a registered and hosted DNS domain. To obtain a CA-signed certificate 1. Connect to your instance and navigate to /etc/pki/tls/private/. This is the directory where you store the server's private key for TLS. If you prefer to use an existing host key to generate the CSR, skip to Step 3. 2. (Optional) Generate a new private key. Here are some examples of key configurations. Any of the resulting keys works with your web server, but they vary in the degree and type of security that they implement. • Example 1: Create a default RSA host key. The resulting file, custom.key, is a 2048-bit RSA private key. [ec2-user ~]$ sudo openssl genrsa -out custom.key • Example 2: Create a stronger RSA key with a bigger modulus. The resulting file, custom.key, is a 4096-bit RSA private key. [ec2-user ~]$ sudo openssl genrsa -out custom.key 4096 • Example 3: Create a 4096-bit encrypted RSA key with password protection. The resulting file, custom.key, is a 4096-bit RSA private key encrypted with the AES-128 cipher. Important Encrypting the key provides greater security, but because an encrypted key requires a password, services depending on it cannot be auto-started. Each time you use this key, you must supply the password (in the preceding example, "abcde12345") over an SSH connection. [ec2-user ~]$ sudo openssl genrsa -aes128 -passout pass:abcde12345 -out custom.key 4096 Configure SSL/TLS on AL2 120 Amazon Linux 2 User Guide • Example 4: Create a key using a non-RSA cipher. RSA cryptography can be relatively slow because of the size of its public keys, which are based on the product of two large prime numbers. However, it is possible to create keys for TLS that use non-RSA ciphers. Keys based on the mathematics of elliptic curves are smaller and computationally faster when delivering an equivalent level of security. [ec2-user ~]$ sudo openssl ecparam -name prime256v1 -out custom.key -genkey The result is a 256-bit elliptic curve private key using prime256v1, a "named curve" that OpenSSL supports. Its cryptographic strength is slightly greater than a 2048-bit RSA key, according to NIST. Note Not all CAs provide the same level of support for elliptic-curve-based keys as for RSA keys. Make sure that the new private key has highly restrictive ownership and permissions (owner=root, group=root, read/write for owner only). The commands would be as shown in the following example. [ec2-user ~]$ sudo chown root:root custom.key [ec2-user ~]$ sudo chmod 600 custom.key [ec2-user ~]$ ls -al custom.key The preceding commands yield the following result. -rw------- root root custom.key After you have created and configured a satisfactory key, you can create a CSR. 3. Create a CSR using your preferred key. The following example uses custom.key. [ec2-user ~]$ sudo openssl req -new -key custom.key -out csr.pem OpenSSL opens a dialog and prompts you for the information shown in the following table. All of the fields except Common Name are optional for a basic, domain-validated host certificate. Configure SSL/TLS on AL2 121 Amazon Linux 2 User Guide Name Description Example Country Name State or Province Name Locality Name The two-letter ISO abbreviation for your country. US (=United States) The name of the state or province where your organization is located. This name Washington cannot be abbreviated. The location of your organization, such as a city. Seattle Organizat ion Name The full legal name of your organization. Do not abbreviate your organization name. Example Corporation Organizat ional Unit Name Additional organizational information, if any. Example Dept Common Name This value must exactly match the web address that you expect users to enter into www.example.com a browser. Usually, this means a domain name with a prefixed hostname or alias in the form www.example.com . In testing with a self-signed certificate and no DNS resolution, the
al2-ug-036
al2-ug.pdf
36
or province where your organization is located. This name Washington cannot be abbreviated. The location of your organization, such as a city. Seattle Organizat ion Name The full legal name of your organization. Do not abbreviate your organization name. Example Corporation Organizat ional Unit Name Additional organizational information, if any. Example Dept Common Name This value must exactly match the web address that you expect users to enter into www.example.com a browser. Usually, this means a domain name with a prefixed hostname or alias in the form www.example.com . In testing with a self-signed certificate and no DNS resolution, the common name may consist of the hostname alone. CAs also offer more expensive certificates that accept wild-card names such as *.example.com . Email Address The server administrator's email address. someone@example.com Finally, OpenSSL prompts you for an optional challenge password. This password applies only to the CSR and to transactions between you and your CA, so follow the CA's recommendations Configure SSL/TLS on AL2 122 Amazon Linux 2 User Guide about this and the other optional field, optional company name. The CSR challenge password has no effect on server operation. The resulting file csr.pem contains your public key, your digital signature of your public key, and the metadata that you entered. 4. Submit the CSR to a CA. This usually consists of opening your CSR file in a text editor and copying the contents into a web form. At this time, you may be asked to supply one or more subject alternate names (SANs) to be placed on the certificate. If www.example.com is the common name, then example.com would be a good SAN, and vice versa. A visitor to your site entering either of these names would see an error-free connection. If your CA web form allows it, include the common name in the list of SANs. Some CAs include it automatically. After your request has been approved, you receive a new host certificate signed by the CA. You might also be instructed to download an intermediate certificate file that contains additional certificates needed to complete the CA's chain of trust. Note Your CA might send you files in multiple formats intended for various purposes. For this tutorial, you should only use a certificate file in PEM format, which is usually (but not always) marked with a .pem or .crt file extension. If you are uncertain which file to use, open the files with a text editor and find the one containing one or more blocks beginning with the following line. - - - - -BEGIN CERTIFICATE - - - - - The file should also end with the following line. - - - -END CERTIFICATE - - - - - You can also test the file at the command line as shown in the following. [ec2-user certs]$ openssl x509 -in certificate.crt -text Verify that these lines appear in the file. Do not use files ending with .p7b, .p7c, or similar file extensions. Configure SSL/TLS on AL2 123 Amazon Linux 2 User Guide 5. Place the new CA-signed certificate and any intermediate certificates in the /etc/pki/tls/ certs directory. Note There are several ways to upload your new certificate to your EC2 instance, but the most straightforward and informative way is to open a text editor (for example, vi, nano, or notepad) on both your local computer and your instance, and then copy and paste the file contents between them. You need root [sudo] permissions when performing these operations on the EC2 instance. This way, you can see immediately if there are any permission or path problems. Be careful, however, not to add any additional lines while copying the contents, or to change them in any way. From inside the /etc/pki/tls/certs directory, check that the file ownership, group, and permission settings match the highly restrictive AL2 defaults (owner=root, group=root, read/ write for owner only). The following example shows the commands to use. [ec2-user certs]$ sudo chown root:root custom.crt [ec2-user certs]$ sudo chmod 600 custom.crt [ec2-user certs]$ ls -al custom.crt These commands should yield the following result. -rw------- root root custom.crt The permissions for the intermediate certificate file are less stringent (owner=root, group=root, owner can write, group can read, world can read). The following example shows the commands to use. [ec2-user certs]$ sudo chown root:root intermediate.crt [ec2-user certs]$ sudo chmod 644 intermediate.crt [ec2-user certs]$ ls -al intermediate.crt These commands should yield the following result. -rw-r--r-- root root intermediate.crt Configure SSL/TLS on AL2 124 Amazon Linux 2 User Guide 6. Place the private key that you used to create the CSR in the /etc/pki/tls/private/ directory. Note There are several ways to upload your custom key to your EC2 instance, but the most straightforward and informative way is to open a text editor (for example, vi, nano, or notepad) on both your local computer and
al2-ug-037
al2-ug.pdf
37
following example shows the commands to use. [ec2-user certs]$ sudo chown root:root intermediate.crt [ec2-user certs]$ sudo chmod 644 intermediate.crt [ec2-user certs]$ ls -al intermediate.crt These commands should yield the following result. -rw-r--r-- root root intermediate.crt Configure SSL/TLS on AL2 124 Amazon Linux 2 User Guide 6. Place the private key that you used to create the CSR in the /etc/pki/tls/private/ directory. Note There are several ways to upload your custom key to your EC2 instance, but the most straightforward and informative way is to open a text editor (for example, vi, nano, or notepad) on both your local computer and your instance, and then copy and paste the file contents between them. You need root [sudo] permissions when performing these operations on the EC2 instance. This way, you can see immediately if there are any permission or path problems. Be careful, however, not to add any additional lines while copying the contents, or to change them in any way. From inside the /etc/pki/tls/private directory, use the following commands to verify that the file ownership, group, and permission settings match the highly restrictive AL2 defaults (owner=root, group=root, read/write for owner only). [ec2-user private]$ sudo chown root:root custom.key [ec2-user private]$ sudo chmod 600 custom.key [ec2-user private]$ ls -al custom.key These commands should yield the following result. -rw------- root root custom.key 7. Edit /etc/httpd/conf.d/ssl.conf to reflect your new certificate and key files. a. Provide the path and file name of the CA-signed host certificate in Apache's SSLCertificateFile directive: SSLCertificateFile /etc/pki/tls/certs/custom.crt b. If you received an intermediate certificate file (intermediate.crt in this example), provide its path and file name using Apache's SSLCACertificateFile directive: SSLCACertificateFile /etc/pki/tls/certs/intermediate.crt Configure SSL/TLS on AL2 125 Amazon Linux 2 User Guide Note Some CAs combine the host certificate and the intermediate certificates in a single file, making the SSLCACertificateFile directive unnecessary. Consult the instructions provided by your CA. c. Provide the path and file name of the private key (custom.key in this example) in Apache's SSLCertificateKeyFile directive: SSLCertificateKeyFile /etc/pki/tls/private/custom.key 8. Save /etc/httpd/conf.d/ssl.conf and restart Apache. [ec2-user ~]$ sudo systemctl restart httpd 9. Test your server by entering your domain name into a browser URL bar with the prefix https://. Your browser should load the test page over HTTPS without generating errors. Step 3: Test and harden the security configuration After your TLS is operational and exposed to the public, you should test how secure it really is. This is easy to do using online services such as Qualys SSL Labs, which performs a free and thorough analysis of your security setup. Based on the results, you may decide to harden the default security configuration by controlling which protocols you accept, which ciphers you prefer, and which you exclude. For more information, see how Qualys formulates its scores. Important Real-world testing is crucial to the security of your server. Small configuration errors may lead to serious security breaches and loss of data. Because recommended security practices change constantly in response to research and emerging threats, periodic security audits are essential to good server administration. On the Qualys SSL Labs site, enter the fully qualified domain name of your server, in the form www.example.com. After about two minutes, you receive a grade (from A to F) for your site and a detailed breakdown of the findings. The following table summarizes the report for a domain Configure SSL/TLS on AL2 126 Amazon Linux 2 User Guide with settings identical to the default Apache configuration on AL2, and with a default Certbot certificate. Overall rating Certificate Protocol support Key exchange Cipher strength B 100% 95% 70% 90% Though the overview shows that the configuration is mostly sound, the detailed report flags several potential problems, listed here in order of severity: ✗ The RC4 cipher is supported for use by certain older browsers. A cipher is the mathematical core of an encryption algorithm. RC4, a fast cipher used to encrypt TLS data-streams, is known to have several serious weaknesses. Unless you have very good reasons to support legacy browsers, you should disable this. ✗ Old TLS versions are supported. The configuration supports TLS 1.0 (already deprecated) and TLS 1.1 (on a path to deprecation). Only TLS 1.2 has been recommended since 2018. ✗ Forward secrecy is not fully supported. Forward secrecy is a feature of algorithms that encrypt using temporary (ephemeral) session keys derived from the private key. This means in practice that attackers cannot decrypt HTTPS data even if they possess a web server's long-term private key. To correct and future-proof the TLS configuration 1. Open the configuration file /etc/httpd/conf.d/ssl.conf in a text editor and comment out the following line by entering "#" at the beginning of the line. #SSLProtocol all -SSLv3 2. Add the following directive: #SSLProtocol all -SSLv3 SSLProtocol -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 +TLSv1.2 Configure SSL/TLS on AL2 127 Amazon Linux 2
al2-ug-038
al2-ug.pdf
38
is not fully supported. Forward secrecy is a feature of algorithms that encrypt using temporary (ephemeral) session keys derived from the private key. This means in practice that attackers cannot decrypt HTTPS data even if they possess a web server's long-term private key. To correct and future-proof the TLS configuration 1. Open the configuration file /etc/httpd/conf.d/ssl.conf in a text editor and comment out the following line by entering "#" at the beginning of the line. #SSLProtocol all -SSLv3 2. Add the following directive: #SSLProtocol all -SSLv3 SSLProtocol -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 +TLSv1.2 Configure SSL/TLS on AL2 127 Amazon Linux 2 User Guide This directive explicitly disables SSL versions 2 and 3, as well as TLS versions 1.0 and 1.1. The server now refuses to accept encrypted connections with clients using anything except TLS 1.2. The verbose wording in the directive conveys more clearly, to a human reader, what the server is configured to do. Note Disabling TLS versions 1.0 and 1.1 in this manner blocks a small percentage of outdated web browsers from accessing your site. To modify the list of allowed ciphers 1. In the configuration file /etc/httpd/conf.d/ssl.conf, find the section with the SSLCipherSuite directive and comment out the existing line by entering "#" at the beginning of the line. #SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 2. Specify explicit cipher suites and a cipher order that prioritizes forward secrecy and avoids insecure ciphers. The SSLCipherSuite directive used here is based on output from the Mozilla SSL Configuration Generator, which tailors a TLS configuration to the specific software running on your server. First determine your Apache and OpenSSL versions by using the output from the following commands. [ec2-user ~]$ yum list installed | grep httpd [ec2-user ~]$ yum list installed | grep openssl For example, if the returned information is Apache 2.4.34 and OpenSSL 1.0.2, we enter this into the generator. If you choose the "modern" compatibility model, this creates an SSLCipherSuite directive that aggressively enforces security but still works for most browsers. If your software doesn't support the modern configuration, you can update your software or choose the "intermediate" configuration instead. SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE- ECDSA-CHACHA20-POLY1305: Configure SSL/TLS on AL2 128 Amazon Linux 2 User Guide ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM- SHA256: ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE- RSA-AES128-SHA256 The selected ciphers have ECDHE in their names, an abbreviation for Elliptic Curve Diffie- Hellman Ephemeral . The term ephemeral indicates forward secrecy. As a by-product, these ciphers do not support RC4. We recommend that you use an explicit list of ciphers instead of relying on defaults or terse directives whose content isn't visible. Copy the generated directive into /etc/httpd/conf.d/ssl.conf. Note Though shown here on several lines for readability, the directive must be on a single line when copied to /etc/httpd/conf.d/ssl.conf, with only a colon (no spaces) between cipher names. 3. Finally, uncomment the following line by removing the "#" at the beginning of the line. #SSLHonorCipherOrder on This directive forces the server to prefer high-ranking ciphers, including (in this case) those that support forward secrecy. With this directive turned on, the server tries to establish a strong secure connection before falling back to allowed ciphers with lesser security. After completing both of these procedures, save the changes to /etc/httpd/conf.d/ssl.conf and restart Apache. If you test the domain again on Qualys SSL Labs, you should see that the RC4 vulnerability and other warnings are gone and the summary looks something like the following. Overall rating Certificate A 100% Configure SSL/TLS on AL2 129 Amazon Linux 2 Protocol support Key exchange Cipher strength 100% 90% 90% User Guide Each update to OpenSSL introduces new ciphers and removes support for old ones. Keep your EC2 AL2 instance up-to-date, watch for security announcements from OpenSSL, and be alert to reports of new security exploits in the technical press. Troubleshoot • My Apache webserver doesn't start unless I enter a password This is expected behavior if you installed an encrypted, password-protected, private server key. You can remove the encryption and password requirement from the key. Assuming that you have a private encrypted RSA key called custom.key in the default directory, and that the password on it is abcde12345, run the following commands on your EC2 instance to generate an unencrypted version of the key. [ec2-user ~]$ cd /etc/pki/tls/private/ [ec2-user private]$ sudo cp custom.key custom.key.bak [ec2-user private]$ sudo openssl rsa -in custom.key -passin pass:abcde12345 -out custom.key.nocrypt [ec2-user private]$ sudo mv custom.key.nocrypt custom.key [ec2-user private]$ sudo chown root:root custom.key [ec2-user private]$ sudo chmod 600 custom.key [ec2-user private]$ sudo systemctl restart httpd Apache should now start without prompting you for a password. • I get errors when I run sudo yum install -y mod_ssl. When you are installing the required packages for SSL, you may see errors similar to the following. Error: httpd24-tools conflicts with httpd-tools-2.2.34-1.16.amzn1.x86_64 Error: httpd24 conflicts with httpd-2.2.34-1.16.amzn1.x86_64 Configure SSL/TLS on AL2 130 Amazon Linux 2 User Guide This
al2-ug-039
al2-ug.pdf
39
private]$ sudo cp custom.key custom.key.bak [ec2-user private]$ sudo openssl rsa -in custom.key -passin pass:abcde12345 -out custom.key.nocrypt [ec2-user private]$ sudo mv custom.key.nocrypt custom.key [ec2-user private]$ sudo chown root:root custom.key [ec2-user private]$ sudo chmod 600 custom.key [ec2-user private]$ sudo systemctl restart httpd Apache should now start without prompting you for a password. • I get errors when I run sudo yum install -y mod_ssl. When you are installing the required packages for SSL, you may see errors similar to the following. Error: httpd24-tools conflicts with httpd-tools-2.2.34-1.16.amzn1.x86_64 Error: httpd24 conflicts with httpd-2.2.34-1.16.amzn1.x86_64 Configure SSL/TLS on AL2 130 Amazon Linux 2 User Guide This typically means that your EC2 instance is not running AL2. This tutorial only supports instances freshly created from an official AL2 AMI. Tutorial: Host a WordPress blog on AL2 The following procedures will help you install, configure, and secure a WordPress blog on your AL2 instance. This tutorial is a good introduction to using Amazon EC2 in that you have full control over a web server that hosts your WordPress blog, which is not typical with a traditional hosting service. You are responsible for updating the software packages and maintaining security patches for your server. For a more automated WordPress installation that does not require direct interaction with the web server configuration, the AWS CloudFormation service provides a WordPress template that can also get you started quickly. For more information, see Get started in the AWS CloudFormation User Guide. If you need a high-availability solution with a decoupled database, see Deploying a high-availability WordPress website in the AWS Elastic Beanstalk Developer Guide. Important These procedures are intended for use with AL2. For more information about other distributions, see their specific documentation. Many steps in this tutorial do not work on Ubuntu instances. For help installing WordPress on an Ubuntu instance, see WordPress in the Ubuntu documentation. You can also use CodeDeploy to accomplish this task on Amazon Linux, macOS, or Unix systems. Topics • Prerequisites • Install WordPress • Next steps • Help! My public DNS name changed and now my blog is broken Prerequisites This tutorial assumes that you have launched an AL2 instance with a functional web server with PHP and database (either MySQL or MariaDB) support by following all of the steps in Tutorial: Host a WordPress blog on AL2 131 Amazon Linux 2 User Guide Install a LAMP server on AL2. This tutorial also has steps for configuring a security group to allow HTTP and HTTPS traffic, as well as several steps to ensure that file permissions are set properly for your web server. For information about adding rules to your security group, see Add rules to a security group. We strongly recommend that you associate an Elastic IP address (EIP) to the instance you are using to host a WordPress blog. This prevents the public DNS address for your instance from changing and breaking your installation. If you own a domain name and you want to use it for your blog, you can update the DNS record for the domain name to point to your EIP address (for help with this, contact your domain name registrar). You can have one EIP address associated with a running instance at no charge. For more information, see Elastic IP addresses in the Amazon EC2 User Guide. If you don't already have a domain name for your blog, you can register a domain name with Route 53 and associate your instance's EIP address with your domain name. For more information, see Registering domain names using Amazon Route 53 in the Amazon Route 53 Developer Guide. Install WordPress Option: Complete this tutorial using automation To complete this tutorial using AWS Systems Manager Automation instead of the following tasks, run the automation document. Connect to your instance, and download the WordPress installation package. To download and unzip the WordPress installation package 1. Download the latest WordPress installation package with the wget command. The following command should always download the latest release. [ec2-user ~]$ wget https://wordpress.org/latest.tar.gz 2. Unzip and unarchive the installation package. The installation folder is unzipped to a folder called wordpress. [ec2-user ~]$ tar -xzf latest.tar.gz Host a WordPress blog on AL2 132 Amazon Linux 2 User Guide To create a database user and database for your WordPress installation Your WordPress installation needs to store information, such as blog posts and user comments, in a database. This procedure helps you create your blog's database and a user that is authorized to read and save information to it. 1. Start the database server. • [ec2-user ~]$ sudo systemctl start mariadb 2. Log in to the database server as the root user. Enter your database root password when prompted; this may be different than your root system password, or it might even be empty if you have not secured your database server.
al2-ug-040
al2-ug.pdf
40
a database user and database for your WordPress installation Your WordPress installation needs to store information, such as blog posts and user comments, in a database. This procedure helps you create your blog's database and a user that is authorized to read and save information to it. 1. Start the database server. • [ec2-user ~]$ sudo systemctl start mariadb 2. Log in to the database server as the root user. Enter your database root password when prompted; this may be different than your root system password, or it might even be empty if you have not secured your database server. If you have not secured your database server yet, it is important that you do so. For more information, see To secure the MariaDB server (AL2). [ec2-user ~]$ mysql -u root -p 3. Create a user and password for your MySQL database. Your WordPress installation uses these values to communicate with your MySQL database. Make sure that you create a strong password for your user. Do not use the single quote character ( ' ) in your password, because this will break the preceding command. Do not reuse an existing password, and make sure to store this password in a safe place. Enter the following command, substituting a unique user name and password. CREATE USER 'wordpress-user'@'localhost' IDENTIFIED BY 'your_strong_password'; 4. Create your database. Give your database a descriptive, meaningful name, such as wordpress-db. Note The punctuation marks surrounding the database name in the command below are called backticks. The backtick (`) key is usually located above the Tab key on a standard keyboard. Backticks are not always required, but they allow you to use otherwise illegal characters, such as hyphens, in database names. Host a WordPress blog on AL2 133 Amazon Linux 2 User Guide CREATE DATABASE `wordpress-db`; 5. Grant full privileges for your database to the WordPress user that you created earlier. GRANT ALL PRIVILEGES ON `wordpress-db`.* TO "wordpress-user"@"localhost"; 6. Flush the database privileges to pick up all of your changes. FLUSH PRIVILEGES; 7. Exit the mysql client. exit To create and edit the wp-config.php file The WordPress installation folder contains a sample configuration file called wp-config- sample.php. In this procedure, you copy this file and edit it to fit your specific configuration. 1. Copy the wp-config-sample.php file to a file called wp-config.php. This creates a new configuration file and keeps the original sample file intact as a backup. [ec2-user ~]$ cp wordpress/wp-config-sample.php wordpress/wp-config.php 2. Edit the wp-config.php file with your favorite text editor (such as nano or vim) and enter values for your installation. If you do not have a favorite text editor, nano is suitable for beginners. [ec2-user ~]$ nano wordpress/wp-config.php a. Find the line that defines DB_NAME and change database_name_here to the database name that you created in Step 4 of To create a database user and database for your WordPress installation. define('DB_NAME', 'wordpress-db'); Host a WordPress blog on AL2 134 Amazon Linux 2 User Guide b. Find the line that defines DB_USER and change username_here to the database user that you created in Step 3 of To create a database user and database for your WordPress installation. define('DB_USER', 'wordpress-user'); c. Find the line that defines DB_PASSWORD and change password_here to the strong password that you created in Step 3 of To create a database user and database for your WordPress installation. define('DB_PASSWORD', 'your_strong_password'); d. Find the section called Authentication Unique Keys and Salts. These KEY and SALT values provide a layer of encryption to the browser cookies that WordPress users store on their local machines. Basically, adding long, random values here makes your site more secure. Visit https://api.wordpress.org/secret-key/1.1/salt/ to randomly generate a set of key values that you can copy and paste into your wp-config.php file. To paste text into a PuTTY terminal, place the cursor where you want to paste the text and right-click your mouse inside the PuTTY terminal. For more information about security keys, go to https://wordpress.org/support/article/ editing-wp-config-php/#security-keys. Note The values below are for example purposes only; do not use these values for your installation. define('AUTH_KEY', ' #U$$+[RXN8:b^-L 0(WU_+ c+WFkI~c]o]-bHw+)/ Aj[wTwSiZ<Qb[mghEXcRh-'); define('SECURE_AUTH_KEY', 'Zsz._P=l/|y.Lq)XjlkwS1y5NJ76E6EJ.AV0pCKZZB,*~*r ? 6OP$eJT@;+(ndLg'); define('LOGGED_IN_KEY', 'ju}qwre3V*+8f_zOWf?{LlGsQ]Ye@2Jh^,8x>)Y |;(^[Iw]Pi +LG#A4R?7N`YB3'); define('NONCE_KEY', 'P(g62HeZxEes|LnI^i=H,[XwK9I&[2s|:?0N}VJM%?;v2v]v+; +^9eXUahg@::Cj'); define('AUTH_SALT', 'C$DpB4Hj[JK:?{ql`sRVa:{:7yShy(9A@5wg+`JJVb1fk%_- Bx*M4(qc[Qg%JT!h'); Host a WordPress blog on AL2 135 Amazon Linux 2 User Guide define('SECURE_AUTH_SALT', 'd!uRu#}+q#{f$Z?Z9uFPG.${+S{n~1M&%@~gL>U>NV<zpD-@2- Es7Q1O-bp28EKv'); define('LOGGED_IN_SALT', ';j{00P*owZf)kVD+FVLn-~ >.|Y%Ug4#I^*LVd9QeZ^&XmK| e(76miC+&W&+^0P/'); define('NONCE_SALT', '-97r*V/cgxLmp?Zy4zUU4r99QQ_rGs2LTd%P;| _e1tS)8_B/,.6[=UK<J_y9?JWG'); e. Save the file and exit your text editor. To install your WordPress files under the Apache document root • Now that you've unzipped the installation folder, created a MySQL database and user, and customized the WordPress configuration file, you are ready to copy your installation files to your web server document root so you can run the installation script that completes your installation. The location of these files depends on whether you want your WordPress blog to be available at the actual root of
al2-ug-041
al2-ug.pdf
41
Amazon Linux 2 User Guide define('SECURE_AUTH_SALT', 'd!uRu#}+q#{f$Z?Z9uFPG.${+S{n~1M&%@~gL>U>NV<zpD-@2- Es7Q1O-bp28EKv'); define('LOGGED_IN_SALT', ';j{00P*owZf)kVD+FVLn-~ >.|Y%Ug4#I^*LVd9QeZ^&XmK| e(76miC+&W&+^0P/'); define('NONCE_SALT', '-97r*V/cgxLmp?Zy4zUU4r99QQ_rGs2LTd%P;| _e1tS)8_B/,.6[=UK<J_y9?JWG'); e. Save the file and exit your text editor. To install your WordPress files under the Apache document root • Now that you've unzipped the installation folder, created a MySQL database and user, and customized the WordPress configuration file, you are ready to copy your installation files to your web server document root so you can run the installation script that completes your installation. The location of these files depends on whether you want your WordPress blog to be available at the actual root of your web server (for example, my.public.dns.amazonaws.com) or in a subdirectory or folder under the root (for example, my.public.dns.amazonaws.com/blog). • If you want WordPress to run at your document root, copy the contents of the wordpress installation directory (but not the directory itself) as follows: [ec2-user ~]$ cp -r wordpress/* /var/www/html/ • If you want WordPress to run in an alternative directory under the document root, first create that directory, and then copy the files to it. In this example, WordPress will run from the directory blog: [ec2-user ~]$ mkdir /var/www/html/blog [ec2-user ~]$ cp -r wordpress/* /var/www/html/blog/ Important For security purposes, if you are not moving on to the next procedure immediately, stop the Apache web server (httpd) now. After you move your installation under the Apache document root, the WordPress installation script is unprotected and an attacker could gain access to your blog if the Apache web server were running. To stop the Apache web Host a WordPress blog on AL2 136 Amazon Linux 2 User Guide server, enter the command sudo systemctl stop httpd. If you are moving on to the next procedure, you do not need to stop the Apache web server. To allow WordPress to use permalinks WordPress permalinks need to use Apache .htaccess files to work properly, but this is not enabled by default on Amazon Linux. Use this procedure to allow all overrides in the Apache document root. 1. Open the httpd.conf file with your favorite text editor (such as nano or vim). If you do not have a favorite text editor, nano is suitable for beginners. [ec2-user ~]$ sudo vim /etc/httpd/conf/httpd.conf 2. Find the section that starts with <Directory "/var/www/html">. <Directory "/var/www/html"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Host a WordPress blog on AL2 137 Amazon Linux 2 User Guide Require all granted </Directory> 3. Change the AllowOverride None line in the above section to read AllowOverride All. Note There are multiple AllowOverride lines in this file; be sure you change the line in the <Directory "/var/www/html"> section. AllowOverride All 4. Save the file and exit your text editor. To install the PHP graphics drawing library on AL2 The GD library for PHP enables you to modify images. Install this library if you need to crop the header image for your blog. The version of phpMyAdmin that you install might require a specific minimum version of this library (for example, version 7.2). Use the following command to install the PHP graphics drawing library on AL2. For example, if you installed php7.2 from amazon-linux-extras as part of installing the LAMP stack, this command installs version 7.2 of the PHP graphics drawing library. [ec2-user ~]$ sudo yum install php-gd To verify the installed version, use the following command: [ec2-user ~]$ sudo yum list installed php-gd The following is example output: php-gd.x86_64 7.2.30-1.amzn2 @amzn2extra-php7.2 To fix file permissions for the Apache web server Some of the available features in WordPress require write access to the Apache document root (such as uploading media though the Administration screens). If you have not already done so, Host a WordPress blog on AL2 138 Amazon Linux 2 User Guide apply the following group memberships and permissions (as described in greater detail in the Tutorial: Install a LAMP server on AL2). 1. Grant file ownership of /var/www and its contents to the apache user. [ec2-user ~]$ sudo chown -R apache /var/www 2. Grant group ownership of /var/www and its contents to the apache group. [ec2-user ~]$ sudo chgrp -R apache /var/www 3. Change the directory permissions of /var/www and its subdirectories to add group write permissions and to set the group ID
al2-ug-042
al2-ug.pdf
42
you have not already done so, Host a WordPress blog on AL2 138 Amazon Linux 2 User Guide apply the following group memberships and permissions (as described in greater detail in the Tutorial: Install a LAMP server on AL2). 1. Grant file ownership of /var/www and its contents to the apache user. [ec2-user ~]$ sudo chown -R apache /var/www 2. Grant group ownership of /var/www and its contents to the apache group. [ec2-user ~]$ sudo chgrp -R apache /var/www 3. Change the directory permissions of /var/www and its subdirectories to add group write permissions and to set the group ID on future subdirectories. [ec2-user ~]$ sudo chmod 2775 /var/www [ec2-user ~]$ find /var/www -type d -exec sudo chmod 2775 {} \; 4. Recursively change the file permissions of /var/www and its subdirectories. [ec2-user ~]$ find /var/www -type f -exec sudo chmod 0644 {} \; Note If you intend to also use WordPress as an FTP server, you'll need more permissive Group settings here. Please review the recommended steps and security settings in WordPress to accomplish this. 5. Restart the Apache web server to pick up the new group and permissions. • [ec2-user ~]$ sudo systemctl restart httpd Run the WordPress installation script with AL2 You are ready to install WordPress. The commands that you use depend on the operating system. The commands in this procedure are for use with AL2. 1. Use the systemctl command to ensure that the httpd and database services start at every system boot. Host a WordPress blog on AL2 139 Amazon Linux 2 User Guide [ec2-user ~]$ sudo systemctl enable httpd && sudo systemctl enable mariadb 2. Verify that the database server is running. [ec2-user ~]$ sudo systemctl status mariadb If the database service is not running, start it. [ec2-user ~]$ sudo systemctl start mariadb 3. Verify that your Apache web server (httpd) is running. [ec2-user ~]$ sudo systemctl status httpd If the httpd service is not running, start it. [ec2-user ~]$ sudo systemctl start httpd 4. In a web browser, type the URL of your WordPress blog (either the public DNS address for your instance, or that address followed by the blog folder). You should see the WordPress installation script. Provide the information required by the WordPress installation. Choose Install WordPress to complete the installation. For more information, see Step 5: Run the Install Script on the WordPress website. Next steps After you have tested your WordPress blog, consider updating its configuration. Use a custom domain name If you have a domain name associated with your EC2 instance's EIP address, you can configure your blog to use that name instead of the EC2 public DNS address. For more information, see Changing The Site URL on the WordPress website. Configure your blog You can configure your blog to use different themes and plugins to offer a more personalized experience for your readers. However, sometimes the installation process can backfire, causing you to lose your entire blog. We strongly recommend that you create a backup Amazon Machine Image Host a WordPress blog on AL2 140 Amazon Linux 2 User Guide (AMI) of your instance before attempting to install any themes or plugins so you can restore your blog if anything goes wrong during installation. For more information, see Create your own AMI. Increase capacity If your WordPress blog becomes popular and you need more compute power or storage, consider the following steps: • Expand the storage space on your instance. For more information, see Amazon EBS Elastic Volumes in the Amazon EBS User Guide. • Move your MySQL database to Amazon RDS to take advantage of the service's ability to scale easily. Improve network performance of your internet traffic If you expect your blog to drive traffic from users located around the world, consider AWS Global Accelerator. Global Accelerator helps you achieve lower latency by improving internet traffic performance between your users’ client devices and your WordPress application running on AWS. Global Accelerator uses the AWS global network to direct traffic to a healthy application endpoint in the AWS Region that is closest to the client. Learn more about WordPress For information about WordPress, see the WordPress Codex help documentation at http:// codex.wordpress.org/. For more information about troubleshooting your installation, see Common installation problems. For information about making your WordPress blog more secure, see Hardening WordPress. For information about keeping your WordPress blog up-to-date, see Updating WordPress. Help! My public DNS name changed and now my blog is broken Your WordPress installation is automatically configured using the public DNS address for your EC2 instance. If you stop and restart the instance, the public DNS address changes (unless it is associated with an Elastic IP address) and your blog will not work anymore because it references resources at an address that no longer exists (or is assigned
al2-ug-043
al2-ug.pdf
43
about troubleshooting your installation, see Common installation problems. For information about making your WordPress blog more secure, see Hardening WordPress. For information about keeping your WordPress blog up-to-date, see Updating WordPress. Help! My public DNS name changed and now my blog is broken Your WordPress installation is automatically configured using the public DNS address for your EC2 instance. If you stop and restart the instance, the public DNS address changes (unless it is associated with an Elastic IP address) and your blog will not work anymore because it references resources at an address that no longer exists (or is assigned to another EC2 instance). A more detailed description of the problem and several possible solutions are outlined in Changing the Site URL. Host a WordPress blog on AL2 141 Amazon Linux 2 User Guide If this has happened to your WordPress installation, you might be able to recover your blog with the procedure below, which uses the wp-cli command line interface for WordPress. To change your WordPress site URL with the wp-cli 1. Connect to your EC2 instance with SSH. 2. Note the old site URL and the new site URL for your instance. The old site URL is likely the public DNS name for your EC2 instance when you installed WordPress. The new site URL is the current public DNS name for your EC2 instance. If you are not sure of your old site URL, you can use curl to find it with the following command. [ec2-user ~]$ curl localhost | grep wp-content You should see references to your old public DNS name in the output, which will look like this (old site URL in red): <script type='text/javascript' src='http://ec2-52-8-139-223.us- west-1.compute.amazonaws.com/wp-content/themes/twentyfifteen/js/functions.js? ver=20150330'></script> 3. Download the wp-cli with the following command. [ec2-user ~]$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/ phar/wp-cli.phar 4. Search and replace the old site URL in your WordPress installation with the following command. Substitute the old and new site URLs for your EC2 instance and the path to your WordPress installation (usually /var/www/html or /var/www/html/blog). [ec2-user ~]$ php wp-cli.phar search-replace 'old_site_url' 'new_site_url' --path=/ path/to/wordpress/installation --skip-columns=guid 5. In a web browser, enter the new site URL of your WordPress blog to verify that the site is working properly again. If it is not, see Changing the Site URL and Common installation problems for more information. Host a WordPress blog on AL2 142 Amazon Linux 2 User Guide Using Amazon Linux 2 outside of Amazon EC2 The AL2 container images can be run in compatible container runtime environments. AL2 can also be run as a virtualized guest outside of directly being run on Amazon EC2. Note The configuration of AL2 images differs from AL2023. When migrating to AL2023, ensure that you review Using Amazon Linux 2023 outside of Amazon EC2 and adapt your configuration to be compatible with AL2023. Run AL2 as a virtual machine on premises Use the AL2 virtual machine (VM) images for on-premises development and testing. We offer a different AL2 VM image for each of the supported virtualization platforms. You can view the list of supported platforms on the Amazon Linux 2 virtual machine images page. To use the AL2 virtual machine images with one of the supported virtualization platforms, do the following: • Step 1: Prepare the seed.iso boot image • Step 2: Download the AL2 VM image • Step 3: Boot and connect to your new VM Step 1: Prepare the seed.iso boot image The seed.iso boot image includes the initial configuration information that is needed to boot your new VM, such as the network configuration, host name, and user data. Note The seed.iso boot image includes only the configuration information required to boot the VM. It does not include the AL2 operating system files. To generate the seed.iso boot image, you need two configuration files: Run AL2 on premises 143 Amazon Linux 2 User Guide • meta-data – This file includes the hostname and static network settings for the VM. • user-data – This file configures user accounts, and specifies their passwords, key pairs, and access mechanisms. By default, the AL2 VM image creates an ec2-user user account. You use the user-data configuration file to set the password for the default user account. To create the seed.iso boot disc 1. Create a new folder named seedconfig and navigate into it. 2. Create the meta-data configuration file. a. Create a new file named meta-data. b. Open the meta-data file using your preferred editor and add the following. local-hostname: vm_hostname # eth0 is the default network interface enabled in the image. You can configure static network settings with an entry like the following. network-interfaces: | auto eth0 iface eth0 inet static address 192.168.1.10 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.254 Replace vm_hostname with a VM host name of your choice, and configure the network settings as required.
al2-ug-044
al2-ug.pdf
44
seed.iso boot disc 1. Create a new folder named seedconfig and navigate into it. 2. Create the meta-data configuration file. a. Create a new file named meta-data. b. Open the meta-data file using your preferred editor and add the following. local-hostname: vm_hostname # eth0 is the default network interface enabled in the image. You can configure static network settings with an entry like the following. network-interfaces: | auto eth0 iface eth0 inet static address 192.168.1.10 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.254 Replace vm_hostname with a VM host name of your choice, and configure the network settings as required. c. Save and close the meta-data configuration file. For an example meta-data configuration file that specifies a VM hostname (amazonlinux.onprem), configures the default network interface (eth0), and specifies static IP addresses for the necessary network devices, see the sample Seed.iso file. 3. Create the user-data configuration file. a. Create a new file named user-data. b. Open the user-data file using your preferred editor and add the following. Step 1: Prepare the seed.iso boot image 144 Amazon Linux 2 User Guide #cloud-config #vim:syntax=yaml users: # A user by the name `ec2-user` is created in the image by default. - default chpasswd: list: | ec2-user:plain_text_password # In the above line, do not add any spaces after 'ec2-user:'. Replace plain_text_password with a password of your choice for the default ec2- user user account. c. (Optional) By default, cloud-init applies network settings each time the VM boots. Add the following to prevent cloud-init from applying network settings at each boot, and to retain the network settings applied during the first boot. # NOTE: Cloud-init applies network settings on every boot by default. To retain network settings # from first boot, add the following ‘write_files’ section: write_files: - path: /etc/cloud/cloud.cfg.d/80_disable_network_after_firstboot.cfg content: | # Disable network configuration after first boot network: config: disabled d. Save and close the user-data configuration file. You can also create additional user accounts and specify their access mechanisms, passwords, and key pairs. For more information about the supported directives, see Module reference. For an example user-data file that creates three additional users and specifies a custom password for the default ec2-user user account, see the sample Seed.iso file. 4. Create the seed.iso boot image using the meta-data and user-data configuration files. For Linux, use a tool such as genisoimage. Navigate into the seedconfig folder, and run the following command. $ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data Step 1: Prepare the seed.iso boot image 145 Amazon Linux 2 User Guide For macOS, use a tool such as hdiutil. Navigate one level up from the seedconfig folder, and run the following command. $ hdiutil makehybrid -o seed.iso -hfs -joliet -iso -default-volume-name cidata seedconfig/ Step 2: Download the AL2 VM image We offer a different AL2 VM image for each of the supported virtualization platforms. You can view the list of supported platforms and download the correct VM image for your chosen platform from the Amazon Linux 2 virtual machine images page. Step 3: Boot and connect to your new VM To boot and connect to your new VM, you must have the seed.iso boot image (created in Step 1) and an AL2 VM image (downloaded in Step 2). The steps vary depending on your chosen VM platform. VMware vSphere The VM image for VMware is made available in the OVF format. To boot the VM using VMware vSphere 1. Create a new datastore for the seed.iso file, or add it to an existing datastore. 2. Deploy the OVF template, but do not start the VM yet. 3. In the Navigator panel, right-click the new virtual machine and choose Edit Settings. 4. On the Virtual Hardware tab, for New device, choose CD/DVD Drive, and then choose Add. 5. For New CD/DVD Drive, choose Datastore ISO File. Select the datastore to which you added the seed.iso file, browse to and select the seed.iso file, and then choose OK. 6. For New CD/DVD Drive, select Connect, and then choose OK. After you have associated the datastore with the VM, you should be able to boot it. Step 2: Download the AL2 VM image 146 Amazon Linux 2 KVM To boot the VM using KVM 1. Open the Create new VM wizard. User Guide 2. 3. 4. 5. 6. 7. 8. For Step 1, choose Import existing disk image. For Step 2, browse to and select the VM image. For OS type and Version, choose Linux and Red Hat Enterprise Linux 7.0 respectively. For Step 3, specify the amount of RAM and the number of CPUs to use. For Step 4, enter a name for the new VM and select Customize configuration before install, and choose Finish. In the Configuration window for the VM, choose Add Hardware. In the Add New Virtual Hardware window,
al2-ug-045
al2-ug.pdf
45
KVM 1. Open the Create new VM wizard. User Guide 2. 3. 4. 5. 6. 7. 8. For Step 1, choose Import existing disk image. For Step 2, browse to and select the VM image. For OS type and Version, choose Linux and Red Hat Enterprise Linux 7.0 respectively. For Step 3, specify the amount of RAM and the number of CPUs to use. For Step 4, enter a name for the new VM and select Customize configuration before install, and choose Finish. In the Configuration window for the VM, choose Add Hardware. In the Add New Virtual Hardware window, choose Storage. In the Storage configuration, choose Select or create custom storage. For Device type, choose CDROM device. Choose Manage, Browse Local, and then navigate to and select the seed.iso file. Choose Finish. 9. Choose Begin Installation. Oracle VirtualBox To boot the VM using Oracle VirtualBox 1. Open Oracle VirtualBox and choose New. 2. 3. 4. For Name, enter a descriptive name for the virtual machine, and for Type and Version, select Linux and Red Hat (64-bit) respectively. Choose Continue. For Memory size, specify the amount of memory to allocate to the virtual machine, and then choose Continue. For Hard disk, choose Use an existing virtual hard disk file, browse to and open the VM image, and then choose Create. 5. Before you start the VM, you must load the seed.iso file in the virtual machine's virtual optical drive: a. b. Select the new VM, choose Settings, and then choose Storage. In the Storage Devices list, under Controller: IDE, choose the Empty optical drive. Step 3: Boot and connect to your new VM 147 Amazon Linux 2 User Guide c. In the Attributes section for the optical drive, choose the browse button, select Choose Virtual Optical Disk File, and then select the seed.iso file. Choose OK to apply the changes and close the Settings. After you have added the seed.iso file to the virtual optical drive, you should be able to start the VM. Microsoft Hyper-V The VM image for Microsoft Hyper-V is compressed into a zip file. You must extract the contents of the zip file. To boot the VM using Microsoft Hyper-V 1. Open the New Virtual Machine Wizard. 2. When prompted to select a generation, select Generation 1. 3. When prompted to configure the network adapter, for Connection choose External. 4. When prompted to connect a virtual hard disk, choose Use an existing virtual hard disk, choose Browse, and then navigate to and select the VM image. Choose Finish to create the VM. 5. Right-click the new VM and choose Settings. In the Settings window, under IDE Controller 1, choose DVD Drive. 6. For the DVD drive, choose Image file and then browse to and select the seed.iso file. 7. Apply the changes and start the VM. After the VM has booted, log in using one of the user accounts that is defined in the user- data configuration file. After you have logged in for the first time, you can then disconnect the seed.iso boot image from the VM. Step 3: Boot and connect to your new VM 148 Amazon Linux 2 User Guide Identify AL2 instances The following information describes how to identify an AL2 instance from another Amazon Linux version or other Linux distribution. Identify Amazon Linux images Each image contains a unique /etc/image-id file that identifies it. This file contains the following information about the image: • image_name, image_version, image_arch – Values from the build recipe that Amazon used to construct the image. • image_stamp – A unique, random hex value generated during image creation. • image_date – The UTC time of image creation, in YYYYMMDDhhmmss format. • recipe_name, recipe_id – The name and ID of the build recipe Amazon used to construct the image. Amazon Linux contains an /etc/system-release file that specifies the current release that is installed. This file is updated using yum and is part of the system-release RPM Package Manager (RPM). Amazon Linux also contains a machine-readable version of /etc/system-release that follows the Common Platform Enumeration (CPE) specification; see /etc/system-release-cpe. AL2 The following is an example of /etc/image-id for the current version of AL2. [ec2-user ~]$ cat /etc/image-id image_name="amzn2-ami-hvm" image_version="2" image_arch="x86_64" image_file="amzn2-ami-hvm-2.0.20180810-x86_64.xfs.gpt" image_stamp="8008-2abd" image_date="20180811020321" recipe_name="amzn2 ami" recipe_id="c652686a-2415-9819-65fb-4dee-9792-289d-1e2846bd" Identify Amazon Linux images 149 Amazon Linux 2 User Guide The following is an example of /etc/system-release for the current version of AL2. [ec2-user ~]$ cat /etc/system-release AL2 The following is an example of /etc/os-release for AL2. [ec2-user ~]$ 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/" Amazon Linux AMI The following is an example of /etc/image-id for the current Amazon Linux AMI. [ec2-user ~]$ cat /etc/image-id image_name="amzn-ami-hvm" image_version="2018.03" image_arch="x86_64" image_file="amzn-ami-hvm-2018.03.0.20180811-x86_64.ext4.gpt" image_stamp="cc81-f2f3" image_date="20180811012746" recipe_name="amzn ami" recipe_id="5b283820-dc60-a7ea-d436-39fa-439f-02ea-5c802dbd" The following is an example of /etc/system-release for the
al2-ug-046
al2-ug.pdf
46
image_arch="x86_64" image_file="amzn2-ami-hvm-2.0.20180810-x86_64.xfs.gpt" image_stamp="8008-2abd" image_date="20180811020321" recipe_name="amzn2 ami" recipe_id="c652686a-2415-9819-65fb-4dee-9792-289d-1e2846bd" Identify Amazon Linux images 149 Amazon Linux 2 User Guide The following is an example of /etc/system-release for the current version of AL2. [ec2-user ~]$ cat /etc/system-release AL2 The following is an example of /etc/os-release for AL2. [ec2-user ~]$ 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/" Amazon Linux AMI The following is an example of /etc/image-id for the current Amazon Linux AMI. [ec2-user ~]$ cat /etc/image-id image_name="amzn-ami-hvm" image_version="2018.03" image_arch="x86_64" image_file="amzn-ami-hvm-2018.03.0.20180811-x86_64.ext4.gpt" image_stamp="cc81-f2f3" image_date="20180811012746" recipe_name="amzn ami" recipe_id="5b283820-dc60-a7ea-d436-39fa-439f-02ea-5c802dbd" The following is an example of /etc/system-release for the current Amazon Linux AMI. [ec2-user ~]$ cat /etc/system-release Amazon Linux AMI release 2018.03 Amazon Linux AMI 150 Amazon Linux 2 User Guide AWS integration in AL2 AWS command line tools The AWS Command Line Interface (AWS CLI) is an open source tool that provides a consistent interface to interact with AWS services using commands in your command-line shell. For more information, see What is the AWS Command Line Interface? in the AWS Command Line Interface User Guide. AL2 and AL1 have version 1 of the AWS CLI preinstalled. The current release of Amazon Linux, AL2023, has version 2 of the AWS CLI preinstalled. For more information about using the AWS CLI on AL2023, see Get started with AL2023 in the Amazon Linux 2023 User Guide. AWS command line tools 151 Amazon Linux 2 User Guide Getting started with programming runtimes AL2 provides different versions of certain language runtimes. We work with upstream projects, such as PHP, that support multiple versions at the same time. To find information about how to install and manage these name-versioned packages, use the yum command to search and install these packages. For more information, see Package repository. The following topics describe how each language runtime functions in AL2. Topics • C, C++, and Fortran in AL2 • Go in AL2 • Java in AL2 • Perl in AL2 • PHP in AL2 • Python in AL2 • Rust in AL2 C, C++, and Fortran in AL2 AL2 includes both the GNU Compiler Collection (GCC) and the Clang frontend for LLVM. The major version of GCC will remain constant throughout the lifetime of AL2. Bug and security fixes might be backported to the major version of GCC that ships in AL2. By default, AL2 includes version 7.3 of GCC which builds almost all packages. The gcc10 package makes GCC 10 available to a limited extent, but we don't recommend using GCC 10 to build packages. The default compiler flags that build AL2 RPMs include some optimization and hardening flags. We recommend that you include some optimization and hardening flags if you are building your own code with GCC. The default compiler and optimization flags in AL2023 improve upon what is present in AL2. C/C++ and Fortran 152 Amazon Linux 2 Go in AL2 User Guide You might want to build your own code written in Go on Amazon Linux using a toolchain provided with AL2. The Go toolchain will be updated throughout the life of AL2. This might be in response to any CVE in the toolchain we ship, or as a prerequisite of addressing a CVE in another package. Go is a relatively fast moving programming language. There might be a situation where existing applications written in Go have to adapt to new versions of the Go toolchain. For more information about Go, see Go 1 and the Future of Go Programs. Although AL2 will incorporate new versions of the Go toolchain during its life, this will not be in lockstep with the upstream Go releases. Therefore, using the Go toolchain provided in AL2 might not be suitable if you want to build Go code using cutting-edge features of the Go language and standard library. During the lifetime of AL2, earlier package versions are not removed from the repositories. If an earlier Go toolchain is required, you can choose to forgo bug and security fixes of newer Go toolchains and install an earlier version from the repositories using the same mechanisms available for any RPM. If you want to build your own Go code on AL2 you can use the Go toolchain included in AL2 with the knowledge that this toolchain might move forward through the lifetime of AL2. Java in AL2 AL2 provides several versions of Amazon Corretto to support Java based workloads, as well as some OpenJDK versions. We recommend that you migrate to Amazon Corretto in preparation for migrating to AL2023. Corretto is a build of the Open Java Development Kit (OpenJDK) with long-term support from Amazon. Corretto is certified using the Java Technical Compatibility Kit (TCK) to ensure it meets the Java SE standard and is available on Linux, Windows, and macOS. An Amazon Corretto package is available for each of
al2-ug-047
al2-ug.pdf
47
with the knowledge that this toolchain might move forward through the lifetime of AL2. Java in AL2 AL2 provides several versions of Amazon Corretto to support Java based workloads, as well as some OpenJDK versions. We recommend that you migrate to Amazon Corretto in preparation for migrating to AL2023. Corretto is a build of the Open Java Development Kit (OpenJDK) with long-term support from Amazon. Corretto is certified using the Java Technical Compatibility Kit (TCK) to ensure it meets the Java SE standard and is available on Linux, Windows, and macOS. An Amazon Corretto package is available for each of Corretto 1.8.0, Corretto 11, and Corretto 17. Each Corretto version in AL2 is supported for the same period of time as the Corretto version is, or until the end of life of AL2, whichever is sooner. For more information, see the Amazon Corretto FAQs. Go in AL2 153 Amazon Linux 2 Perl in AL2 AL2 provides version 5.16 of the Perl programming language. Perl modules in AL2 User Guide Various Perl modules are packaged as RPMs in AL2. Although there are many Perl modules available as RPMs, Amazon Linux does not try to package every possible Perl module. Modules packaged as RPMs might be relied upon by other operating system RPM packages, so Amazon Linux will prioritize ensuring they are security patched over pure feature updates. AL2 also includes CPAN so that Perl developers can use the idiomatic package manager for Perl modules. PHP in AL2 AL2 currently provides two fully supported versions of the PHP programming language as part of AL2 Extras Library. Each PHP version is supported for the same time frame as upstream PHP as listed under deprecated date in List of Amazon Linux 2 Extras. For information about how to use AL2 Extras to install application and software updates on your instances, see AL2 Extras Library. To assist migration to AL2023, both PHP 8.1 and 8.2 are available on AL2 and AL2023. Note AL2 includes PHP 7.1, 7.2, 7.3, and 7.4 in amazon-linux-extras. All of these Extras are EOL and are not guaranteed to get any additional security updates. To find out when each version of PHP is deprecated in AL2, see the List of Amazon Linux 2 Extras. Migrating from earlier PHP 8.x versions The upstream PHP community put together comprehensive migration documentation for moving to PHP 8.2 from PHP 8.1. Documentation also exists for migrating from PHP 8.0 to 8.1. Perl 154 Amazon Linux 2 User Guide AL2 includes PHP 8.0, 8.1, and 8.2 in amazon-linux-extras that enables an efficient upgrade path to AL2023. To find out when each version of PHP is deprecated in AL2, see the List of Amazon Linux 2 Extras. Migrating from PHP 7.x versions The upstream PHP community put together comprehensive migration documentation for moving to PHP 8.0 from PHP 7.4. Combined with the documentation referenced in the previous section on migrating to PHP 8.1, and PHP 8.2, you have all of the steps needed to migrate your PHP based application to modern PHP. The PHP project maintains a list and schedule of supported versions, along with a list of unsupported branches. Note When AL2023 was released, all 7.x and 5.x versions of PHP were not supported by the PHP community, and were not included as options in AL2023. Python in AL2 AL2 provides support and security patches for Python 2.7 until June 2025, as part of our long-term support commitment for AL2 core packages. This support extends beyond the upstream Python community declaration of Python 2.7 EOL of January 2020. Note AL2023 completely removed Python 2.7. Any components requiring Python are now written to work with Python 3. AL2 uses the yum package manager that has a hard dependency on Python 2.7. In AL2023, the dnf package manager has migrated to Python 3, and no longer requires Python 2.7. AL2023 has completely moved to Python 3. We recommend that you complete your migration to Python 3. Rust in AL2 You might want to build your own code written in Rust on AL2 using a toolchain provided with AL2. Migrating from PHP 7.x versions 155 Amazon Linux 2 User Guide The Rust toolchain will be updated throughout the life of AL2. This might be in response to a CVE in the toolchain we ship, or as prerequisite for a CVE update in another package. Rust is a relatively fast moving language, with new releases at approximately a six-week cadence. The new releases might add new language or standard library features. Although AL2 will incorporate new versions of the Rust toolchain during its life, this will not be in lockstep with the upstream Rust releases. Therefore, using the Rust toolchain provided in AL2 might not be suitable if you want to build Rust code using cutting-edge features of the Rust
al2-ug-048
al2-ug.pdf
48
of AL2. This might be in response to a CVE in the toolchain we ship, or as prerequisite for a CVE update in another package. Rust is a relatively fast moving language, with new releases at approximately a six-week cadence. The new releases might add new language or standard library features. Although AL2 will incorporate new versions of the Rust toolchain during its life, this will not be in lockstep with the upstream Rust releases. Therefore, using the Rust toolchain provided in AL2 might not be suitable if you want to build Rust code using cutting-edge features of the Rust language. During the lifetime of AL2, previous package versions are not removed from the repositories. If a previous Rust toolchain is required, you can choose to forgo bug and security fixes of newer Rust toolchains and install a previous version from the repositories using the same processes available for any RPM. To build your own Rust code on AL2, use the Rust toolchain included in AL2 with the knowledge that this toolchain might move forward throughout the lifetime of AL2. Rust in AL2 156 Amazon Linux 2 AL2 kernel User Guide AL2 originally shipped with a 4.14 kernel, with version 5.10 as the current default. If you are still using a 4.14 kernel, you are encouraged to migrate to the 5.10 kernel. Kernel live patching is supported on AL2. Topics • AL2 supported kernels • Kernel Live Patching on AL2 AL2 supported kernels Supported kernel versions Currently, AL2 AMIs are available with kernel versions 4.14 and 5.10, with version 5.10 as the default. We recommend that you use an AL2 AMI with kernel 5.10. AL2023 AMIs are available with kernel version 6.1. For more information, see AL2023 Kernel changes from AL2 in the Amazon Linux 2023 User Guide. Support Timeframe The 5.10 kernel available on AL2 will be supported until the AL2 AMI reaches the end of standard support. Live patching support AL2 kernel version Kernel live patching supported 4.14 5.10 5.15 Yes Yes No AL2 supported kernels 157 Amazon Linux 2 User Guide Kernel Live Patching on AL2 Kernel Live Patching for AL2 allows you to apply specific security vulnerability and critical bug patches to a running Linux kernel, without reboots or disruptions to running applications. This allows you to benefit from improved service and application availability, while applying these fixes until the system can be rebooted. For information about Kernel Live Patching for AL2023, see Kernel Live Patching on AL2023 in the Amazon Linux 2023 User Guide. AWS releases two types of kernel live patches for AL2: • Security updates – Include updates for Linux common vulnerabilities and exposures (CVE). These updates are typically rated as important or critical using the Amazon Linux Security Advisory ratings. They generally map to a Common Vulnerability Scoring System (CVSS) score of 7 and higher. In some cases, AWS might provide updates before a CVE is assigned. In these cases, the patches might appear as bug fixes. • Bug fixes – Include fixes for critical bugs and stability issues that are not associated with CVEs. AWS provides kernel live patches for an AL2 kernel version for up to 3 months after its release. After the 3-month period, you must update to a later kernel version to continue to receive kernel live patches. AL2 kernel live patches are made available as signed RPM packages in the existing AL2 repositories. The patches can be installed on individual instances using existing yum workflows, or they can be installed on a group of managed instances using AWS Systems Manager. Kernel Live Patching on AL2 is provided at no additional cost. Topics • Supported configurations and prerequisites • Work with Kernel Live Patching • Limitations • Frequently asked questions Kernel Live Patching 158 Amazon Linux 2 User Guide Supported configurations and prerequisites Kernel Live Patching is supported on Amazon EC2 instances and on-premises virtual machines running AL2. To use Kernel Live Patching on AL2, you must use: • Kernel version 4.14 or 5.10 on the x86_64 architecture • Kernel version 5.10 on the ARM64 architecture Policy Requirements To download packages from Amazon Linux repositories, Amazon EC2 needs access to service- owned Amazon S3 buckets. If you are using a Amazon Virtual Private Cloud (VPC) endpoint for Amazon S3 in your environment, you need to ensure that your VPC endpoint policy allows access to those public buckets. The table describes each of the Amazon S3 buckets that EC2 might need to access for Kernel Live Patching. S3 bucket ARN Description arn:aws:s3:::packages.region.amazonaw s.com/* Amazon S3 bucket containing Amazon Linux AMI packages arn:aws:s3:::repo.region.amazonaws.com/* arn:aws:s3:::amazonlinux.region.amazonaw s.com/* Amazon S3 bucket containing Amazon Linux AMI repositories Amazon S3 bucket containing AL2 repositories arn:aws:s3:::amazonlinux-2-repos-region/* Amazon S3 bucket containing AL2 repositories The following policy illustrates how to restrict access to identities and resources that belong
al2-ug-049
al2-ug.pdf
49
using a Amazon Virtual Private Cloud (VPC) endpoint for Amazon S3 in your environment, you need to ensure that your VPC endpoint policy allows access to those public buckets. The table describes each of the Amazon S3 buckets that EC2 might need to access for Kernel Live Patching. S3 bucket ARN Description arn:aws:s3:::packages.region.amazonaw s.com/* Amazon S3 bucket containing Amazon Linux AMI packages arn:aws:s3:::repo.region.amazonaws.com/* arn:aws:s3:::amazonlinux.region.amazonaw s.com/* Amazon S3 bucket containing Amazon Linux AMI repositories Amazon S3 bucket containing AL2 repositories arn:aws:s3:::amazonlinux-2-repos-region/* Amazon S3 bucket containing AL2 repositories The following policy illustrates how to restrict access to identities and resources that belong to your organization and provide access to the Amazon S3 buckets required for Kernel Live Patching. Replace region, principal-org-id and resource-org-id with your organization’s values. Supported configurations and prerequisites 159 Amazon Linux 2 User Guide { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowRequestsByOrgsIdentitiesToOrgsResources", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "*", "Resource": "*", "Condition": { "StringEquals": { "aws:PrincipalOrgID": "principal-org-id", "aws:ResourceOrgID": "resource-org-id" } } }, { "Sid": "AllowAccessToAmazonLinuxAMIRepositories", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": [ "s3:GetObject" ], "Resource": [ "arn:aws:s3:::packages.region.amazonaws.com/*", "arn:aws:s3:::repo.region.amazonaws.com/*", "arn:aws:s3:::amazonlinux.region.amazonaws.com/*", "arn:aws:s3:::amazonlinux-2-repos-region/*" ] } ] } Supported configurations and prerequisites 160 Amazon Linux 2 User Guide Work with Kernel Live Patching You can enable and use Kernel Live Patching on individual instances using the command line on the instance itself, or you can enable and use Kernel Live Patching on a group of managed instances using AWS Systems Manager. The following sections explain how to enable and use Kernel Live Patching on individual instances using the command line. For more information about enabling and using Kernel Live Patching on a group of managed instances, see Use Kernel Live Patching on AL2 instances in the AWS Systems Manager User Guide. Topics • Enable Kernel Live Patching • View the available kernel live patches • Apply kernel live patches • View the applied kernel live patches • Disable Kernel Live Patching Enable Kernel Live Patching Kernel Live Patching is disabled by default on AL2. To use live patching, you must install the yum plugin for Kernel Live Patching and enable the live patching functionality. Prerequisites Kernel Live Patching requires binutils. If you do not have binutils installed, install it using the following command: $ sudo yum install binutils To enable Kernel Live Patching 1. Kernel live patches are available for the following AL2 kernel versions: • Kernel version 4.14 or 5.10 on the x86_64 architecture • Kernel version 5.10 on the ARM64 architecture Work with Kernel Live Patching 161 Amazon Linux 2 User Guide To check your kernel version, run the following command. $ sudo yum list kernel 2. If you already have a supported kernel version, skip this step. If you do not have a supported kernel version, run the following commands to update the kernel to the latest version and to reboot the instance. $ sudo yum install -y kernel $ sudo reboot 3. Install the yum plugin for Kernel Live Patching. $ sudo yum install -y yum-plugin-kernel-livepatch 4. Enable the yum plugin for Kernel Live Patching. $ sudo yum kernel-livepatch enable -y This command also installs the latest version of the kernel live patch RPM from the configured repositories. 5. To confirm that the yum plugin for kernel live patching has installed successfully, run the following command. $ rpm -qa | grep kernel-livepatch When you enable Kernel Live Patching, an empty kernel live patch RPM is automatically applied. If Kernel Live Patching was successfully enabled, this command returns a list that includes the initial empty kernel live patch RPM. The following is example output. yum-plugin-kernel-livepatch-1.0-0.11.amzn2.noarch kernel-livepatch-5.10.102-99.473-1.0-0.amzn2.x86_64 6. Install the kpatch package. $ sudo yum install -y kpatch-runtime Work with Kernel Live Patching 162 Amazon Linux 2 User Guide 7. Update the kpatch service if it was previously installed. $ sudo yum update kpatch-runtime 8. Start the kpatch service. This service loads all of the kernel live patches upon initialization or at boot. $ sudo systemctl enable kpatch.service 9. Enable the Kernel Live Patching topic in the AL2 Extras Library. This topic contains the kernel live patches. $ sudo amazon-linux-extras enable livepatch View the available kernel live patches Amazon Linux security alerts are published to the Amazon Linux Security Center. For more information about the AL2 security alerts, which include alerts for kernel live patches, see the Amazon Linux Security Center. Kernel live patches are prefixed with ALASLIVEPATCH. The Amazon Linux Security Center might not list kernel live patches that address bugs. You can also discover the available kernel live patches for advisories and CVEs using the command line. To list all available kernel live patches for advisories Use the following command. $ yum updateinfo list The following shows example output. Loaded plugins: extras_suggestions, kernel-livepatch, langpacks, priorities, update- motd ALAS2LIVEPATCH-2020-002 important/Sec. kernel- livepatch-5.10.102-99.473-1.0-3.amzn2.x86_64 ALAS2LIVEPATCH-2020-005 medium/Sec. kernel-livepatch-5.10.102-99.473-1.0-4.amzn2.x86_64 updateinfo
al2-ug-050
al2-ug.pdf
50
Linux Security Center. For more information about the AL2 security alerts, which include alerts for kernel live patches, see the Amazon Linux Security Center. Kernel live patches are prefixed with ALASLIVEPATCH. The Amazon Linux Security Center might not list kernel live patches that address bugs. You can also discover the available kernel live patches for advisories and CVEs using the command line. To list all available kernel live patches for advisories Use the following command. $ yum updateinfo list The following shows example output. Loaded plugins: extras_suggestions, kernel-livepatch, langpacks, priorities, update- motd ALAS2LIVEPATCH-2020-002 important/Sec. kernel- livepatch-5.10.102-99.473-1.0-3.amzn2.x86_64 ALAS2LIVEPATCH-2020-005 medium/Sec. kernel-livepatch-5.10.102-99.473-1.0-4.amzn2.x86_64 updateinfo list done To list all available kernel live patches for CVEs Work with Kernel Live Patching 163 Amazon Linux 2 Use the following command. $ yum updateinfo list cves The following shows example output. User Guide Loaded plugins: extras_suggestions, kernel-livepatch, langpacks, priorities, update- motdamzn2-core/2/x86_64 | 2.4 kB 00:00:00 CVE-2019-15918 important/Sec. kernel-livepatch-5.10.102-99.473-1.0-3.amzn2.x86_64 CVE-2019-20096 important/Sec. kernel-livepatch-5.10.102-99.473-1.0-3.amzn2.x86_64 CVE-2020-8648 medium/Sec. kernel-livepatch-5.10.102-99.473-1.0-4.amzn2.x86_64 updateinfo list done Apply kernel live patches You apply kernel live patches using the yum package manager in the same way that you would apply regular updates. The yum plugin for Kernel Live Patching manages the kernel live patches that are available to be applied. Tip We recommend that you update your kernel regularly using Kernel Live Patching to ensure that it receives specific important and critical security fixes until the system can be rebooted. Please also check if additional fixes have been made available to the native kernel package that cannot be deployed as live patches and update and reboot into the kernel update for those cases. You can choose to apply a specific kernel live patch, or to apply any available kernel live patches along with your regular security updates. To apply a specific kernel live patch 1. Get the kernel live patch version using one of the commands described in View the available kernel live patches. 2. Apply the kernel live patch for your AL2 kernel. $ sudo yum install kernel-livepatch-kernel_version.x86_64 Work with Kernel Live Patching 164 Amazon Linux 2 User Guide For example, the following command applies a kernel live patch for AL2 kernel version 5.10.102-99.473. $ sudo yum install kernel-livepatch-5.10.102-99.473-1.0-4.amzn2.x86_64 To apply any available kernel live patches along with your regular security updates Use the following command. $ sudo yum update --security Omit the --security option to include bug fixes. Important • The kernel version is not updated after applying kernel live patches. The version is only updated to the new version after the instance is rebooted. • An AL2 kernel receives kernel live patches for a period of three months. After the three month period has lapsed, no new kernel live patches are released for that kernel version. To continue to receive kernel live patches after the three-month period, you must reboot the instance to move to the new kernel version, which will then continue receiving kernel live patches for the next three months. To check the support window for your kernel version, run yum kernel-livepatch supported. View the applied kernel live patches To view the applied kernel live patches Use the following command. $ kpatch list The command returns a list of the loaded and installed security update kernel live patches. The following is example output. Loaded patch modules: Work with Kernel Live Patching 165 Amazon Linux 2 User Guide livepatch_cifs_lease_buffer_len [enabled] livepatch_CVE_2019_20096 [enabled] livepatch_CVE_2020_8648 [enabled] Installed patch modules: livepatch_cifs_lease_buffer_len (5.10.102-99.473.amzn2.x86_64) livepatch_CVE_2019_20096 (5.10.102-99.473.amzn2.x86_64) livepatch_CVE_2020_8648 (5.10.102-99.473.amzn2.x86_64) Note A single kernel live patch can include and install multiple live patches. Disable Kernel Live Patching If you no longer need to use Kernel Live Patching, you can disable it at any time. To disable Kernel Live Patching 1. Remove the RPM packages for the applied kernel live patches. $ sudo yum kernel-livepatch disable 2. Uninstall the yum plugin for Kernel Live Patching. $ sudo yum remove yum-plugin-kernel-livepatch 3. Reboot the instance. $ sudo reboot Limitations Kernel Live Patching has the following limitations: • While applying a kernel live patch, you can't perform hibernation, use advanced debugging tools (such as SystemTap, kprobes, and eBPF-based tools), or access ftrace output files used by the Kernel Live Patching infrastructure. Limitations 166 Amazon Linux 2 • Note User Guide Due to technical limitations, some issues cannot be addressed with live patching. Because of that, these fixes will not be shipped in the kernel live patch package but only in the native kernel package update. You can install the native kernel package update and reboot the system to activate the patches as usual. Frequently asked questions For frequently asked questions about Kernel Live Patching for AL2, see the Amazon Linux 2 Kernel Live Patching FAQ. Frequently asked questions 167 Amazon Linux 2 User Guide AL2 Extras Library Warning The epel Extra enables the third party EPEL7 repository. As of 2024-06-30 the third-party EPEL7 repository
al2-ug-051
al2-ug.pdf
51
some issues cannot be addressed with live patching. Because of that, these fixes will not be shipped in the kernel live patch package but only in the native kernel package update. You can install the native kernel package update and reboot the system to activate the patches as usual. Frequently asked questions For frequently asked questions about Kernel Live Patching for AL2, see the Amazon Linux 2 Kernel Live Patching FAQ. Frequently asked questions 167 Amazon Linux 2 User Guide AL2 Extras Library Warning The epel Extra enables the third party EPEL7 repository. As of 2024-06-30 the third-party EPEL7 repository is no longer being maintained. This third-party repository will have no future updates. This means there will be no security fixes for packages in the EPEL repository. See the EPEL section of the Amazon Linux 2023 User Guide for options for some EPEL packages. With AL2, you can use the Extras Library to install application and software updates on your instances. These software updates are known as topics. You can install a specific version of a topic or omit the version information to use the most recent version. Extras help alleviate having to compromise between the stability of an operating system and the freshness of available software. The contents of Extras topics are exempt from the Amazon Linux policy on long-term support and binary compatibility. Extras topics provide access to a curated list of packages. The versions of the packages might be updated frequently or might not be supported for the same amount of time as AL2. Note Individual Extras topics might be deprecated before AL2 reaches EOL. To list the available topics, use the following command. [ec2-user ~]$ amazon-linux-extras list To enable a topic and install the latest version of its package to ensure freshness, use the following command. [ec2-user ~]$ sudo amazon-linux-extras install topic To enable topics and install specific versions of their packages to ensure stability, use the following command. 168 Amazon Linux 2 User Guide [ec2-user ~]$ sudo amazon-linux-extras install topic=version topic=version To remove a package installed from a topic, use the following command. [ec2-user ~]$ sudo yum remove $(yum list installed | grep amzn2extra-topic | awk '{ print $1 }') Note This command does not remove packages that were installed as dependencies of the Extra. To disable a topic and make the packages inaccessible to the yum package manager, use the following command. [ec2-user ~]$ sudo amazon-linux-extras disable topic Important This command is intended for advanced users. Improper usage of this command could cause package compatibility conflicts. List of Amazon Linux 2 Extras Extra name BCC GraphicsMagick1.3 R3.4 R4 ansible2 aws-nitro-enclaves-cli Deprecated date 2023-09-30 List of Amazon Linux 2 Extras 169 Amazon Linux 2 Extra name awscli1 collectd collectd-python3 corretto8 dnsmasq dnsmasq2.85 docker ecs emacs epel firecracker firefox gimp golang1.11 golang1.19 golang1.9 haproxy2 httpd_modules java-openjdk11 kernel-5.10 Deprecated date User Guide 2025-06-30 2025-06-30 2018-11-14 2024-06-30 2022-11-08 2018-11-14 2023-08-01 2023-09-30 2018-12-14 2024-09-30 List of Amazon Linux 2 Extras 170 Amazon Linux 2 Extra name kernel-5.15 kernel-5.4 kernel-ng lamp-mariadb10.2-php7.2 Deprecated date 2022-08-08 2020-11-30 User Guide libreoffice livepatch lustre lustre2.10 lynis mariadb10.5 mate-desktop1.x memcached1.5 mock mock2 mono nano nginx1 nginx1.12 nginx1.22.1 php7.1 2025-06-24 2018-11-14 2019-09-20 2020-01-15 List of Amazon Linux 2 Extras 171 Amazon Linux 2 Extra name php7.2 php7.3 php7.4 php8.0 php8.1 php8.2 postgresql10 postgresql11 postgresql12 postgresql13 postgresql14 postgresql9.6 python3 python3.8 redis4.0 redis6 ruby2.4 ruby2.6 ruby3.0 rust1 Deprecated date User Guide 2020-11-30 2021-12-06 2022-11-03 2023-11-26 2025-12-31 2026-12-31 2023-09-30 2023-11-09 2024-11-14 2025-06-30 2025-06-30 2022-08-09 2018-08-22 2024-10-14 2021-05-25 2020-08-27 2023-03-31 2024-03-31 List of Amazon Linux 2 Extras 172 Amazon Linux 2 Extra name selinux-ng squid4 testing tomcat8.5 tomcat9 unbound1.13 unbound1.17 vim User Guide Deprecated date 2023-09-30 2024-03-31 2018-11-14 List of Amazon Linux 2 Extras 173 Amazon Linux 2 User Guide AL2 Reserved Users and Groups AL2 pre-allocates certain users and groups during both the provisioning of the image and during the installation of certain packages. The users, groups, and their associated UIDs and GIDs are listed here to prevent conflicts. Topics • List of Amazon Linux 2 Reserved Users • List of Amazon Linux 2 Reserved Groups List of Amazon Linux 2 Reserved Users Listed by UID User name root bin daemon adm lp sync shutdown halt mail uucp operator games UID 0 1 2 3 4 5 6 7 8 10 11 12 List of Amazon Linux 2 Reserved Users 174 User Guide Amazon Linux 2 User name ftp oprofile pkiuser squid named postgres mysql nscd nscd rpcuser rpc amandabackup ntp mailman gdm mailnull apache smmsp tomcat ldap UID 14 16 17 23 25 26 27 28 28 29 32 33 38 41 42 47 48 51 53 55 List of Amazon Linux 2 Reserved Users 175 User Guide Amazon Linux 2 User name tss nslcd pegasus avahi tcpdump sshd radvd cyrus arpwatch fax dbus postfix quagga radiusd radiusd
al2-ug-052
al2-ug.pdf
52
games UID 0 1 2 3 4 5 6 7 8 10 11 12 List of Amazon Linux 2 Reserved Users 174 User Guide Amazon Linux 2 User name ftp oprofile pkiuser squid named postgres mysql nscd nscd rpcuser rpc amandabackup ntp mailman gdm mailnull apache smmsp tomcat ldap UID 14 16 17 23 25 26 27 28 28 29 32 33 38 41 42 47 48 51 53 55 List of Amazon Linux 2 Reserved Users 175 User Guide Amazon Linux 2 User name tss nslcd pegasus avahi tcpdump sshd radvd cyrus arpwatch fax dbus postfix quagga radiusd radiusd hsqldb dovecot ident nobody qemu UID 59 65 66 70 72 74 75 76 77 78 81 89 92 95 95 96 97 98 99 107 List of Amazon Linux 2 Reserved Users 176 User Guide Amazon Linux 2 User name usbmuxd stap-server avahi-autoipd pulse rtkit dhcpd sanlock haproxy hacluster systemd-journal-gateway systemd-network systemd-resolve uuidd tang stapdev stapsys stapusr systemd-journal-upload systemd-journal-remote saned UID 113 155 170 171 172 177 179 188 189 191 192 193 357 358 359 360 361 362 363 364 List of Amazon Linux 2 Reserved Users 177 User Guide Amazon Linux 2 User name pesign pcpqa pcp memcached ipsilon ipaapi kdcproxy ods sssd gluster fedfs dovenull coroqnetd clevis clamscan clamilt clamupdate colord geoclue aws-kinesis-agent-user UID 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 List of Amazon Linux 2 Reserved Users 178 User Guide Amazon Linux 2 User name cwagent unbound polkitd saslauth dirsrv chrony ec2-instance-connect rngd libstoragemgmt ec2-user nfsnobody Listed by Name User name adm amandabackup apache arpwatch avahi avahi-autoipd UID 385 386 387 388 389 996 997 998 999 1000 65534 UID 3 33 48 77 70 170 List of Amazon Linux 2 Reserved Users 179 User Guide Amazon Linux 2 User name aws-kinesis-agent-user bin chrony clamilt clamscan clamupdate clevis colord coroqnetd cwagent cyrus daemon dbus dhcpd dirsrv dovecot dovenull ec2-instance-connect ec2-user fax UID 384 1 996 380 379 381 378 382 377 385 76 2 81 177 389 97 376 997 1000 78 List of Amazon Linux 2 Reserved Users 180 User Guide Amazon Linux 2 User name fedfs ftp games gdm geoclue gluster hacluster halt haproxy hsqldb ident ipaapi ipsilon kdcproxy ldap libstoragemgmt lp mail mailman mailnull UID 375 14 12 42 383 374 189 7 188 96 98 370 369 371 55 999 4 8 41 47 List of Amazon Linux 2 Reserved Users 181 User Guide Amazon Linux 2 User name memcached mysql named nfsnobody nobody nscd nscd nslcd ntp ods operator oprofile pcp pcpqa pegasus pesign pkiuser polkitd postfix postgres UID 368 27 25 65534 99 28 28 65 38 372 11 16 367 366 66 365 17 387 89 26 List of Amazon Linux 2 Reserved Users 182 User Guide Amazon Linux 2 User name pulse qemu quagga radiusd radiusd radvd rngd root rpc rpcuser rtkit saned sanlock saslauth shutdown smmsp squid sshd sssd stap-server UID 171 107 92 95 95 75 998 0 32 29 172 364 179 388 6 51 23 74 373 155 List of Amazon Linux 2 Reserved Users 183 User Guide Amazon Linux 2 User name stapdev stapsys stapusr sync systemd-journal-gateway systemd-journal-remote systemd-journal-upload systemd-network systemd-resolve tang tcpdump tomcat tss unbound usbmuxd uucp uuidd UID 359 360 361 5 191 363 362 192 193 358 72 53 59 386 113 10 357 List of Amazon Linux 2 Reserved Groups Listed by GID List of Amazon Linux 2 Reserved Groups 184 Amazon Linux 2 User Guide Group name GID root bin daemon sys adm tty disk disk lp mem kmem wheel cdrom mail uucp man oprofile pkiuser dialout floppy 0 1 2 3 4 5 6 6 7 8 9 10 11 12 14 15 16 17 18 19 List of Amazon Linux 2 Reserved Groups 185 User Guide Amazon Linux 2 Group name games slocate utmp squid named postgres mysql nscd nscd rpcuser rpc tape tape utempter kvm ntp video dip mailman gdm GID 20 21 22 23 25 26 27 28 28 29 32 33 33 35 36 38 39 40 41 42 List of Amazon Linux 2 Reserved Groups 186 User Guide Amazon Linux 2 Group name mailnull apache ftp smmsp tomcat lock ldap tss audio pegasus avahi tcpdump sshd radvd saslauth saslauth arpwatch fax dbus screen GID 47 48 50 51 53 54 55 59 63 65 70 72 74 75 76 76 77 78 81 84 List of Amazon Linux 2 Reserved Groups 187 User Guide Amazon Linux 2 Group name quaggavt wbpriv wbpriv postfix postdrop quagga radiusd radiusd hsqldb dovecot ident nobody users qemu usbmuxd stap-server stapusr stapusr stapsys stapdev GID 85 88 88 89 90 92 95 95 96 97 98 99 100 107 113 155 156 156
al2-ug-053
al2-ug.pdf
53
Amazon Linux 2 Group name mailnull apache ftp smmsp tomcat lock ldap tss audio pegasus avahi tcpdump sshd radvd saslauth saslauth arpwatch fax dbus screen GID 47 48 50 51 53 54 55 59 63 65 70 72 74 75 76 76 77 78 81 84 List of Amazon Linux 2 Reserved Groups 187 User Guide Amazon Linux 2 Group name quaggavt wbpriv wbpriv postfix postdrop quagga radiusd radiusd hsqldb dovecot ident nobody users qemu usbmuxd stap-server stapusr stapusr stapsys stapdev GID 85 88 88 89 90 92 95 95 96 97 98 99 100 107 113 155 156 156 157 158 List of Amazon Linux 2 Reserved Groups 188 User Guide Amazon Linux 2 Group name avahi-autoipd pulse rtkit dhcpd sanlock haproxy haclient systemd-journal systemd-journal systemd-journal-gateway systemd-network systemd-resolve usbmon wireshark uuidd tang systemd-journal-upload sfcb systemd-journal-remote saned GID 170 171 172 177 179 188 189 190 190 191 192 193 351 352 353 354 355 356 356 357 List of Amazon Linux 2 Reserved Groups 189 User Guide Amazon Linux 2 Group name pesign pcpqa pcp memcached virtlogin ipsilon pkcs11 ipaapi kdcproxy ods sssd libvirt gluster fedfs dovenull docker coroqnetd clevis clamscan clamilt GID 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 List of Amazon Linux 2 Reserved Groups 190 User Guide Amazon Linux 2 Group name virusgroup virusgroup virusgroup clamupdate colord geoclue printadmin aws-kinesis-agent-user cwagent pulse-rt pulse-access unbound polkitd dirsrv cgred chrony ec2-instance-connect rngd libstoragemgmt ssh_keys GID 378 378 378 379 380 381 382 383 384 385 386 387 388 389 993 994 995 996 997 998 List of Amazon Linux 2 Reserved Groups 191 User Guide Amazon Linux 2 Group name input ec2-user nfsnobody Listed by Name Group name adm apache arpwatch audio avahi avahi-autoipd aws-kinesis-agent-user bin cdrom cgred chrony clamilt clamscan clamupdate GID 999 1000 65534 GID 4 48 77 63 70 170 383 1 11 993 994 377 376 379 List of Amazon Linux 2 Reserved Groups 192 User Guide Amazon Linux 2 Group name clevis colord coroqnetd cwagent daemon dbus dhcpd dialout dip dirsrv disk disk docker dovecot dovenull ec2-instance-connect ec2-user fax fedfs floppy GID 375 380 374 384 2 81 177 18 40 389 6 6 373 97 372 995 1000 78 371 19 List of Amazon Linux 2 Reserved Groups 193 User Guide Amazon Linux 2 Group name ftp games gdm geoclue gluster haclient haproxy hsqldb ident input ipaapi ipsilon kdcproxy kmem kvm ldap libstoragemgmt libvirt lock lp GID 50 20 42 381 370 189 188 96 98 999 365 363 366 9 36 55 997 369 54 7 List of Amazon Linux 2 Reserved Groups 194 User Guide Amazon Linux 2 Group name mail mailman mailnull man mem memcached mysql named nfsnobody nobody nscd nscd ntp ods oprofile pcp pcpqa pegasus pesign pkcs11 GID 12 41 47 15 8 361 27 25 65534 99 28 28 38 367 16 360 359 65 358 364 List of Amazon Linux 2 Reserved Groups 195 User Guide Amazon Linux 2 Group name pkiuser polkitd postdrop postfix postgres printadmin pulse pulse-access pulse-rt qemu quagga quaggavt radiusd radiusd radvd rngd root rpc rpcuser rtkit GID 17 388 90 89 26 382 171 386 385 107 92 85 95 95 75 996 0 32 29 172 List of Amazon Linux 2 Reserved Groups 196 User Guide Amazon Linux 2 Group name saned sanlock saslauth saslauth screen sfcb slocate smmsp squid ssh_keys sshd sssd stap-server stapdev stapsys stapusr stapusr sys systemd-journal systemd-journal GID 357 179 76 76 84 356 21 51 23 998 74 368 155 158 157 156 156 3 190 190 List of Amazon Linux 2 Reserved Groups 197 User Guide Amazon Linux 2 Group name systemd-journal-gateway systemd-journal-remote systemd-journal-upload systemd-network systemd-resolve tang tape tape tcpdump tomcat tss tty unbound usbmon usbmuxd users utempter utmp uucp uuidd GID 191 356 355 192 193 354 33 33 72 53 59 5 387 351 113 100 35 22 14 353 List of Amazon Linux 2 Reserved Groups 198 User Guide Amazon Linux 2 Group name video virtlogin virusgroup virusgroup virusgroup wbpriv wbpriv wheel wireshark GID 39 362 378 378 378 88 88 10 352 List of Amazon Linux 2 Reserved Groups 199 Amazon Linux 2 User Guide AL2 Source Packages You can view the source of packages you have installed on your instance for reference purposes by using tools provided in Amazon Linux. Source packages are available for all of the packages included in Amazon Linux and the online package repository. Determine the package name for the source package you want to install and use the yumdownloader --source command to view source within your running instance. For example: [ec2-user ~]$ yumdownloader --source bash The source RPM can be unpacked and, for reference, you can view the source tree
al2-ug-054
al2-ug.pdf
54
2 Reserved Groups 199 Amazon Linux 2 User Guide AL2 Source Packages You can view the source of packages you have installed on your instance for reference purposes by using tools provided in Amazon Linux. Source packages are available for all of the packages included in Amazon Linux and the online package repository. Determine the package name for the source package you want to install and use the yumdownloader --source command to view source within your running instance. For example: [ec2-user ~]$ yumdownloader --source bash The source RPM can be unpacked and, for reference, you can view the source tree using standard RPM tools. After you finish debugging, the package is available for use. 200 Amazon Linux 2 User Guide Security and Compliance in AL2 Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and network architecture that is built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third- party auditors regularly test and verify the effectiveness of our security as part of the AWS Compliance Programs. To learn about the compliance programs that apply to AL2023, see AWS Services in Scope by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company's requirements, and applicable laws and regulations. Enable FIPS Mode on AL2 This section explains how to enable Federal Information Processing Standards (FIPS) on AL2. For more information about FIPS, see: • Federal Information Processing Standard (FIPS) • Compliance FAQs: Federal Information Processing Standards Prerequisites • An existing AL2 Amazon EC2 instance with access to the internet to download required packages. For more information about launching an AL2 Amazon EC2 instance, see AL2 on Amazon EC2. • You must connect to your Amazon EC2 instance using SSH or AWS Systems Manager. . Important ED25519 SSH user keys aren't supported in FIPS mode. If you launched your Amazon EC2 instance using an ED25519 SSH key pair, you must generate new keys using another Enable FIPS Mode on AL2 201 Amazon Linux 2 User Guide algorithm (such as RSA) or you may lose access to your instance after enabling FIPS mode. For more information see Create key pairs in the Amazon EC2 User Guide. Enable FIPS Mode 1. Connect to your AL2 instance using SSH or AWS Systems Manager. 2. 3. Ensure the system is up to date. For more information, see Package repository. Install and enable the dracut-fips module by running the following commmands. sudo yum -y install dracut-fips sudo dracut -f 4. Enable FIPS mode on the Linux kernel command-line using the following command. This will enable FIPS mode system-wide for the modules listed in the AL2 FAQ sudo /sbin/grubby --update-kernel=ALL --args="fips=1" 5. Reboot your AL2 instance. sudo reboot 6. To verify that FIPS mode is enabled, reconnect to your instance and run the following command. sysctl crypto.fips_enabled You should see the following output: crypto.fips_enabled = 1 You can also verify that OpenSSH is in FIPS mode by running the following command: ssh localhost 2>&1 | grep FIPS You should see the following output: FIPS mode initialized Enable FIPS Mode on AL2 202
al2023-ug-001
al2023-ug.pdf
1
User Guide Amazon Linux 2023 Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon Linux 2023 User Guide Amazon Linux 2023: User Guide Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon Linux 2023 Table of Contents User Guide What is Amazon Linux 2023? ......................................................................................................... 1 Release cadence ............................................................................................................................................ 1 Major and minor releases ...................................................................................................................... 2 Consuming new releases ....................................................................................................................... 2 Long-term support policy ..................................................................................................................... 2 Naming and versioning ............................................................................................................................... 3 Performance and operational optimizations .......................................................................................... 4 Relationship to Fedora ................................................................................................................................ 5 Customized cloud-init .................................................................................................................................. 6 Security updates and features ................................................................................................................... 7 Manage updates ...................................................................................................................................... 8 Security in the cloud .............................................................................................................................. 8 SELinux modes ......................................................................................................................................... 8 Compliance program .............................................................................................................................. 8 SSH server default .................................................................................................................................. 8 Major features of OpenSSL 3 ............................................................................................................... 8 Networking service ....................................................................................................................................... 9 Core toolchain packages glibc, gcc, binutils ......................................................................................... 10 Package management tool ...................................................................................................................... 10 Default SSH server configuration ........................................................................................................... 11 Deprecated Functionality .............................................................................................................. 13 compat- packages ..................................................................................................................................... 13 Deprecated functionality discontinued in AL1, removed in AL2 ...................................................... 13 32-bit x86 (i686) AMIs ......................................................................................................................... 14 aws-apitools-* replaced by AWS CLI ......................................................................................... 14 systemd replaces upstart in AL2 .................................................................................................. 15 Functionality deprecated in AL2 and removed in AL2023 ................................................................ 15 32-bit x86 (i686) Packages ................................................................................................................. 16 aws-apitools-* replaced by AWS CLI ......................................................................................... 16 amazon-cloudwatch-agent replaces awslogs ......................................................................... 17 bzr revision control system ............................................................................................................... 17 cgroup v1 ................................................................................................................................................ 17 log4j hotpatch (log4j-cve-2021-44228-hotpatch) .............................................................. 18 lsb_release and the system-lsb-core package ................................................................... 18 iii Amazon Linux 2023 User Guide mcrypt .................................................................................................................................................... 18 OpenJDK 7 (java-1.7.0-openjdk) .............................................................................................. 19 Python 2.7 .............................................................................................................................................. 19 rsyslog-openssl replaces rsyslog-gnutls ........................................................................... 19 Network Information Service (NIS) / yp .......................................................................................... 20 Multiple domain names in Amazon VPC create-dhcp-options ........................................... 20 Sun RPC in glibc ................................................................................................................................ 20 OpenSSH key fingerprint in audit log ........................................................................................... 21 ld.gold Linker ..................................................................................................................................... 21 ping6 ........................................................................................................................................................ 21 Deprecated in AL2023 .............................................................................................................................. 21 32bit x86 (i686) runtime support ..................................................................................................... 22 aspell .................................................................................................................................................... 22 Berkeley DB (libdb) ............................................................................................................................ 22 cron ......................................................................................................................................................... 23 IMDSv1 .................................................................................................................................................... 23 pcre version 1 ...................................................................................................................................... 23 System V init (sysvinit) .................................................................................................................. 24 EOL Packages are deprecated ............................................................................................................ 24 Comparing AL2 and AL2023 ......................................................................................................... 25 Added, upgraded, and removed packages ............................................................................................ 26 Support for each release .......................................................................................................................... 26 Naming and versioning changes ............................................................................................................. 26 Optimizations .............................................................................................................................................. 27 Sourced from multiple upstreams .......................................................................................................... 27 Networking system service ...................................................................................................................... 27 Package manager ....................................................................................................................................... 27 Using cloud-init .......................................................................................................................................... 27 Graphical desktop support ....................................................................................................................... 28 Compiler Triplet .......................................................................................................................................... 28 32bit x86 (i686) Packages ........................................................................................................................ 28 lsb_release and the system-lsb-core package ........................................................................ 29 EPEL .............................................................................................................................................................. 29 axel - HTTP/FTP client ...................................................................................................................... 31 brotli and libbrotli - compression .......................................................................................... 31 collectd - Statistics collection daemon ....................................................................................... 32 iv Amazon Linux 2023 User Guide cpulimit ............................................................................................................................................... 32 exim - mail transfer agent ................................................................................................................. 32 fuse3 - File System in Userspace (FUSE) v3 .................................................................................. 32 ganglia - Distributed Monitoring System ..................................................................................... 33 git-lfs - version control large files with Git ............................................................................... 33 haveged - an entropy source using the HAVEGE algorithm ....................................................... 33 inotify-tools - inotify command line tools ............................................................................. 33 iperf - TCP/UDP Performance benchmark ................................................................................... 34 jemalloc - alternative malloc implementation ......................................................................... 34 libbsd - BSD-compatible function library .................................................................................... 34 libserf - HTTP Client Library ......................................................................................................... 35 libzstd - zstd compression library ................................................................................................ 35 lighttpd web server ......................................................................................................................... 35 lshell - a restricted shell ................................................................................................................. 35 monit - process, file, directory, and devices monitor ................................................................... 35 nodejs .................................................................................................................................................... 36 perl-Config-General ..................................................................................................................... 36 python2-lockfile - file locking ................................................................................................... 37 python2-rsa - pure Python RSA .................................................................................................... 37 python2-simplejson - JSON routines for Python 2 ................................................................ 37 rkhunter - Rootkit Hunter ............................................................................................................... 38 rssh - a restricted shell for use with OpenSSH ............................................................................ 38 sscg - self-signed SSL certificate generator .................................................................................. 38 stress - Stress test ............................................................................................................................ 38 stress-ng - Stress test ..................................................................................................................... 39 tmpwatch - removes files based on last accessed time ............................................................... 39 xmlstarlet - command line XML utilities .................................................................................... 39 Python 2.7 has been replaced with Python 3 ...................................................................................... 39 Security updates ......................................................................................................................................... 40 SELinux .................................................................................................................................................... 40 OpenSSL 3 .............................................................................................................................................. 40 IMDSv2 .................................................................................................................................................... 41 Removal of log4j hotpatch (log4j-cve-2021-44228-hotpatch) ........................................ 41 Deterministic upgrades for stability ....................................................................................................... 42 gp3 as default Amazon EBS volume type ............................................................................................ 42 Unified Control Group hierarchy (cgroup v2) ....................................................................................... 42 v Amazon Linux 2023 User Guide systemd timers replace cron ................................................................................................................ 43 Improved toolchain: gcc, binutils, and glibc ......................................................................................... 43 systemd journal replaces rsyslog ...................................................................................................... 44 Minimized package dependencies .......................................................................................................... 44 Package changes for curl and
al2023-ug-002
al2023-ug.pdf
2
............................................................... 39 xmlstarlet - command line XML utilities .................................................................................... 39 Python 2.7 has been replaced with Python 3 ...................................................................................... 39 Security updates ......................................................................................................................................... 40 SELinux .................................................................................................................................................... 40 OpenSSL 3 .............................................................................................................................................. 40 IMDSv2 .................................................................................................................................................... 41 Removal of log4j hotpatch (log4j-cve-2021-44228-hotpatch) ........................................ 41 Deterministic upgrades for stability ....................................................................................................... 42 gp3 as default Amazon EBS volume type ............................................................................................ 42 Unified Control Group hierarchy (cgroup v2) ....................................................................................... 42 v Amazon Linux 2023 User Guide systemd timers replace cron ................................................................................................................ 43 Improved toolchain: gcc, binutils, and glibc ......................................................................................... 43 systemd journal replaces rsyslog ...................................................................................................... 44 Minimized package dependencies .......................................................................................................... 44 Package changes for curl and libcurl ....................................................................................... 45 GNU Privacy Guard (GNUPG) ............................................................................................................. 45 Amazon Corretto as the default JVM .................................................................................................... 45 AWS CLI v2 .................................................................................................................................................. 45 UEFI Preferred and Secure Boot ............................................................................................................. 46 SSH server default configuration changes ........................................................................................... 46 Kernel changes in AL2023 from AL2 ..................................................................................................... 46 IPv4 TTL .................................................................................................................................................. 46 Security focused kernel config changes ........................................................................................... 47 Other kernel configuration changes ................................................................................................. 51 Kernel Filesystem support .................................................................................................................. 52 /tmp changes .............................................................................................................................................. 58 AMI and Container Image changes ........................................................................................................ 58 Amazon Linux 2 and AL2023 AMI comparison .................................................................................... 58 Amazon Linux 2 and AL2023 Minimal AMI comparison .................................................................... 91 Amazon Linux 2 and AL2023 Container comparison ....................................................................... 112 Comparing AL1 and AL2023 ....................................................................................................... 121 Support for each release ........................................................................................................................ 121 systemd replaces upstart as init system .................................................................................... 122 Python 2.6 and 2.7 has been replaced with Python 3 ..................................................................... 122 OpenJDK 8 as oldest JDK ...................................................................................................................... 122 Kernel changes in AL2023 from AL1 ................................................................................................... 122 Kernel Live Patching .......................................................................................................................... 122 Kernel file system support ............................................................................................................... 122 Security focused kernel config changes ........................................................................................ 125 Other kernel configuration changes ............................................................................................... 127 AL1 and AL2023 AMI comparison ........................................................................................................ 128 AL1 and AL2023 Minimal AMI comparison ........................................................................................ 162 AL1 and AL2023 Container comparison ............................................................................................. 183 System Requirements .................................................................................................................. 192 CPU requirements for running AL2023 .............................................................................................. 192 ARM CPU Requirements for AL2023 .............................................................................................. 192 vi Amazon Linux 2023 User Guide x86-64 CPU Requirements for AL2023 .......................................................................................... 193 Memory (RAM) requirements for running AL2023 ........................................................................... 193 Graphical Desktop ....................................................................................................................... 195 Related topics ........................................................................................................................................... 195 Running applications ................................................................................................................... 196 Resource control with systemd ............................................................................................................. 196 Resource control with systemd-run for running one-off commands ................................... 196 Resource control in a systemd service ......................................................................................... 199 Using cgroups utilities ............................................................................................................................ 203 Using AL2023 on AWS ................................................................................................................ 206 Getting started with AWS ...................................................................................................................... 206 Sign up for an AWS account ............................................................................................................ 206 Create a user with administrative access ...................................................................................... 207 Granting programmatic access ........................................................................................................ 208 AL2023 on Amazon EC2 ........................................................................................................................ 210 Launching AL2023 using the Amazon EC2 console .................................................................... 210 Launching AL2023 using the SSM parameter and AWS CLI ...................................................... 211 Launching the latest AL2023 AMI using AWS CloudFormation ................................................ 213 Launching AL2023 using a specific AMI ID ................................................................................... 214 AL2023 AMI deprecation and life cycle ......................................................................................... 214 Connecting to AL2023 instances .................................................................................................... 215 Comparing AL2023 standard (default) and minimal AMIs ......................................................... 216 AL2023 in containers .............................................................................................................................. 243 AL2023 Base Container Image ........................................................................................................ 244 AL2023 Minimal container image ................................................................................................... 246 Building bare-bones AL2023 container images ........................................................................... 248 AL2023 container image package list comparison ...................................................................... 252 AL2023 Minimal AMI compared to container images ................................................................. 258 AL2023 on Elastic Beanstalk ................................................................................................................. 275 AL2023 CloudShell .................................................................................................................................. 276 AL2023 for Amazon ECS container hosts ........................................................................................... 276 Amazon ECS relevant changes since AL2 ...................................................................................... 277 Custom Amazon ECS-optimized AMI ............................................................................................. 278 Amazon EFS on AL2023 ......................................................................................................................... 278 amazon-efs-utils ......................................................................................................................... 278 Mounting Amazon EFS file system ................................................................................................. 279 vii Amazon Linux 2023 User Guide Amazon EMR on AL2023 ....................................................................................................................... 279 AL2023 based Amazon EMR releases ............................................................................................ 279 AL2023 based Amazon EMR on EKS .............................................................................................. 279 AL2023 on AWS Lambda ....................................................................................................................... 280 provided.al2023 Lambda runtime ........................................................................................... 280 AL2023 based runtimes ................................................................................................................... 280 Tutorials ....................................................................................................................................... 281 Install LAMP on AL2023 ......................................................................................................................... 281 Step 1: Prepare the LAMP server .................................................................................................... 282 Step 2: Test your LAMP server ........................................................................................................ 286 Step 3: Secure the database server ................................................................................................ 289 Step 4: (Optional) Install phpMyAdmin ......................................................................................... 290 Troubleshoot ........................................................................................................................................ 293 Related topics ...................................................................................................................................... 293 Configure SSL/TLS on AL2023 ............................................................................................................. 294 Prerequisites ........................................................................................................................................ 295 Step 1: Enable TLS on the server ................................................................................................... 296 Step 2: Obtain a CA-signed certificate .......................................................................................... 299 Step 3: Test and harden the security configuration .................................................................... 307 Troubleshoot ........................................................................................................................................ 310 Host a WordPress blog on AL2023 ...................................................................................................... 311 Prerequisites ........................................................................................................................................ 312 Install WordPress ................................................................................................................................ 313 Next steps ............................................................................................................................................ 323 Help! My public DNS name changed and now my blog is broken ............................................ 324 Redis 6 to Valkey Transition on AL2023 ............................................................................................. 325 Support timeline for Redis 6 ........................................................................................................... 325 Introduction to Valkey ....................................................................................................................... 326 Migration plan and timeline ............................................................................................................ 326 Migration options and steps ............................................................................................................ 326 Related topics ...................................................................................................................................... 329 Install GNOME on AL2023 ..................................................................................................................... 330 Prerequisites ........................................................................................................................................ 330 Installation ........................................................................................................................................... 330 Related topics ...................................................................................................................................... 331 Configure VNC on AL2023 ..................................................................................................................... 331 viii Amazon Linux 2023 User Guide Prerequisites ........................................................................................................................................ 331 Step 1:
al2023-ug-003
al2023-ug.pdf
3
blog on AL2023 ...................................................................................................... 311 Prerequisites ........................................................................................................................................ 312 Install WordPress ................................................................................................................................ 313 Next steps ............................................................................................................................................ 323 Help! My public DNS name changed and now my blog is broken ............................................ 324 Redis 6 to Valkey Transition on AL2023 ............................................................................................. 325 Support timeline for Redis 6 ........................................................................................................... 325 Introduction to Valkey ....................................................................................................................... 326 Migration plan and timeline ............................................................................................................ 326 Migration options and steps ............................................................................................................ 326 Related topics ...................................................................................................................................... 329 Install GNOME on AL2023 ..................................................................................................................... 330 Prerequisites ........................................................................................................................................ 330 Installation ........................................................................................................................................... 330 Related topics ...................................................................................................................................... 331 Configure VNC on AL2023 ..................................................................................................................... 331 viii Amazon Linux 2023 User Guide Prerequisites ........................................................................................................................................ 331 Step 1: Installation ............................................................................................................................. 332 Step 2: Configuration ........................................................................................................................ 332 Step 3: Connect using a VNC client ............................................................................................... 333 (Optional) Start service at boot ...................................................................................................... 334 (Optional) Disable the idle lockscreen ........................................................................................... 335 Related topics ...................................................................................................................................... 335 AL2023 outside Amazon EC2 ...................................................................................................... 336 Download AL2023 VM Images .............................................................................................................. 336 Supported Configurations ...................................................................................................................... 336 KVM Requirements ............................................................................................................................. 337 VMware Requirements ....................................................................................................................... 339 Hyper-V Requirements ...................................................................................................................... 341 AL2023 VM configuration ...................................................................................................................... 343 NoCloud seed.iso based configuration .................................................................................... 344 VMware guestinfo based configuration ......................................................................................... 347 AL2023 package list comparison for the standard AMI and KVM image ..................................... 350 AL2023 package list comparison for the standard AMI and VMware OVA image ....................... 375 AL2023 package list comparison for the standard AMI and Hyper-V image ............................... 400 Filesystem Layout ........................................................................................................................ 426 / ................................................................................................................................................................... 426 /boot ......................................................................................................................................................... 427 /boot/efi .......................................................................................................................................... 427 /etc ............................................................................................................................................................ 427 /home ......................................................................................................................................................... 427 /root ......................................................................................................................................................... 428 /srv ............................................................................................................................................................ 428 /tmp ............................................................................................................................................................ 429 /run ............................................................................................................................................................ 430 /usr ............................................................................................................................................................ 430 /usr/bin ............................................................................................................................................. 431 /usr/include ................................................................................................................................... 431 /usr/lib and /usr/lib64 ........................................................................................................... 431 /usr/local ........................................................................................................................................ 431 /usr/share ........................................................................................................................................ 431 /var ............................................................................................................................................................ 431 ix Amazon Linux 2023 User Guide /var/cache ........................................................................................................................................ 432 /var/lib ............................................................................................................................................. 432 /var/log ............................................................................................................................................. 432 /var/spool ........................................................................................................................................ 432 /var/tmp ............................................................................................................................................. 432 Updating AL2023 ......................................................................................................................... 434 Best practices for safely deploying updates ...................................................................................... 434 Preparing for Minor Updates ........................................................................................................... 437 Preparing for Major Updates ........................................................................................................... 437 Receive notifications on new updates ................................................................................................. 438 Deterministic upgrades through versioned repositories .................................................................. 439 Control the updates received from major and minor releases .................................................. 439 Differences between minor and major version upgrades ........................................................... 440 Knowing when updates are available ............................................................................................ 440 Control the package updates available from the AL2023 repositories ................................... 441 Instance replacement ......................................................................................................................... 441 In-place Deterministic upgrades ...................................................................................................... 442 Managing updates ................................................................................................................................... 449 Checking for available package updates ....................................................................................... 450 Applying security updates using DNF and repository versions ................................................. 455 Automatic service restart after (security) updates ...................................................................... 467 When is a reboot required to apply security updates? ............................................................... 469 Launching an instance with the latest repository version enabled .......................................... 469 Getting package support information ........................................................................................... 470 dnf check-release-update ..................................................................................................... 470 Adding, enabling, or disabling new repositories .......................................................................... 474 Adding repositories with cloud-init ................................................................................................ 477 Kernel Live Patching ................................................................................................................................ 478 Limitations ............................................................................................................................................ 479 Supported configurations and prerequisites ................................................................................ 479 Work with Kernel Live Patching ...................................................................................................... 480 Kernel Updates ......................................................................................................................................... 485 Linux kernel versions on AL2023 .................................................................................................... 485 Updating AL2023 to kernel 6.12 .................................................................................................... 485 AL2023 kernels - Frequently Asked Questions ............................................................................ 487 Programming languages and runtimes ...................................................................................... 489 x Amazon Linux 2023 User Guide C/C++ and Fortran ................................................................................................................................... 489 Go ................................................................................................................................................................ 490 AL2023 Lambda function: Go ........................................................................................................ 491 Java ............................................................................................................................................................. 491 NodeJS .......................................................................................................................................................... 36 Perl .............................................................................................................................................................. 492 Perl modules ........................................................................................................................................ 493 PHP ............................................................................................................................................................. 493 Migrating to new PHP versions ....................................................................................................... 493 Migrating from PHP 7.x .................................................................................................................... 494 PHP modules ....................................................................................................................................... 494 Python ........................................................................................................................................................ 494 Python modules .................................................................................................................................. 495 Rust ............................................................................................................................................................. 495 AL2023 Lambda function: Rust ..................................................................................................... 496 AL2023 Reserved Users and Groups ........................................................................................... 497 List of AL2023 Reserved Users ............................................................................................................. 497 List of AL2023 Reserved Groups .......................................................................................................... 505 Codecs available in AL2023 ........................................................................................................ 518 Security and Compliance ............................................................................................................ 520 Security advisories ................................................................................................................................... 521 ALAS Announcements ....................................................................................................................... 521 ALAS FAQs ............................................................................................................................................ 521 ALAS Advisories .................................................................................................................................. 522 Advisories and RPM repositories ..................................................................................................... 522 Advisory IDs ......................................................................................................................................... 522 Advisory Creation and Update timestamps .................................................................................. 523 Advisory Types .................................................................................................................................... 524 Advisory Severities ............................................................................................................................. 524 Advisories and Packages ................................................................................................................... 524 Advisories and CVEs ........................................................................................................................... 525 Advisory Text ....................................................................................................................................... 526 Kernel Live Patch Advisories ............................................................................................................ 526 updateinfo.xml schema ............................................................................................................... 527 Listing applicable Advisories ................................................................................................................. 528 In-place updates ....................................................................................................................................... 531 xi Amazon Linux 2023 User Guide Applying updates mentioned in an Advisory ............................................................................... 532 Setting SELinux modes for AL2023 ..................................................................................................... 535 Default SELinux status and modes for AL2023 ........................................................................... 536 Change to enforcing mode .......................................................................................................... 537 Option to disable SELinux ................................................................................................................ 538 Enable FIPS Mode on AL2023 .............................................................................................................. 539 Enable FIPS Mode in an AL2023 Container ....................................................................................... 541 Swap OpenSSL FIPS providers on AL2023 ......................................................................................... 543 Kernel Hardening ..................................................................................................................................... 545 Kernel Hardening options (architecture independent) ............................................................... 545 x86-64 specific Kernel Hardening options .................................................................................... 561 aarch64 specific Kernel Hardening options .................................................................................. 564 UEFI Secure Boot on AL2023 ................................................................................................................ 566 Enable UEFI Secure Boot on AL2023 ............................................................................................. 567 Enrollment of an existing instance ................................................................................................. 567 Register image from snapshot
al2023-ug-004
al2023-ug.pdf
4
for AL2023 ..................................................................................................... 535 Default SELinux status and modes for AL2023 ........................................................................... 536 Change to enforcing mode .......................................................................................................... 537 Option to disable SELinux ................................................................................................................ 538 Enable FIPS Mode on AL2023 .............................................................................................................. 539 Enable FIPS Mode in an AL2023 Container ....................................................................................... 541 Swap OpenSSL FIPS providers on AL2023 ......................................................................................... 543 Kernel Hardening ..................................................................................................................................... 545 Kernel Hardening options (architecture independent) ............................................................... 545 x86-64 specific Kernel Hardening options .................................................................................... 561 aarch64 specific Kernel Hardening options .................................................................................. 564 UEFI Secure Boot on AL2023 ................................................................................................................ 566 Enable UEFI Secure Boot on AL2023 ............................................................................................. 567 Enrollment of an existing instance ................................................................................................. 567 Register image from snapshot ........................................................................................................ 568 Revocation updates ............................................................................................................................ 569 How UEFI Secure Boot works on AL2023 ..................................................................................... 569 Enrolling your own keys ................................................................................................................... 570 xii Amazon Linux 2023 User Guide What is Amazon Linux 2023? Amazon Linux 2023 (AL2023) is the next generation of Amazon Linux from Amazon Web Services (AWS). With AL2023, you can develop and run cloud and enterprise applications in a secure, stable, and high-performance runtime environment. Also you get an application environment that offers long-term support with access to the latest innovations in Linux. AL2023 is provided at no additional charge. AL2023 is the successor to Amazon Linux 2 (AL2). For information about the differences between AL2023 and AL2, see Comparing AL2 and AL2023 and Package changes in AL2023. Topics • Release cadence • Naming and versioning • Performance and operational optimizations • Relationship to Fedora • Customized cloud-init • Security updates and features • Networking service • Core toolchain packages glibc, gcc, binutils • Package management tool • Default SSH server configuration Release cadence Amazon Linux 2023 (AL2023) was released in March 2023 and will be supported until June 30, 2029. There are two phases of support: • Standard support – During this phase, the release receives quarterly minor version updates. The standard support phase ends June 30, 2027. • Maintenance – During this phase, the release receives only security updates and critical bug fixes. These updates are published as soon as they're available. The maintenance phase ends June 30, 2029. Release cadence 1 Amazon Linux 2023 User Guide Major and minor releases With every Amazon Linux release (major version, minor version, or a security release), we release a new Linux Amazon Machine Image (AMI). • Major version release— Includes new features and improvements in security and performance across the stack. The improvements might include major changes to the kernel, toolchain, Glib C, OpenSSL, and any other system libraries and utilities. Major releases of Amazon Linux are based in part on the current version of the upstream Fedora Linux distribution. AWS might add or replace specific packages from other non-Fedora upstreams. • Minor version release— A quarterly update that includes security updates, bug fixes, and new features and packages. Each minor version is a cumulative list of updates that includes security and bug fixes in addition to new features and packages. These releases might include latest language runtimes, such as PHP. They might also include other popular software packages such as Ansible and Docker. Consuming new releases Updates are provided through a combination of new Amazon Machine Image (AMI) releases and corresponding new repositories. By default, a new AMI and the repository that it points to are coupled. However, you can point your running Amazon EC2 instances to newer repository versions over time to apply updates on the running instances. You can also update by launching new instances of the latest AMIs. Long-term support policy Amazon Linux provides updates for all of your packages and maintains compatibility within a major version for your applications that are built on Amazon Linux. Core packages such as the glibc library, OpenSSL, OpenSSH, and the DNF package manager receive support for the lifetime of the major AL2023 release. Packages that aren't part of the core packages are supported based on their specific upstream sources. You can see the specific support status and dates of individual packages by running the following command. $ sudo dnf supportinfo --pkg packagename You can get information on all currently installed packages by running the following command. Major and minor releases 2 Amazon Linux 2023 User Guide $ sudo dnf supportinfo --show installed The full list of core packages is finalized during the preview. If you want to see more packages included as core packages, tell us. We evaluate as we are collecting feedback. Feedback on AL2023 can be provided through your designated AWS representative or by filing an issue in the amazon- linux-2023 repo on GitHub. Naming and versioning AL2023 provides a minor release every three months during the two years of standard support. Each release is identified by an increment from 0 to N. 0 refers to the original major release for that iteration. All releases will be called Amazon Linux 2023. When the next version
al2023-ug-005
al2023-ug.pdf
5
packages is finalized during the preview. If you want to see more packages included as core packages, tell us. We evaluate as we are collecting feedback. Feedback on AL2023 can be provided through your designated AWS representative or by filing an issue in the amazon- linux-2023 repo on GitHub. Naming and versioning AL2023 provides a minor release every three months during the two years of standard support. Each release is identified by an increment from 0 to N. 0 refers to the original major release for that iteration. All releases will be called Amazon Linux 2023. When the next version of Amazon Linux is released, AL2023 will enter extended support and receive updates for security updates and critical bug fixes. For example, minor releases of AL2023 have the following format: • 2023.0.20230301 • 2023.1.20230601 • 2023.2.20230901 The corresponding AL2023 AMIs have the following format: • al2023-ami-2023.0.20230301.0-kernel-6.1-x86_64 • al2023-ami-2023.1.20230601.0-kernel-6.1-x86_64 • al2023-ami-2023.2.20230901.0-kernel-6.1-x86_64 Within a specific minor version, regular AMI releases occur with a timestamp of the date of the AMI release. • al2023-ami-2023.0.20230301.0-kernel-6.1-x86_64 • al2023-ami-2023.0.20230410.0-kernel-6.1-x86_64 • al2023-ami-2023.0.20230520.0-kernel-6.1-x86_64 Naming and versioning 3 Amazon Linux 2023 User Guide The recommended method for identifying an AL2 or AL2023 instance starts with reading the Common Platform Enumeration (CPE) string from /etc/system-release-cpe. Then, split the string into its fields. Finally, read the platform and version values. AL2023 also introduces new files for platform identification: • /etc/amazon-linux-release symlinks to /etc/system-release • /etc/amazon-linux-release-cpe symlinks to /etc/system-release-cpe These two files indicate that an instance is Amazon Linux. There's no need to read a file or split the string into fields, unless you want to know the specific platform and version values. Performance and operational optimizations Amazon Linux 6.1 kernel • AL2023 uses the latest drivers for Elastic Network Adapter (ENA) and Elastic Fabric Adapter (EFA) devices. AL2023 focuses on performance and functionality backports for hardware in Amazon EC2 infrastructure. • Kernel live patching is available for the x86_64 and aarch64 instance types. This reduces the need for frequent reboots. • All kernel build and runtime configurations include many of the same performance and operational optimizations of AL2. Base toolchain selection and default build flags • AL2023 packages are built with compiler optimizations (-O2) enabled by default • AL2023 packages are built requiring x86-64v2 for x86-64 systems (-march=x86-64-v2), and Graviton 2 or higher for aarch64 (-march=armv8.2-a+crypto -mtune=neoverse-n1). • AL2023 packages are built with auto-vectorization enabled (-ftree-vectorize). • AL2023 packages are built with Link Time Optimization (LTO) enabled. • AL2023 uses the updated versions of Rust, Clang/LLVM, and Go. Performance and operational optimizations 4 Amazon Linux 2023 Package selection and versions User Guide • Select backports to major system components include several performance improvements for running on Amazon EC2 infrastructure, especially Graviton instances. • AL2023 is integrated with several AWS services and features. This includes the AWS CLI, SSM Agent, Amazon Kinesis Agent, and CloudFormation. • AL2023 uses Amazon Corretto as the Java Development Kit (JDK). • AL2023 provides database engines and programming language runtime updates to newer versions as they're released by upstream projects. Programming language runtimes with new versions are added when they're released. Deployment in a cloud environment • The base AL2023 AMI and container images are frequently updated to support patching instance replacement. • Kernel updates are included in AL2023 AMI updates. This means that you don't need to use commands such as yum update and reboot to update your kernel. • In addition to the standard AL2023 AMI, a minimal AMI and container image is also available. Choose the minimal AMI to run an environment with the minimal number of packages that's required to run your service. • By default, AL2023 AMIs and containers are locked to a specific version of the package repositories. There's no auto-update when they're launched. This means that you're always in control of when you ingest any package update. You can always test in a beta/gamma environment before rolling out to production. If there's a problem, you can use the pre-validated rollback path. Relationship to Fedora AL2023 maintains its own release and support lifecycles independent of Fedora. AL2023 provides updated versions of open-source software, a larger variety of packages, and frequent releases. This preserves the familiar RPM-based operating systems. The Generally Available (GA) version of AL2023 isn't directly comparable to any specific Fedora release. The AL2023 GA version includes components from Fedora 34, 35, and 36. Some of the components are the same as the components in Fedora and some are modified. Other components Relationship to Fedora 5 Amazon Linux 2023 User Guide more closely resemble the components in CentOS Stream 9 or were developed independently. The Amazon Linux kernel is sourced from the long-term support options that are on kernel.org, chosen independently from Fedora. Customized cloud-init The cloud-init package is an open-source application that bootstraps Linux images in a cloud computing
al2023-ug-006
al2023-ug.pdf
6
(GA) version of AL2023 isn't directly comparable to any specific Fedora release. The AL2023 GA version includes components from Fedora 34, 35, and 36. Some of the components are the same as the components in Fedora and some are modified. Other components Relationship to Fedora 5 Amazon Linux 2023 User Guide more closely resemble the components in CentOS Stream 9 or were developed independently. The Amazon Linux kernel is sourced from the long-term support options that are on kernel.org, chosen independently from Fedora. Customized cloud-init The cloud-init package is an open-source application that bootstraps Linux images in a cloud computing environment. For more information, see cloud-init Documentation. AL2023 contains a customized version of cloud-init. With cloud-init, you can specify what occurs to your instance at boot time. When you launch an instance, you can use the user-data fields to pass actions to cloud-init. This means that you can use common Amazon Machine Images (AMIs) for many use cases and configure them dynamically when you start an instance. AL2023 also uses cloud-init to configure the ec2- user account. AL2023 uses the cloud-init actions in /etc/cloud/cloud.cfg.d and /etc/cloud/cloud.cfg. You can create your own cloud-init action files in the /etc/cloud/cloud.cfg.d directory. Cloud-init reads all the files in this directory in lexicographical order. Later files overwrite values in earlier files. When cloud-init launches an instance, the cloud-init package does the following configuration tasks: • Sets the default locale • Sets the hostname • Parses and handles user-data • Generates host private SSH keys • Adds a user's public SSH keys to .ssh/authorized_keys for easy login and administration • Prepares the repositories for package management • Handles package actions that are defined in user-data • Runs user scripts that are in user-data • Mounts instance store volumes, if applicable • By default, if the ephemeral0 instance store volume is present and contains a valid file system, the instance store volume is mounted at /media/ephemeral0. Otherwise, it's not mounted. Customized cloud-init 6 Amazon Linux 2023 User Guide • By default, for the m1.small and c1.medium instance types, all swap volumes that are associated with the instance are mounted. • You can override the default instance store volume mount with the following cloud-init directive: #cloud-config mounts: - [ ephemeral0 ] For more control over mounts, see Mounts in the cloud-init documentation. • When an instance launches, instance store volumes that support TRIM aren't formatted. Before you can mount instance store volumes, you must partition and format instance store volumes. For more information, see Instance store volume TRIM support in the Amazon EC2 User Guide. • When you launch your instances, you can use the disk_setup module to partition and format your instance store volumes. For more information, see Disk Setup in the cloud-init documentation. For information about using cloud-init with SELinux, see Use cloud-init to enable enforcing mode. For information about cloud-init user-data formats, see User-Data Formats in the cloud-init documentation. Security updates and features AL2023 provides many security updates and solutions. Topics • Manage updates • Security in the cloud • SELinux modes • Compliance program • SSH server default • Major features of OpenSSL 3 Security updates and features 7 Amazon Linux 2023 Manage updates User Guide Apply security updates using DNF and repository versions. For more information, see Manage package and operating system updates in AL2023. Security in the cloud Security is a shared responsibility between AWS and you. The shared responsibility model describes this as security of the cloud and security in the cloud. For more information, see Security and Compliance in Amazon Linux 2023. SELinux modes By default, SELinux is enabled and set to permissive mode in AL2023. In permissive mode, permission denials are logged but not enforced. The SELinux policies define permissions for users, processes, programs, files, and devices. With SELinux, you can choose one of two policies. The policies are targeted or multi-level security (MLS). For more information about SELinux modes and policy, see Setting SELinux modes for AL2023 and the SELinux Project Wiki. Compliance program Independent auditors assess the security and compliance of AL2023 along with many AWS compliance programs. SSH server default AL2023 includes OpenSSH 8.7. OpenSSH 8.7 by default disables the ssh-rsa key exchange algorithm. For more information, see Default SSH server configuration. Major features of OpenSSL 3 • The Certificate Management Protocol (CMP, RFC 4210) includes both CRMF (RFC 4211) and HTTP transfer (RFC 6712). • A HTTP or HTTPS client in libcrypto supports GET and POST actions, redirection, plain and ASN.1-encoded content, proxies, and timeouts. Manage updates 8 Amazon Linux 2023 User Guide • The EVP_KDF works with Key Derivation Functions. • The EVP_MAC API works with MACs. • Linux Kernel TLS support. For more information, see the OpenSSL migration guide. Networking service The open-source project systemd-networkd is widely available in modern Linux distributions. The
al2023-ug-007
al2023-ug.pdf
7
information, see Default SSH server configuration. Major features of OpenSSL 3 • The Certificate Management Protocol (CMP, RFC 4210) includes both CRMF (RFC 4211) and HTTP transfer (RFC 6712). • A HTTP or HTTPS client in libcrypto supports GET and POST actions, redirection, plain and ASN.1-encoded content, proxies, and timeouts. Manage updates 8 Amazon Linux 2023 User Guide • The EVP_KDF works with Key Derivation Functions. • The EVP_MAC API works with MACs. • Linux Kernel TLS support. For more information, see the OpenSSL migration guide. Networking service The open-source project systemd-networkd is widely available in modern Linux distributions. The project uses a declarative configuration language that's similar to the rest of the systemd framework. Its primary configuration file types are .network and .link files. The amazon-ec2-net-utils package generates interface-specific configurations in the / run/systemd/network directory. These configurations enable both IPv4 and IPv6 networking on interfaces when they're attached to an instance. These configurations also install policy routing rules that help ensure that locally sourced traffic is routed to the network through the corresponding instance's network interface. These rules ensure that the right traffic is routed through the Elastic Network Interface (ENI) from the associated addresses or prefixes. For more information about using ENI, see Using ENI in the Amazon EC2 User Guide. You can customize this networking behavior by placing a custom configuration file in the /etc/ systemd/network directory to override the default configuration settings contained in /run/ systemd/network. The systemd.network documentation describes how the systemd-networkd service determines the configuration that applies to a specific interface. It also generates alternative names, known as altnames, for the ENI-backed interfaces to reflect the properties of various AWS resources. These ENI-backed interface properties are the ENI ID and the DeviceIndex field of the ENI attachment. You can refer to these interfaces using their properties when using various tools, such as the ip command. AL2023 instance interface names are generated using the systemd slot naming scheme. For more information, see systemd.net naming scheme. Additionally, AL2023 uses the fq_codel active queue management network transmission scheduling algorithm by default. For more information, see CoDel overview. Networking service 9 Amazon Linux 2023 User Guide Core toolchain packages glibc, gcc, binutils A subset of packages in Amazon Linux is designated as core toolchain packages. As a major part of AL2023, core packages receive five years of support. We might change the version of a package, but long-term support applies to the package included in the Amazon Linux release. These three core packages provide a system toolchain that's used to build most software in the Amazon Linux distribution. Package glibc 2.34 gcc 11.2 binutils 2.35 Definition Purpose System C library Used by most binary programs that provide standard functions and by the interface between programs and the kernel. gcc compiler suite Compiles C, C++, Fortran. Assembler and linker plus other binary tools Manipulates or inspects binary programs. We recommend that updates to any glibc libraries are followed by a reboot. For updates to packages that control services, it might be sufficient to restart the services to pick up the updates. However, a system reboot ensures that all previous package and library updates are complete. Package management tool The default software package management tool in AL2023 is DNF. DNF is the successor to YUM, the package management tool in AL2. DNF is similar to YUM in its usage. Many DNF commands and command options are the same as YUM commands. In a Command Line Interface (CLI) command, in most cases dnf replaces yum. For example, for the following AL2 yum commands: $ sudo yum install packagename $ sudo yum search packagename Core toolchain packages glibc, gcc, binutils 10 Amazon Linux 2023 $ sudo yum remove packagename In AL2023, they become the following commands: $ sudo dnf install packagename $ sudo dnf search packagename $ sudo dnf remove packagename User Guide In AL2023 the yum command is still available, but as a pointer to the dnf command. So, when the yum command is used in the shell or in a script, all commands and options are the same as the DNF CLI. For more information about the differences between the YUM CLI and the DNF CLI, see Changes in DNF CLI compared to YUM. For a complete reference of commands and options for the dnf command, refer to the man page man dnf. For more information, see DNF Command Reference. Default SSH server configuration If you have SSH clients from several years ago, you might see an error when you connect to an instance. If the error tells you there's no matching host key type found, update your SSH host key to troubleshoot this issue. Default disabling of ssh-rsa signatures AL2023 includes a default configuration that disables the legacy ssh-rsa host key algorithm and generates a reduced set of host
al2023-ug-008
al2023-ug.pdf
8
CLI compared to YUM. For a complete reference of commands and options for the dnf command, refer to the man page man dnf. For more information, see DNF Command Reference. Default SSH server configuration If you have SSH clients from several years ago, you might see an error when you connect to an instance. If the error tells you there's no matching host key type found, update your SSH host key to troubleshoot this issue. Default disabling of ssh-rsa signatures AL2023 includes a default configuration that disables the legacy ssh-rsa host key algorithm and generates a reduced set of host keys. Clients must support the ssh-ed25519 or the ecdsa-sha2- nistp256 host key algorithm. The default configuration accepts any of these key exchange algorithms: • curve25519-sha256 • curve25519-sha256@libssh.org • ecdh-sha2-nistp256 • ecdh-sha2-nistp384 • ecdh-sha2-nistp521 • diffie-hellman-group-exchange-sha256 • diffie-hellman-group14-sha256 Default SSH server configuration 11 Amazon Linux 2023 User Guide • diffie-hellman-group16-sha512 • diffie-hellman-group18-sha512 By default, AL2023 generates ed25519 and ECDSA host keys. Clients support either the ssh- ed25519 or the ecdsa-sha2-nistp256 host key algorithm. When you connect by SSH to an instance, you must use a client that supports a compatible algorithm, such as ssh-ed25519 or ecdsa-sha2-nistp256. If you need to use other key types, override the list of generated keys with a cloud-config fragment in user-data. In the following example, cloud-config generates a rsa host key with the ecdsa and ed25519 keys. #cloud-config ssh_genkeytypes: - ed25519 - ecdsa - rsa If you use an RSA key pair for public key authentication, your SSH client must support a rsa- sha2-256 or rsa-sha2-512 signature. If you're using an incompatible client and can't upgrade, re-enable ssh-rsa support on your instance. To re-enable ssh-rsa support, activate the LEGACY system crypto policy using the following commands. $ sudo dnf install crypto-policies-scripts $ sudo update-crypto-policies --set LEGACY For more information about managing host keys, see Amazon Linux Host keys. Default SSH server configuration 12 Amazon Linux 2023 User Guide Deprecated Functionality in AL2023 Functionality deprecated in AL2 and not present in AL2023 is documented here. This is functionality such as features and packages that are present in AL2, but not in AL2023 and will not be added to AL2023. For more information about how the long the functionality is supported in AL2, see Deprecated functionality in AL2. There is also functionality in AL2023 which is deprecated, and will be removed in a future release. This chapter describes what that functionality is, when it no longer supported, and when it will be removed from Amazon Linux. Understanding the deprecated functionality will help you deploy AL2023 as well as prepare for the next major version of Amazon Linux. Topics • compat- packages • Deprecated functionality discontinued in AL1, removed in AL2 • Functionality deprecated in AL2 and removed in AL2023 • Deprecated in AL2023 compat- packages Any packages in AL2 with the prefix of compat- are provided for binary compatibility with older binaries that have not yet been rebuilt for modern versions of the package. Each new major version of Amazon Linux will not carry forward any compat- package from prior releases. All compat- packages in a release of Amazon Linux (e.g. AL2) are deprecated, and not present in the subsequent version (e.g. AL2023). We strongly recommend that software is rebuilt against updated versions of the libraries. Deprecated functionality discontinued in AL1, removed in AL2 This section describes functionality that is available in AL1, and is no longer available in AL2. compat- packages 13 Amazon Linux 2023 Note User Guide As part of the maintenance support phase of AL1, some packages had an end-of-life (EOL) date earlier than the EOL of AL1. For more information, see AL1 Package support statements. Note Some AL1 functionality was discontinued in earlier releases. For information, see the AL1 Release Notes. Topics • 32-bit x86 (i686) AMIs • aws-apitools-* replaced by AWS CLI • systemd replaces upstart in AL2 32-bit x86 (i686) AMIs As part of the 2014.09 release of AL1, Amazon Linux announced that it would be the last release to produce 32-bit AMIs. Therefore, starting from the 2015.03 release of AL1, Amazon Linux no longer supports running the system in 32-bit mode. AL2 offers limited runtime support for 32-bit binaries on x86-64 hosts and does not provide development packages to enable the building of new 32- bit binaries. AL2023 no longer includes any 32-bit user space packages. We recommend that users complete their transition to 64-bit code before migrating to AL2023. If you need to run 32-bit binaries on AL2023, it is possible to use the 32-bit userspace from AL2 inside an AL2 container running on top of AL2023. aws-apitools-* replaced by AWS CLI Before the release of the AWS CLI in September 2013, AWS made a set of command line utilities available, implemented in Java, which allowed users to make Amazon
al2023-ug-009
al2023-ug.pdf
9
hosts and does not provide development packages to enable the building of new 32- bit binaries. AL2023 no longer includes any 32-bit user space packages. We recommend that users complete their transition to 64-bit code before migrating to AL2023. If you need to run 32-bit binaries on AL2023, it is possible to use the 32-bit userspace from AL2 inside an AL2 container running on top of AL2023. aws-apitools-* replaced by AWS CLI Before the release of the AWS CLI in September 2013, AWS made a set of command line utilities available, implemented in Java, which allowed users to make Amazon EC2 API calls. These tools were discontinued in 2015, with the AWS CLI becoming the preferred way to interact with Amazon EC2 APIs from the command line. The set of command line utilities includes the following aws- apitools-* packages. 32-bit x86 (i686) AMIs 14 Amazon Linux 2023 • aws-apitools-as • aws-apitools-cfn • aws-apitools-common • aws-apitools-ec2 • aws-apitools-elb • aws-apitools-mon User Guide Upstream support for the aws-apitools-* packages ended in March of 2017. Despite the lack of upstream support, Amazon Linux continued to ship some of these command line utilities, such as aws-apitools-ec2, to provide backward compatibility for users. The AWS CLI is a more robust and complete tool than the aws-apitools-* packages as it is actively maintained and provides a means of using all AWS APIs. The aws-apitools-* packages were deprecated in March 2017 and will not be receiving further updates. All users of any of these packages should migrate to the AWS CLI as soon as possible. These packages are not present in AL2023. AL1 also provided the aws-apitools-iam and aws-apitools-rds packages, which were deprecated in AL1, and are not present in Amazon Linux from AL2 onward. systemd replaces upstart in AL2 AL2 was the first Amazon Linux release to use the systemd init system, replacing upstart in AL1. Any upstart specific configuration must be changed as part of the migration from AL1 to a newer version of Amazon Linux. It is not possible to use systemd on AL1, so moving from upstart to systemd can only be done as part of moving to a more recent major version of Amazon Linux such as AL2 or AL2023. Functionality deprecated in AL2 and removed in AL2023 This section describes functionality that is available in AL2, and no longer available in AL2023. Topics • 32-bit x86 (i686) Packages • aws-apitools-* replaced by AWS CLI systemd replaces upstart in AL2 15 Amazon Linux 2023 User Guide • awslogs deprecated in favor of unified Amazon CloudWatch Logs agent • bzr revision control system • cgroup v1 • log4j hotpatch (log4j-cve-2021-44228-hotpatch) • lsb_release and the system-lsb-core package • mcrypt • OpenJDK 7 (java-1.7.0-openjdk) • Python 2.7 • rsyslog-openssl replaces rsyslog-gnutls • Network Information Service (NIS) / yp • Multiple domain names in Amazon VPC create-dhcp-options • Sun RPC in glibc • OpenSSH key fingerprint in audit log • ld.gold Linker • ping6 32-bit x86 (i686) Packages As part of the 2014.09 release of AL1, we announced that it would be the last release to produce 32-bit AMIs. Therefore, starting from the 2015.03 release of AL1, Amazon Linux no longer supports running the system in 32-bit mode. AL2 provides limited runtime support for 32-bit binaries on x86-64 hosts and doesn't provide development packages to enable the building of new 32-bit binaries. AL2023 no longer includes any 32-bit userspace packages. We recommend customers complete their transition to 64-bit code. If you need to run 32-bit binaries on AL2023, it is possible to use the 32-bit userspace from AL2 inside an AL2 container running on top of AL2023. aws-apitools-* replaced by AWS CLI Prior to release of the AWS CLI in September 2013, AWS made a set of command line utilities available, implemented in Java, which allowed customers to make Amazon EC2 API calls. These tools were deprecated in 2015, with the AWS CLI becoming the preferred way to interact with Amazon EC2 APIs from the command line. This includes the following aws-apitools-* packages. 32-bit x86 (i686) Packages 16 Amazon Linux 2023 • aws-apitools-as • aws-apitools-cfn • aws-apitools-common • aws-apitools-ec2 • aws-apitools-elb • aws-apitools-mon User Guide Upstream support for the aws-apitools-* packages ended in March of 2017. Despite the lack of upstream support, Amazon Linux continued to ship some of these command line utilities (such as aws-apitools-ec2) in order to provide backwards compatibility for customers. The AWS CLI is a more robust and complete tool than the aws-apitools-* packages as it is actively maintained and provides a means of using all AWS APIs. The aws-apitools-* packages were deprecated in March 2017 and will not be receiving further updates. All users of any of these packages should migrate to the AWS CLI as soon as possible. These packages are not present in AL2023. awslogs deprecated in favor of
al2023-ug-010
al2023-ug.pdf
10
Despite the lack of upstream support, Amazon Linux continued to ship some of these command line utilities (such as aws-apitools-ec2) in order to provide backwards compatibility for customers. The AWS CLI is a more robust and complete tool than the aws-apitools-* packages as it is actively maintained and provides a means of using all AWS APIs. The aws-apitools-* packages were deprecated in March 2017 and will not be receiving further updates. All users of any of these packages should migrate to the AWS CLI as soon as possible. These packages are not present in AL2023. awslogs deprecated in favor of unified Amazon CloudWatch Logs agent The awslogs package is deprecated in AL2 and is no longer present in AL2023. It is replaced by the unified CloudWatch Logs agent, available in the amazon-cloudwatch-agent package. For more information, see the Amazon CloudWatch Logs User Guide. bzr revision control system The GNU Bazaar (bzr) revision control system is discontinued in AL2 and no longer present in AL2023. Users of bzr are advised to migrate their repositories to git. cgroup v1 AL2023 moves to Unified Control Group hierarchy (cgroup v2), whereas AL2 uses cgroup v1. As AL2 doesn't support cgroup v2, this migration needs to be completed as part of moving to AL2023. amazon-cloudwatch-agent replaces awslogs 17 Amazon Linux 2023 User Guide log4j hotpatch (log4j-cve-2021-44228-hotpatch) Note The log4j-cve-2021-44228-hotpatch package is deprecated in AL2 and removed in AL2023. In response to CVE-2021-44228, Amazon Linux released an RPM packaged version of the Hotpatch for Apache Log4j for AL1 and AL2. In the announcement of the addition of the hotpatch to Amazon Linux , we noted that "Installing the hotpatch is not a replacement for updating to a log4j version that mitigates CVE-2021-44228 or CVE-2021-45046.". The hotpatch was a mitigation to allow time to patch log4j. The first general availability release of AL2023 was 15 months after CVE-2021-44228, so AL2023 doesn't ship with the hotpatch (enabled or not). Customers running their own log4j versions on Amazon Linux are advised to ensure they have updated to versions not affected by CVE-2021-44228 or CVE-2021-45046. lsb_release and the system-lsb-core package Historically, some software invoked the lsb_release command (provided in AL2 by the system- lsb-core package) to get information about the Linux distribution that it was being run on. The Linux Standards Base (LSB) introduced this command and Linux distributions adopted it. Linux distributions have evolved to use the simpler standard of holding this information in /etc/os- release and other related files. The os-release standard comes out of systemd. For more information, see systemd os-release documentation. AL2023 doesn't ship with the lsb_release command, and doesn't include the system-lsb- core package. Software should complete the transition to the os-release standard to maintain compatibility with Amazon Linux and other major Linux distributions. mcrypt The mcrypt library and associated PHP extension was deprecated in AL2, and is no longer present in AL2023. log4j hotpatch (log4j-cve-2021-44228-hotpatch) 18 Amazon Linux 2023 User Guide Upstream PHP deprecated the mcrypt extension in PHP 7.1 which was first released in December 2016 and had its final release in October 2019. The upstream mcrypt library last made a release in 2007, and has not made the migration from cvs revision control that SourceForge required for new commits in 2017, with the most recent commit (and only for 3 years prior) being from 2011 removing the mention of the project having a maintainer. Any remaining users of mcrypt are advised to port their code to OpenSSL, as mcrypt will not be added to AL2023. OpenJDK 7 (java-1.7.0-openjdk) Note AL2023 provides several versions of Amazon Corretto to support Java based workloads. The OpenJDK 7 packages are deprecated in AL2, and no longer present in AL2023. The oldest JDK available in AL2023 is provided by Corretto 8. For more information about Java on Amazon Linux, see Java in AL2023. Python 2.7 Note AL2023 removed Python 2.7, so any OS components requiring Python are written to work with Python 3. To continue to use a version of Python provided by and supported by Amazon Linux, convert Python 2 code to Python 3. For more information about Python on Amazon Linux, see Python in AL2023. rsyslog-openssl replaces rsyslog-gnutls The rsyslog-gnutls package is deprecated in AL2, and no longer present in AL2023. The rsyslog-openssl package should be a drop-in replacement for any usage of the rsyslog- gnutls package. OpenJDK 7 (java-1.7.0-openjdk) 19 Amazon Linux 2023 User Guide Network Information Service (NIS) / yp The Network Information Service (NIS), originally called Yellow Pages or YP is deprecated in AL2, and no longer present in AL2023. This includes the following packages: ypbind, ypserv, and yp- tools. Other packages that integrate with NIS have this functionality removed in AL2023. Multiple domain names in Amazon VPC create-dhcp-options In Amazon Linux 2, it was possible to pass multiple domain names in
al2023-ug-011
al2023-ug.pdf
11
and no longer present in AL2023. The rsyslog-openssl package should be a drop-in replacement for any usage of the rsyslog- gnutls package. OpenJDK 7 (java-1.7.0-openjdk) 19 Amazon Linux 2023 User Guide Network Information Service (NIS) / yp The Network Information Service (NIS), originally called Yellow Pages or YP is deprecated in AL2, and no longer present in AL2023. This includes the following packages: ypbind, ypserv, and yp- tools. Other packages that integrate with NIS have this functionality removed in AL2023. Multiple domain names in Amazon VPC create-dhcp-options In Amazon Linux 2, it was possible to pass multiple domain names in the domain-name parameter to create-dhcp-options, which would result in /etc/resolv.conf containing something like search foo.example.com bar.example.com. The Amazon VPC DHCP server sends the list of provided domain names using DHCP option 15, which only supports a single domain name (see RFC 2132 section 3.17). Since AL2023 uses systemd-networkd for network configuration, which follows the RFC, this accidental feature in AL2 is not present on AL2023 The AWS CLI and Amazon VPC documentation has this to say: "Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP option set is associated with a Amazon VPC that has instances running operating systems that treat the value as a single domain, specify only one domain name. " On these systems, such as AL2023, specifying two domains using DHCP option 15 (which only allows one), and since the space character is invalid in domain names, this will result in the space character being encoded as 032, resulting in /etc/resolv.conf containing search foo.exmple.com032bar.example.com. In order to support multiple domain names, a DHCP server should use DHCP Option 119 (see RFC 3397, section 2). See the Amazon VPC User Guide for when this is supported by the Amazon VPC DHCP server. Sun RPC in glibc The implementation of Sun RPC in glibc is deprecated in AL2 and removed in AL2023. Customers are advised to move to using the libtirpc library (available in AL2 and AL2023) if Sun RPC functionality is required. Adopting libtirpc also enables applications to support IPv6. This change reflects the broader community's adoption of upstream glibc removing this functionality, for example the Removal of Sun RPC interfaces from glibc in Fedora and a similar change in Gentoo. Network Information Service (NIS) / yp 20 Amazon Linux 2023 User Guide OpenSSH key fingerprint in audit log Later in the lifecyle of AL2, a patch was added to the OpenSSH package to emit the key fingerprint used to authenticate. This functionality is not present in AL2023. ld.gold Linker The ld.gold linker is available in AL2, and is removed in AL2023. Customers building software that explicitly references the gold linker should migrate to the regular (ld.bfd) linker. The upstream GNU Binutils release notes for version 2.44 (released Feb 2025) document the removal of ld.gold: "In a change to our previous practice, in this release the binutils-2.44.tar tarball does not contain the sources for the gold linker. This is because the gold linker is now deprecated and will eventually be removed unless volunteers step forward and offer to continue development and maintenance." ping6 In AL2023, the regular ping utility natively supports IPv6, and the separate /bin/ping6 is no longer required. In AL2023, /usr/sbin/ping6 is a symlink to the /usr/bin/ping executable. This change follows the broader community's adoption of newer iputils versions which provide this functionality, for example the Ping IPv6 change in Fedora. Deprecated in AL2023 This section describes functionality that exists in AL2023 and is likely to be removed in a future version of Amazon Linux. Each section will describe what the functionality is and when it is expected to removed from Amazon Linux. Note This section will be updated over time as the Linux ecosystem evolves and future major versions of Amazon Linux are closer to release. Topics • 32bit x86 (i686) runtime support OpenSSH key fingerprint in audit log 21 Amazon Linux 2023 • aspell • Berkeley DB (libdb) • cron • IMDSv1 • pcre version 1 • System V init (sysvinit) • EOL Packages are deprecated User Guide 32bit x86 (i686) runtime support AL2023 retains the ability to run 32bit x86 (i686) binaries. It is likely that the next major version of Amazon Linux will no longer support running 32bit user space binaries. aspell While AL2023 ships with the aspell package, it is deprecated and will be removed in the next major release of Amazon Linux. Customers are advised to migrate to modern replacements such as hunspell or enchant2. The deprecation of aspell in AL2023 follows the broader community shift, for example aspell deprecation in Fedora. Berkeley DB (libdb) AL2023 ships with version 5.3.28 of the Berkeley DB (libdb) library.
al2023-ug-012
al2023-ug.pdf
12
(i686) runtime support AL2023 retains the ability to run 32bit x86 (i686) binaries. It is likely that the next major version of Amazon Linux will no longer support running 32bit user space binaries. aspell While AL2023 ships with the aspell package, it is deprecated and will be removed in the next major release of Amazon Linux. Customers are advised to migrate to modern replacements such as hunspell or enchant2. The deprecation of aspell in AL2023 follows the broader community shift, for example aspell deprecation in Fedora. Berkeley DB (libdb) AL2023 ships with version 5.3.28 of the Berkeley DB (libdb) library. This is the last version of Berkeley DB before the license changed to the GNU Affero GPLv3 (AGPL) license, from the less restrictive Sleepycat license. There are few packages in AL2023 that remain reliant on Berkeley DB (libdb), and the library will be removed in the next major release of Amazon Linux. Note The dnf package manager in AL2023 retains read-only support for a Berkeley DB (BDB) format rpm database. This support will be removed in the next major release of Amazon Linux. 32bit x86 (i686) runtime support 22 Amazon Linux 2023 User Guide The deprecation of libdb follows the broader community shift away from it, for example the libdb deprecation in Fedora. cron The cronie package was installed by default on the AL2 AMI, providing support for the traditional crontab way of scheduling periodic tasks. In AL2023, cronie is not included by default. Therefore, support for crontab is no longer provided by default. In AL2023, you can optionally install the cronie package to use classic cron jobs. We recommend that you migrate to systemd timers due to the added functionality provided by systemd. It is possible that a future version of Amazon Linux, possibly the next major version, will no longer include support for classic cron jobs and complete the transition to systemd timers. We recommend that you migrate away from using cron. IMDSv1 By default, AL2023 AMIs are configured to launch in IMDSv2-only mode, disabling the use of IMDSv1. There is still the option to use AL2023 with IMDSv1 enabled. A future version of Amazon Linux is likely to enforce IMDSv2-only. For more information on IMDS configuration for AMIs, see Configure the AMI in the Amazon EC2 User Guide. pcre version 1 The legacy pcre package is deprecated and will be removed in the next major release of Amazon Linux. The pcre2 package is the successor. Although the first versions of AL2023 shipped with a limited number of packages building against pcre, these packages will be migrated to pcre2 within AL2023. The deprecated pcre library will remain available in AL2023. Note The deprecated version of pcre will not receive security updates for the full lifetime of AL2023. For more information about the pcre support lifecycle and the amount of time that the package will receive security updates, see the package support statements on the pcre package. cron 23 Amazon Linux 2023 User Guide The deprecation of pcre in favor of pcre2 follows the broader community shift in this direction, for example pcre deprecation in Fedora. System V init (sysvinit) Although AL2023 retains backwards compatibility with System V service (init) scripts, the upstream systemd project, as part of its v254 release, announced the deprecation of support for System V service scripts, and indicated that support will be removed in a future version of systemd. For more information, see systemd. AL2023 will retain backwards compatibility with System V service (init) scripts, but users are encouraged to migrate to using native systemd unit files in order to be prepared for when support for System V service (init) scripts is removed from Amazon Linux, likely in the next major release. EOL Packages are deprecated Each package available in AL2023 has an associated support statement which covers Amazon Linux specific information. These statements cover the core of the OS and its lifetime, as well as packages such as the section called “PHP” and the section called “Python”, where AL2023 ships multiple versions and each are supported for the duration that the upstream Open Source project does. In AL2023 you can get package support information using the dnf package manager. For more information, see Getting package support information. Where a package is no longer supported before the end of the major version of Amazon Linux, it should be assumed that this package is deprecated and will not be present in the next major version of Amazon Linux. For packages such as the section called “PHP” and the section called “Python”, where each major Amazon Linux version has shipped multiple versions, each with a different support lifecycle, it is likely that they will continue to be present in new major versions of Amazon Linux, albeit with little or no overlap of major versions of the
al2023-ug-013
al2023-ug.pdf
13
Getting package support information. Where a package is no longer supported before the end of the major version of Amazon Linux, it should be assumed that this package is deprecated and will not be present in the next major version of Amazon Linux. For packages such as the section called “PHP” and the section called “Python”, where each major Amazon Linux version has shipped multiple versions, each with a different support lifecycle, it is likely that they will continue to be present in new major versions of Amazon Linux, albeit with little or no overlap of major versions of the packages. It is recommended to keep the Amazon Linux package support timelines in mind when selecting dependencies. System V init (sysvinit) 24 Amazon Linux 2023 User Guide Comparing AL2 and AL2023 The following topics describe key differences between AL2 and AL2023. For more information on functionality deprecated in AL1, AL2, and AL2023, see Deprecated Functionality in AL2023. Topics • Added, upgraded, and removed packages • Support for each release • Naming and versioning changes • Optimizations • Sourced from multiple upstreams • Networking system service • Package manager • Using cloud-init • Graphical desktop support • Compiler Triplet • 32bit x86 (i686) Packages • lsb_release and the system-lsb-core package • Extra Packages for Enterprise Linux (EPEL) • Python 2.7 has been replaced with Python 3 • Security updates • Deterministic upgrades for stability • gp3 as default Amazon EBS volume type • Unified Control Group hierarchy (cgroup v2) • systemd timers replace cron • Improved toolchain: gcc, binutils, and glibc • systemd journal replaces rsyslog • Minimized package dependencies 25 Amazon Linux 2023 User Guide • Amazon Corretto as the default JVM • AWS CLI v2 • UEFI Preferred and Secure Boot • SSH server default configuration changes • AL2023 kernel changes from AL2 • /tmp is now tmpfs • AMI and Container Image changes • Comparing packages installed on Amazon Linux 2 and Amazon Linux 2023 AMIs • Comparing packages installed on Amazon Linux 2 and Amazon Linux 2023 Minimal AMIs • Comparing packages installed on Amazon Linux 2 and Amazon Linux 2023 base container images Added, upgraded, and removed packages AL2023 contains thousands of software packages available for use. For a full list of all packages added, upgraded, or removed in AL2023 when compared to prior Amazon Linux versions, see Package changes in AL2023. To request a package to be added or changed in AL2023, file an issue in the amazon-linux-2023 repo on GitHub. Support for each release For AL2023, we offer five years of support. For more information, see Release cadence. Naming and versioning changes AL2023 supports the same mechanisms that AL2 supports for platform identification. AL2023 also introduces new files for platform identification. For more information, see Naming and versioning. Added, upgraded, and removed packages 26 Amazon Linux 2023 Optimizations User Guide AL2023 optimizes boot time to reduce the time from instance launch to running the customer workload. These optimizations span the Amazon EC2 instance kernel configuration, cloud-init configurations, and features that are built into packages in the OS such askmod and systemd. For more information about optimizations, see Performance and operational optimizations. Sourced from multiple upstreams AL2023 is RPM-based and includes components sourced from multiple versions of Fedora and other distributions, such as CentOS 9 Stream. The Amazon Linux kernel is sourced from the long-term support (LTS) releases directly from kernel.org, chosen independently from other distributions. For more information, see Relationship to Fedora. Networking system service The systemd-networkd system service manages the network interfaces in AL2023. This is a change from AL2, which uses ISC dhclient or dhclient. For more information, see Networking service. Package manager The default software package management tool on AL2023 is DNF. DNF is the successor to YUM, the package management tool in AL2. For more information, see Package management tool. Using cloud-init In AL2023, cloud-init manages the package repository. By default, in earlier versions of Amazon Linux, cloud-init installed security updates. This isn't the default for AL2023. The new deterministic upgrading features for updating releasever at launch describe the AL2023 way to enable Optimizations 27 Amazon Linux 2023 User Guide package updates at launch. For more information, see Manage package and operating system updates in AL2023 and Deterministic upgrades for stability. With AL2023, you can use cloud-init with SELinux. For more information, see Use cloud-init to enable enforcing mode. Cloud-init loads configuration content with cloud-init from remote locations using HTTP(S). In earlier versions, Amazon Linux doesn't alert you when remote resources are unavailable. In AL2023, unavailable remote resources creates a fatal error and fails the cloud-init execution. This change in behavior from AL2, provides a safer "fail closed" default behavior. For more information, see Customized cloud-init and the cloud-init Documentation. Graphical desktop support AL2023 features a GNOME-based graphical desktop environment
al2023-ug-014
al2023-ug.pdf
14
and operating system updates in AL2023 and Deterministic upgrades for stability. With AL2023, you can use cloud-init with SELinux. For more information, see Use cloud-init to enable enforcing mode. Cloud-init loads configuration content with cloud-init from remote locations using HTTP(S). In earlier versions, Amazon Linux doesn't alert you when remote resources are unavailable. In AL2023, unavailable remote resources creates a fatal error and fails the cloud-init execution. This change in behavior from AL2, provides a safer "fail closed" default behavior. For more information, see Customized cloud-init and the cloud-init Documentation. Graphical desktop support AL2023 features a GNOME-based graphical desktop environment as of release 2023.7, replacing the MATE desktop used in AL2. This version provides users with a different desktop experience while maintaining AL2023's cloud-optimized performance. The GNOME desktop environment offers various customization options, system integration features, and a distinct user interface design, providing users with an alternative to the previous MATE desktop environment. See the AL2023 Graphical Desktop page for more details. Compiler Triplet AL2023 sets the compiler triplet for GCC and LLVM to indicate that amazon is the vendor. Thus, the AL2 aarch64-redhat-linux-gcc becomes aarch64-amazon-linux-gcc on AL2023. This should be completely transparent for most users, and might only affect those who are building compilers on AL2023. 32bit x86 (i686) Packages As part of the 2014.09 release of AL1 it was announced that it would be the last release to produce 32-bit AMIs. Thus, from the 2015.03 release of AL1, Amazon Linux no longer supported running the system in 32-bit mode. AL2 offered limited runtime support for 32bit binaries on x86-64 Graphical desktop support 28 Amazon Linux 2023 User Guide hosts, and did not provide development packages to enable the building of new 32-bit binaries. AL2023 no longer includes any 32bit userspace packages. We recommend that you complete your transition to 64-bit code. If you need to run 32-bit binaries on AL2023, it is possible to use the 32-bit user-space from AL2 inside an AL2 container running on top of AL2023. lsb_release and the system-lsb-core package Historically, some software invoked the lsb_release command (provided in AL2 by the system- lsb-core package) to get information about the Linux distribution that it was being run on. The Linux Standards Base (LSB) introduced this command and Linux distributions adopted it. Linux distributions have evolved to use the simpler standard of holding this information in /etc/os- release and other related files. The os-release standard comes out of systemd. For more information, see systemd os-release documentation. AL2023 doesn't ship with the lsb_release command, and doesn't include the system-lsb- core package. Software should complete the transition to the os-release standard to maintain compatibility with Amazon Linux and other major Linux distributions. Extra Packages for Enterprise Linux (EPEL) Warning The AL2 epel Extra enabled the third party EPEL7 repository. As of 2024-06-30 the third- party EPEL7 repository is no longer being maintained. This third-party repository will have no future updates. This means there will be no security fixes for packages in the EPEL repository. This section will cover options in AL2023 for some packages found in EPEL. Extra Packages for Enterprise Linux (EPEL) is a project in the Fedora community with the objective of creating a large array of packages for enterprise-level Linux operating systems. The project has primarily produced RHEL and CentOS packages. AL2 features a high level of compatibility with CentOS 7. As a result, many EPEL7 packages work on AL2. lsb_release and the system-lsb-core package 29 Amazon Linux 2023 User Guide There is not currently an EPEL or EPEL-like repository for AL2023. However, there are a number of packages that were in EPEL7 that customers have used on AL2 which are either available in AL2023, or have alternatives in AL2023. This section will cover some of these packages and what the options are in AL2023. Warning Only add repositories designed to be used with AL2023. While repositories designed for other distributions may work today, there is no guarantee they will continue to do so with any package update in AL2023 or the repository not designed for use with AL2023. There are also packages were installable from EPEL on AL2 which will not be added to AL2023. Common reasons for this are issues such as the upstream project no longer being maintained, or not fixing CVEs. This section will also cover some of these packages and what alternatives exist. Topics • axel - HTTP/FTP client • brotli and libbrotli - compression • collectd - Statistics collection daemon • cpulimit - CPU Usage limiter • exim - mail transfer agent • fuse3 - File System in Userspace (FUSE) v3 • ganglia - Distributed Monitoring System • git-lfs - version control large files with Git • haveged - an entropy source using the HAVEGE algorithm • inotify-tools - inotify command line tools • iperf - TCP/UDP Performance
al2023-ug-015
al2023-ug.pdf
15
the upstream project no longer being maintained, or not fixing CVEs. This section will also cover some of these packages and what alternatives exist. Topics • axel - HTTP/FTP client • brotli and libbrotli - compression • collectd - Statistics collection daemon • cpulimit - CPU Usage limiter • exim - mail transfer agent • fuse3 - File System in Userspace (FUSE) v3 • ganglia - Distributed Monitoring System • git-lfs - version control large files with Git • haveged - an entropy source using the HAVEGE algorithm • inotify-tools - inotify command line tools • iperf - TCP/UDP Performance benchmark • jemalloc - alternative malloc implementation • libbsd - BSD-compatible function library • libserf - HTTP Client Library • libzstd - zstd compression library EPEL 30 User Guide Amazon Linux 2023 • lighttpd web server • lshell - a restricted shell • monit - process, file, directory, and devices monitor • nodejs • perl-Config-General • python2-lockfile - file locking • python2-rsa - pure Python RSA • python2-simplejson - JSON routines for Python 2 • rkhunter - Rootkit Hunter • rssh - a restricted shell for use with OpenSSH • sscg - self-signed SSL certificate generator • stress - Stress test • stress-ng - Stress test • tmpwatch - removes files based on last accessed time • xmlstarlet - command line XML utilities axel - HTTP/FTP client The axel package was in EPEL7, and has not ever shipped as part of Amazon Linux. Alternatives available in AL2023 are curl and wget. Warning The -S option to axel uses an unencrypted http connection to discover mirrors for a file. It is highly recommended to migrate any use of axel over to either curl or wget. brotli and libbrotli - compression The brotli and libbrotli packages were in EPEL7, while just the brotli package was available in AL2 core. Both the brotli and libbrotli packages are included in AL2023. axel - HTTP/FTP client 31 Amazon Linux 2023 User Guide The brotli package can be installed on AL2023 with the following command: [ec2-user ~]$ sudo dnf install brotli The libbrotli package can be installed on AL2023 with the following command: [ec2-user ~]$ sudo dnf install libbrotli collectd - Statistics collection daemon The collect package was in EPEL7, and was also available in the collectd and collectd- python3 AL2 Extras. The collectd package is included in AL2023 and can be installed by running the following command: [ec2-user ~]$ sudo dnf install collectd cpulimit - CPU Usage limiter In Amazon Linux 2023, systemd provides functionality to limit the CPU usage of processes, or groups of processes. This functionality is also easy to use for any systemd service. There are powerful resource control facilities provided by systemd which can be used to ensure any task or group of tasks is limited in what resources it can consume. For more information, see the upstream systemd.resource-control documentation, along with the Limiting process resource usage in AL2023 using systemd. exim - mail transfer agent The exim package was in EPEL7, and previously available in AL1. Amazon Linux 2023 provides both the postfix and sendmail Mail Transfer Agents (MTAs). fuse3 - File System in Userspace (FUSE) v3 The fuse3 package (including fuse3-libs and fuse3-devel) were in EPEL7. These packages are part of AL2023, and each can be installed by running the relevant following command: collectd - Statistics collection daemon 32 Amazon Linux 2023 User Guide [ec2-user ~]$ sudo dnf install fuse3 [ec2-user ~]$ sudo dnf install fuse3-libs [ec2-user ~]$ sudo dnf install fuse3-devel ganglia - Distributed Monitoring System The ganglia package was in EPEL7, and previously available in AL1. It was not shipped with AL2. The upstream project had a period of inactivity where some open CVEs were not being addressed. While there has been recent activity in the upstream project, it is not planned to add ganglia to AL2023. git-lfs - version control large files with Git The git-lfs package was in EPEL7. In Amazon Linux 2023, the git-lfs package is included in the core repository. On AL2023, git-lfs can be installed by running the following command: [ec2-user ~]$ sudo dnf install git-lfs haveged - an entropy source using the HAVEGE algorithm The haveged package was in EPEL7. Amazon Linux 2023 comes pre-configured with entropy sources, not requiring the use of haveged. inotify-tools - inotify command line tools The inotify-tools package was in EPEL7, and is included in AL2023. Note In AL2023, systemd supports path based activation which can be used for taking action on events such as when a path exists or changes. Much of what inotify-tools is used for can now be better accomplished in a more reliable manner using systemd path activation. For more information, see systemd.path. ganglia - Distributed Monitoring System 33 Amazon Linux 2023 User Guide The inotify-tools package is included in AL2023 and
al2023-ug-016
al2023-ug.pdf
16
Linux 2023 comes pre-configured with entropy sources, not requiring the use of haveged. inotify-tools - inotify command line tools The inotify-tools package was in EPEL7, and is included in AL2023. Note In AL2023, systemd supports path based activation which can be used for taking action on events such as when a path exists or changes. Much of what inotify-tools is used for can now be better accomplished in a more reliable manner using systemd path activation. For more information, see systemd.path. ganglia - Distributed Monitoring System 33 Amazon Linux 2023 User Guide The inotify-tools package is included in AL2023 and can be installed by running the following command: [ec2-user ~]$ sudo dnf install inotify-tools iperf - TCP/UDP Performance benchmark The iperf version 2 package was in EPEL7, and was also available in the testing AL2 Extra. and was also available in AL1 Note The iperf3 package is also available, providing version 3 of iperf. The iperf package is included in AL2023 and can be installed by running the following command: [ec2-user ~]$ sudo dnf install iperf jemalloc - alternative malloc implementation The jemalloc package was in EPEL7, and was available in the lamp-mariadb10.2-php7.2 and mariadb10.5 AL2 Extras. The jemalloc package is included in AL2023 and can be installed by running the following command: [ec2-user ~]$ sudo dnf install jemalloc libbsd - BSD-compatible function library The libbsd package was in EPEL7, and was also available in the testing AL2 Extra. The libbsd package is included in AL2023 and can be installed by running the following command: [ec2-user ~]$ sudo dnf install libbsd The development files for libbsd can be installed by running the following command. iperf - TCP/UDP Performance benchmark 34 Amazon Linux 2023 User Guide [ec2-user ~]$ sudo dnf install libbsd-devel libserf - HTTP Client Library The libserf package was in EPEL7. The libserf package is provided in Amazon Linux 2023. It can be installed by running the following command: [ec2-user ~]$ sudo dnf install libserf libzstd - zstd compression library The libzstd package was in AL2 core, as well as in EPEL7. The libzstd package is also part of AL2023. [ec2-user ~]$ sudo dnf install libzstd lighttpd web server The lighttpd package was in EPEL7, and previously available in AL1. Amazon Linux 2023 provides both the Apache httpd and nginx web servers. lshell - a restricted shell The lshell package has never been shipped as part of Amazon Linux. It was available in EPEL6. The Fedora packaging repository for lshell covers why it was not packaged in EPEL7 or Fedora 30. It was also removed from Debian. The upstream lshell project is no longer being actively maintained, and contains known unpatched Critical CVEs: CVE-2016-6902 and CVE-2016-6903. The alternative suggested in the Debian bug, rssh is also unmaintained upstream, with the author citing unfixable security issues as the reason. For these reasons, adding lshell to AL2023 is not planned. monit - process, file, directory, and devices monitor In Amazon Linux 2023, systemd provides a wide array of functionality for monitoring, starting, stopping, and restarting services. This includes rate limiting restarts, waiting between restart libserf - HTTP Client Library 35 Amazon Linux 2023 User Guide attempts, and starting another service on failure. For more information, see the systemd.service documentation. In AL2023, systemd also supports path based activation which can be used for taking action on events such as when a path exists or changes. For more information, see systemd.path. There are common configuration options for systemd units which allow specifying dependencies, conditionals, and actions to take on success or failure. For more information, see the systemd.unit documentation. There are powerful resource control facilities provided by systemd which can be used to ensure any monitoring task does not use excessive CPU or memory. For more information, see systemd.resource-control. nodejs The nodejs version 16 package was in EPEL7, and nodejs is now included in AL2023. At the time of writing, both nodejs version 18 and 20 were available in AL2023. You can install nodejs 18 on AL2023 with the following command: [ec2-user ~]$ sudo dnf install nodejs You can install nodejs 20 on AL2023 with the following command: [ec2-user ~]$ sudo dnf install nodejs20 perl-Config-General The perl-Config-General package was in EPEL7, and is now included in AL2023. You can install the perl-Config-General package in AL2023 with the following command: [ec2-user ~]$ sudo dnf install perl-Config-General Perl modules can also be installed by asking DNF to install the package that provides a particular Perl module. With this method, you can use the more familiar Perl module name rather than the OS package name. [ec2-user ~]$ sudo dnf install 'perl(Confg::General)' nodejs 36 Amazon Linux 2023 User Guide python2-lockfile - file locking The python2-lockfile package was in EPEL7, and AL2 included a python-lockfile package. In AL2023 Python 2.7 has been replaced with Python 3, so a
al2023-ug-017
al2023-ug.pdf
17
now included in AL2023. You can install the perl-Config-General package in AL2023 with the following command: [ec2-user ~]$ sudo dnf install perl-Config-General Perl modules can also be installed by asking DNF to install the package that provides a particular Perl module. With this method, you can use the more familiar Perl module name rather than the OS package name. [ec2-user ~]$ sudo dnf install 'perl(Confg::General)' nodejs 36 Amazon Linux 2023 User Guide python2-lockfile - file locking The python2-lockfile package was in EPEL7, and AL2 included a python-lockfile package. In AL2023 Python 2.7 has been replaced with Python 3, so a Python 2 variant of this package will not be added to AL2023. The Python 3 version of this package is included in AL2023. You can install the python3- lockfile package in AL2023 with one of the following commands: [ec2-user ~]$ sudo dnf install python3-lockfile Python modules can also be installed by asking DNF to install the package that provides a particular Python module. [ec2-user ~]$ sudo dnf install 'python3dist(lockfile)' python2-rsa - pure Python RSA The python2-rsa package was in EPEL7, and AL2 included a python2-rsa package. In AL2023 Python 2.7 has been replaced with Python 3, so a Python 2 variant of this package will not be added to AL2023. The Python 3 version of this package is included in AL2023. You can install the python3-rsa package in AL2023 with one of the following commands: [ec2-user ~]$ sudo dnf install python3-rsa Python modules can also be installed by asking DNF to install the package that provides a particular Python module. [ec2-user ~]$ sudo dnf install 'python3dist(rsa)' python2-simplejson - JSON routines for Python 2 The python2-simplejson package was in EPEL7. In AL2023 Python 2.7 has been replaced with Python 3, so a Python 2 variant of this package will not be added to AL2023. python2-lockfile - file locking 37 Amazon Linux 2023 User Guide The Python 3 version of this package is included in AL2023. You can install the python3- simplejson package in AL2023 with the following command: [ec2-user ~]$ sudo dnf install python3-simplejson Python modules can also be installed by asking DNF to install the package that provides a particular Python module. [ec2-user ~]$ sudo dnf install 'python3dist(simplejson)' rkhunter - Rootkit Hunter The rkhunter package is included in AL2023 along with chkrootkit. [ec2-user ~]$ sudo dnf install rkhunter [ec2-user ~]$ sudo dnf install chkrootkit rssh - a restricted shell for use with OpenSSH The rssh package was in EPEL7. The upstream rssh package is unmaintained, with the author citing unfixable security issues as the reason. With the author citing unfixable security issues, adding rssh to AL2023 is not planned. sscg - self-signed SSL certificate generator The sscg package was in AL2 core, as well as in EPEL7. The sscg package is also part of AL2023. [ec2-user ~]$ sudo dnf install sscg stress - Stress test The stress package was in EPEL7, and was also available in AL1 The stress package is included in AL2023 and can be installed by running the following command: rkhunter - Rootkit Hunter 38 Amazon Linux 2023 User Guide [ec2-user ~]$ sudo dnf install stress stress-ng - Stress test The stress-ng package was in EPEL7, and was also available in the testing AL2 Extra. The stress-ng package is included in AL2023 and can be installed by running the following command: [ec2-user ~]$ sudo dnf install stress-ng tmpwatch - removes files based on last accessed time In Amazon Linux 2023, this functionality is provided by systemd-tmpfiles. xmlstarlet - command line XML utilities The xmlstarlet package was in EPEL7, and is not available in AL2023. The upstream package has not been touched in over 9 years (last touched in August 2014). For an additional four years prior (since at least July 2010), a request for a new maintainer has gone unanswered. It is for this reason that it is not planned to add xmlstarlet to AL2023. Python 2.7 has been replaced with Python 3 AL2 provides support and security patches for Python 2.7 until June 2025, as part of our long- term support (LTS) commitment for AL2 core packages. This support extends beyond the upstream Python community declaration of Python 2.7 end-of-life of January 2020. AL2 uses the yum package manager, which has a hard dependency on Python 2.7. In AL2023 the dnf package manager has migrated to Python 3, and no longer requires Python 2.7. AL2023 has completely moved to Python 3. Note AL2023 removed Python 2.7, so any OS components requiring Python are written to work with Python 3. To continue to use a version of Python provided by and supported by Amazon Linux, convert Python 2 code to Python 3. stress-ng - Stress test 39 Amazon Linux 2023 User Guide For more information on Python on Amazon Linux, see Python in AL2023. Security updates Amazon
al2023-ug-018
al2023-ug.pdf
18
yum package manager, which has a hard dependency on Python 2.7. In AL2023 the dnf package manager has migrated to Python 3, and no longer requires Python 2.7. AL2023 has completely moved to Python 3. Note AL2023 removed Python 2.7, so any OS components requiring Python are written to work with Python 3. To continue to use a version of Python provided by and supported by Amazon Linux, convert Python 2 code to Python 3. stress-ng - Stress test 39 Amazon Linux 2023 User Guide For more information on Python on Amazon Linux, see Python in AL2023. Security updates Amazon Linux 2023 improves upon the hardening present in AL2. For more information, see Security and Compliance in Amazon Linux 2023. For more information on kernel hardening changes from AL2, see Security focused kernel config changes. Topics • SELinux • OpenSSL 3 • IMDSv2 • Removal of log4j hotpatch (log4j-cve-2021-44228-hotpatch) SELinux By default, Security Enhanced Linux (SELinux) for AL2023 is enabled and set to permissive mode. In permissive mode, permission denials are logged but not enforced. SELinux is a security feature of the Amazon Linux kernel, which was disabled in AL2. SELinux is a collection of kernel features and utilities that provides mandatory access control (MAC) architecture into the major subsystems of the kernel. For more information, see Setting SELinux modes for AL2023. For more information about SELinux repositories, tools, and policies, see SELinux Notebook, Types of SELinux policy, and SELinux Project . OpenSSL 3 AL2023 features the Open Secure Sockets Layer version 3 (OpenSSL 3) cryptography toolkit. AL2023 supports TLS 1.3 and TLS 1.2 network protocols. By default, AL2 comes with OpenSSL 1.0.2. You can build applications against OpenSSL 1.1.1. For more information about OpenSSL, see the OpenSSL migration guide. For more information about security, see Security updates and features. Security updates 40 Amazon Linux 2023 IMDSv2 User Guide By default, any instances launched with the AL2023 AMI require IMDSv2-only and your default hop limit will be set to 2 to allow for containerized workload support. This is done by setting the imds- support parameter to v2.0. For more information, see Configure the AMI in the Amazon EC2 User Guide. Note The session token's time of validity can be anywhere between 1 second and 6 hours. The addresses to direct the API requests for IMDSv2 queries are the following: • IPv4: 169.254.169.254 • IPv6: fd00:ec2::254 You can manually override these settings and enable IMDSv1 using Instance Metadata option launch properties. You can also use IAM controls to enforce different IMDS settings. For more information about setting up and using the Instance Metadata Service, see Use IMDSv2, Configure instance metadata options for new instances, and Modify instance metadata options for existing instances, in the Amazon EC2 User Guide. Removal of log4j hotpatch (log4j-cve-2021-44228-hotpatch) Note AL2023 doesn't ship with the log4j-cve-2021-44228-hotpatch package. In response to CVE-2021-44228, Amazon Linux released an RPM packaged version of the Hotpatch for Apache Log4j for AL1 and AL2. In the announcement of the addition of the hotpatch to Amazon Linux we noted that "Installing the hotpatch is not a replacement for updating to a log4j version that mitigates CVE-2021-44228 or CVE-2021-45046.". The hotpatch was a mitigation to allow time to patch log4j. The first General Availability (GA) release of AL2023 was 15 months after CVE-2021-44228, thus AL2023 doesn't ship with the hotpatch (enabled or not). IMDSv2 41 Amazon Linux 2023 User Guide Users running their own log4j versions on Amazon Linux should ensure that they have updated to versions not affected by CVE-2021-44228 or CVE-2021-45046. AL2023 provides guidance on Updating AL2023 so that you can keep up to date with security patches. Security advisories are published on the Amazon Linux Security Center. Deterministic upgrades for stability With the deterministic upgrades through versioned repositories feature, every AL2023 AMI by default is locked to a specific repository version. You can use deterministic upgrades to achieve greater consistency among package versions and updates. Each release, major or minor, includes a specific repository version. New with AL2023, deterministic upgrading by default is enabled. This is an improvement over the manual, incremental method of locking that's used in AL2 and other earlier versions. For more information, see Deterministic upgrades through versioned repositories on AL2023. gp3 as default Amazon EBS volume type The AL2023 AMI and AL2 both use the XFS file system on the root file system. For AL2023, the mkfsoptions for the root device file system are further optimized for Amazon EC2. AL2023 also supports a number of other file systems that you can use on other volumes to meet your specific requirements. AL2023 AMIs use Amazon EBS gp3 volumes by default, whereas AL2 AMIs use Amazon EBS gp2 volumes by default. You can change the volume type when you launch an instance. For more information about Amazon EBS volume types,
al2023-ug-019
al2023-ug.pdf
19
on AL2023. gp3 as default Amazon EBS volume type The AL2023 AMI and AL2 both use the XFS file system on the root file system. For AL2023, the mkfsoptions for the root device file system are further optimized for Amazon EC2. AL2023 also supports a number of other file systems that you can use on other volumes to meet your specific requirements. AL2023 AMIs use Amazon EBS gp3 volumes by default, whereas AL2 AMIs use Amazon EBS gp2 volumes by default. You can change the volume type when you launch an instance. For more information about Amazon EBS volume types, see Amazon EBS General Purpose Volumes. For more information about launching an Amazon EC2 instance, see Launch an instance in the Amazon EC2 User Guide. Unified Control Group hierarchy (cgroup v2) A Control Group (cgroup) is a Linux kernel feature to hierarchically organize processes and distribute system resources between them. Control Groups are used extensively to implement a container runtime, and by systemd. Deterministic upgrades for stability 42 Amazon Linux 2023 User Guide AL2 supports cgroupv1, and AL2023 supports cgroupv2. This is notable if running containerized workloads, such as when Using AL2023 based Amazon ECS AMIs to host containerized workloads. Although AL2023 still includes code that can make the system run using cgroupv1, this is not a recommended or supported configuration, and will be completely removed in a future major release of Amazon Linux. There is extensive documentation regarding the low-level Linux Kernel interfaces, as well as systemd cgroup delegation documentation. A common use case outside of containers is for creating systemd units that have limits placed on the system resources they can use. For more information, see systemd.resource-control. systemd timers replace cron The cronie package was installed by default on the AL2 AMI, providing support for the traditional crontab way of scheduling periodic tasks. In AL2023, cronie is not included by default. Therefore, support for crontab is no longer provided by default. You can optionally install the cronie package to use classic cron jobs. We recommend that you migrate to systemd timers due to the added functionality provided by systemd. Improved toolchain: gcc, binutils, and glibc AL2023 includes many of the same core packages as AL2. We updated the following three core toolchain packages for AL2023. Package name glibc gcc binutils AL2 2.26 7.3 2.29 AL2023 2.34 11.3 2.39 For more information, see Core toolchain packages glibc, gcc, binutils. systemd timers replace cron 43 Amazon Linux 2023 User Guide For more information about optimizations, see Performance and operational optimizations. systemd journal replaces rsyslog In AL2023 the logging system package has changed from AL2. AL2023 doesn't install rsyslog by default, so the text based log files such as /var/log/messages that were available in AL2 aren't available by default. The default configuration for AL2023 is systemd-journal, which can be examined using journalctl. Although rsyslog is an optional package in AL2023, we recommend the new systemd based journalctl interface and related packages. For more information, see the journalctl manual page. The systmed journal equivalent to some commonly used syslog commands are covered in the following table. AL2 syslog command AL2023 systemd journal equivalent [ec2-user ~]$ cat /var/log/messages [ec2-user ~]$ journalctl [ec2-user ~]$ tail -f /var/log/ messages [ec2-user ~]$ journalctl -f [ec2-user ~]$ grep foo /var/log/ messages [ec2-user ~]$ journalctl | grep foo Minimized package dependencies Amazon Linux 2023 minimizes the dependency graph of many packages to provide a smaller footprint for applications. Notable changes from AL2 include the curl-minimal and gnupg- minimal packages, which siginicantly reduce the number of required packages while retaining commonly used functionality. Topics • Package changes for curl and libcurl • GNU Privacy Guard (GNUPG) systemd journal replaces rsyslog 44 Amazon Linux 2023 User Guide Package changes for curl and libcurl AL2023 separates out the common protocols and functionality of the curl and libcurl packages into curl-minimal and libcurl-minimal. This reduces the disk, memory, and dependency footprint for most users, and is the default package for AL2023 AMIs and containers. If the full functionality of curl is required, for example for gopher:// support, run the following commands to install the curl-full and libcurl-full packages. $ dnf swap libcurl-minimal libcurl-full $ dnf swap curl-minimal curl-full GNU Privacy Guard (GNUPG) AL2023 separates out minimal and complete functionality for the gnupg2 package into gnupg2- minimal and gnupg2-full packages. By default, only the gnupg2-minimal package is installed. This provides the minimal functionality required to verify the digital signatures on rpm packages. For more functionality from gnupg2, such as the ability to download keys from a key server, ensure that the gnupg2-full package is installed. Run the following command to swap gnupg2- minimal for gnupg2-full. $ dnf swap gnupg2-minimal gnupg2-full Amazon Corretto as the default JVM AL2023 ships with Amazon Corretto as the default (and only) Java Development Kit (JDK). All Java based
al2023-ug-020
al2023-ug.pdf
20
AL2023 separates out minimal and complete functionality for the gnupg2 package into gnupg2- minimal and gnupg2-full packages. By default, only the gnupg2-minimal package is installed. This provides the minimal functionality required to verify the digital signatures on rpm packages. For more functionality from gnupg2, such as the ability to download keys from a key server, ensure that the gnupg2-full package is installed. Run the following command to swap gnupg2- minimal for gnupg2-full. $ dnf swap gnupg2-minimal gnupg2-full Amazon Corretto as the default JVM AL2023 ships with Amazon Corretto as the default (and only) Java Development Kit (JDK). All Java based packages in AL2023 are all built with Amazon Corretto 17. If you are migrating from AL2, you can smoothly transition from the equivalent OpenJDK version on AL2 to Amazon Corretto. AWS CLI v2 AL2023 ships with AWS CLI version 2, whereas AL2 ships with version 1 of the AWS CLI. Package changes for curl and libcurl 45 Amazon Linux 2023 User Guide UEFI Preferred and Secure Boot By default, any instances launched with the AL2023 AMI on instance types that support UEFI firmware will launch in UEFI mode. This is done by setting the Boot Mode AMI parameter to uefi- preferred. For more information, see Boot Modes in the Amazon EC2 User Guide. On Amazon EC2 instance types that support UEFI Secure Boot, it is possible to enable Secure Boot in Amazon Linux 2023. For more information, see UEFI Secure Boot on AL2023. SSH server default configuration changes For the AL2023 AMI, we changed the types of sshd host keys that we generate with the release. We also dropped some legacy key types to avoid generating them at launch time. Clients must support the rsa-sha2-256 and rsa-sha2-512 protocols or ssh-ed25519 with use of an ed25519 key. By default, ssh-rsa signatures are disabled. Additionally, AL2023 configuration settings in the default sshd_config file contain UseDNS=no. This new setting means that DNS impairments are less likely to block your ability to establish ssh sessions with your instances. The tradeoff is that the from=hostname.domain,hostname.domain line entries in your authorized_keys files won't be resolved. Because sshd no longer attempts to resolve the DNS names, each comma separated hostname.domain value must be translated to a corresponding IP address. For more information, see Default SSH server configuration. AL2023 kernel changes from AL2 AL2023 brings the 6.1 kernel, as well as many configuration changes to further optimize Amazon Linux for the cloud. For most users, these changes should be completely transparent. IPv4 TTL The TTL for IPv4 is configured via sysctl, with the default values being present in /etc/ sysctl.d/00-defaults.conf. This value can be customized through the usual sysctl methods. For more information, see the sysctl man page. AL2 set the net.ipv4.ip_default_ttl value to to 255, while AL2023 sets it to 127. This brings Amazon Linux defaults in line with other major Linux distributions. It is not recommended to change this default without a demonstrated need to. UEFI Preferred and Secure Boot 46 Amazon Linux 2023 User Guide Security focused kernel config changes CONFIG option AL2/4.14/ aarch64 AL2/4.14/ x86_64 AL2/5.10/ aarch64 AL2/5.10/ x86_64 AL2023/6. 1/ AL2023/6. 1/ AL2023/6. 12/ AL2023/6. 12/ aarch64 x86_64 aarch6 x86_64 y n y y y 4 y y n CONFIG_BU G_ON_DATA _CORRUPTI ON CONFIG_DE 4096 4096 4096 4096 65536 65536 65536 65536 FAULT_MMA P_MIN_ADD R n CONFIG_DE VMEM n CONFIG_DE VPORT n CONFIG_FO RTIFY_SOU RCE y y y CONFIG_HA N/A N/A RDENED_US ERCOPY_FA LLBACK n n n y CONFIG_IN N/A N/A n IT_ON_ALL OC_DEFAUL T_ON y y y y n n n y n n y n n y n n y N/A N/A N/A N/A n n n n Security focused kernel config changes 47 Amazon Linux 2023 User Guide CONFIG option AL2/4.14/ aarch64 AL2/4.14/ x86_64 AL2/5.10/ aarch64 AL2/5.10/ x86_64 AL2023/6. 1/ AL2023/6. 1/ AL2023/6. 12/ AL2023/6. 12/ aarch64 x86_64 aarch6 x86_64 CONFIG_IN N/A N/A n n IT_ON_FRE E_DEFAULT _ON CONFIG_IO N/A N/A N/A N/A MMU_DEFAU LT_DMA_ST RICT y CONFIG_LD ISC_AUTOL OAD y y y n n n CONFIG_SC N/A N/A N/A N/A N/A HED_CORE n CONFIG_SC HED_STACK _END_CHEC K n CONFIG_SE CURITY_DM ESG_RESTR ICT y CONFIG_SE CURITY_SE LINUX_DIS ABLE y n y n n y y n y y y n 4 n n n N/A y y n n n y y y N/A N/A n n n y y y n Security focused kernel config changes 48 Amazon Linux 2023 User Guide CONFIG option AL2/4.14/ aarch64 AL2/4.14/ x86_64 AL2/5.10/ aarch64 AL2/5.10/ x86_64 AL2023/6. 1/ AL2023/6. 1/ AL2023/6. 12/ AL2023/6. 12/ aarch64 x86_64 aarch6 x86_64 y y y y y y y y y 4 y y y y y y CONFIG_SH N/A N/A y UFFLE_PAG E_ALLOCAT OR n CONFIG_SL AB_FREELI ST_HARDEN ED n CONFIG_SL AB_FREELI ST_RANDOM y n y y x86-64 Specific Security focused kernel config changes CONFIG option
al2023-ug-021
al2023-ug.pdf
21
4 n n n N/A y y n n n y y y N/A N/A n n n y y y n Security focused kernel config changes 48 Amazon Linux 2023 User Guide CONFIG option AL2/4.14/ aarch64 AL2/4.14/ x86_64 AL2/5.10/ aarch64 AL2/5.10/ x86_64 AL2023/6. 1/ AL2023/6. 1/ AL2023/6. 12/ AL2023/6. 12/ aarch64 x86_64 aarch6 x86_64 y y y y y y y y y 4 y y y y y y CONFIG_SH N/A N/A y UFFLE_PAG E_ALLOCAT OR n CONFIG_SL AB_FREELI ST_HARDEN ED n CONFIG_SL AB_FREELI ST_RANDOM y n y y x86-64 Specific Security focused kernel config changes CONFIG option AL2/4.14/ x86_64 AL2/5.10/ x86_64 AL2023/6.1/ x86_64 AL2023/6.12/ x86_64 y m N/A CONFIG_AM D_IOMMU CONFIG_AM D_IOMMU_V2 CONFIG_RA NDOMIZE_M EMORY y m y y y y y N/A y aarch64 (ARM/Graviton) Specific Security focused kernel config changes Security focused kernel config changes 49 Amazon Linux 2023 User Guide CONFIG option AL2/4.14/ aarch64 AL2/5.10/ aarch64 AL2023/6.1/ aarch64 AL2023/6.12/ aarch64 N/A y N/A N/A CONFIG_AR M64_PTR_A UTH CONFIG_AR M64_PTR_A UTH_KERNEL CONFIG_AR y y M64_SW_TT BR0_PAN y y y y y y /dev/mem, /dev/kmem and /dev/port Amazon Linux 2023 disables /dev/mem, and /dev/port (CONFIG_DEVMEM and CONFIG_DEVPORT) completely, building on the restrictions already in place in AL2. The /dev/kmem code was completely removed from Linux in the 5.13 kernel, and while it was disabled in AL2, it is now not applicable to AL2023. This option is one of the Kernel Self Protection Project Recommended Settings. FORTIFY_SOURCE AL2023 enables CONFIG_FORTIFY_SOURCE on all supported architectures. This feature is a security hardening feature. Where the compiler can determine and validate the buffer sizes, this feature can detect buffer overflows in common string and memory functions. This option is one of the Kernel Self Protection Project Recommended Settings. Line Discipline autoload (CONFIG_LDISC_AUTOLOAD) The AL2023 kernel will not automatically load line disciplines, such as by software using the TIOCSETD ioctl, unless the request comes from a process with the CAP_SYS_MODULE permissions. This option is one of the Kernel Self Protection Project Recommended Settings. Security focused kernel config changes 50 Amazon Linux 2023 User Guide dmesg access for unprivileged users (CONFIG_SECURITY_DMESG_RESTRICT) By default, AL2023 does not allow unprivileged users access to dmesg. This option is one of the Kernel Self Protection Project Recommended Settings. SELinux selinuxfs disable AL2023 disables the deprecated CONFIG_SECURITY_SELINUX_DISABLE kernel option, which enabled a runtime method of disabling SELinux prior to policy being loaded. This option is one of the Kernel Self Protection Project Recommended Settings. Other kernel configuration changes CONFIG option AL2/4.14/ aarch64 AL2/4.14/ x86_64 AL2/5.10/ aarch64 AL2/5.10/ x86_64 AL2023/6. 1/ AL2023/6. 1/ AL2023/6. 12/ AL2023/6. 12/ aarch64 x86_64 aarch6 x86_64 4 CONFIG_HZ100 250 100 250 100 100 100 100 CONFIG_NR 4096 8192 4096 8192 4096 8192 4096 8192 _CPUS y CONFIG_PA NIC_ON_OO PS 1 CONFIG_PA NIC_ON_OO PS_VALUE m CONFIG_PP P m CONFIG_SL IP n 0 m m y 1 m m n 0 m m y 1 n n y 1 n n y 1 n n y 1 n n Other kernel configuration changes 51 Amazon Linux 2023 User Guide CONFIG option AL2/4.14/ aarch64 AL2/4.14/ x86_64 AL2/5.10/ aarch64 AL2/5.10/ x86_64 AL2023/6. 1/ AL2023/6. 1/ AL2023/6. 12/ AL2023/6. 12/ CONFIG_XE N/A y N/A n N/A n N/A n aarch64 x86_64 aarch6 x86_64 4 N_PV CONFIG_HZ AL2023 sets CONFIG_HZ to 100 on both x86-64 and aarch64 platforms. CONFIG_NR_CPUS AL2023 sets CONFIG_NR_CPUS to a number closer to the maximum number of CPU cores found in Amazon EC2. Panic on OOPS The AL2023 kernel will panic when it oopses. This feature is equivalent to booting with oops=panic on the kernel command line. A kernel oops is where the kernel has detected an internal error which may affect the further reliability of the system. PPP and SLIP Support AL2023 does not support the PPP or SLIP protocols. Xen PV Guest Support AL2023 does not support running as a Xen PV guest. Kernel Filesystem support There have been several changes in the file systems that the kernel in AL2 will support mounting, along with changes in the partitioning schemes that the kernel will parse. Kernel Filesystem support 52 Amazon Linux 2023 User Guide CONFIG option AL2/4.14/ aarch64 AL2/4.14/ x86_64 AL2/5.10/ aarch64 AL2/5.10/ x86_64 AL2023/6. 1/ AL2023/6. 1/ AL2023/6. 12/ AL2023/6. 12/ n CONFIG_AF S_FS n CONFIG_AF _RXRPC y CONFIG_BS D_DISKLAB EL m CONFIG_CR AMFS m m y m CONFIG_CR N/A N/A AMFS_BLOC KDEV CONFIG_DM N/A N/A _CLONE m CONFIG_DM _ERA n CONFIG_DM _INTEGRIT Y n CONFIG_DM _LOG_WRIT ES m CONFIG_DM _SWITCH n m n n n n y m y n m n m m m m y m n n n m m n aarch64 x86_64 aarch6 x86_64 n n n n n n n n 4 n n n n n n n n N/A N/A N/A N/A n n m m n n n m m n n n
al2023-ug-022
al2023-ug.pdf
22
CONFIG_AF S_FS n CONFIG_AF _RXRPC y CONFIG_BS D_DISKLAB EL m CONFIG_CR AMFS m m y m CONFIG_CR N/A N/A AMFS_BLOC KDEV CONFIG_DM N/A N/A _CLONE m CONFIG_DM _ERA n CONFIG_DM _INTEGRIT Y n CONFIG_DM _LOG_WRIT ES m CONFIG_DM _SWITCH n m n n n n y m y n m n m m m m y m n n n m m n aarch64 x86_64 aarch6 x86_64 n n n n n n n n 4 n n n n n n n n N/A N/A N/A N/A n n m m n n n m m n n n m m n n n m m n Kernel Filesystem support 53 Amazon Linux 2023 User Guide CONFIG option AL2/4.14/ aarch64 AL2/4.14/ x86_64 AL2/5.10/ aarch64 AL2/5.10/ x86_64 AL2023/6. 1/ AL2023/6. 1/ AL2023/6. 12/ AL2023/6. 12/ aarch64 x86_64 aarch6 x86_64 n m m m m m m m n y y n n m n n n n n n n n n n m n n n n n n n n 4 n n m n n n n n n n n n n m n n n n n n n n m CONFIG_DM _VERITY n CONFIG_EC RYPT_FS n m CONFIG_EX N/A N/A FAT_FS n CONFIG_EX T2_FS n CONFIG_EX T3_FS m CONFIG_GF S2_FS n CONFIG_HF SPLUS_FS n CONFIG_HF S_FS n CONFIG_JF S_FS n CONFIG_LD M_PARTITI ON n CONFIG_MA C_PARTITI ON m m m m m n y y m n m n n m n n n n n Kernel Filesystem support 54 Amazon Linux 2023 User Guide CONFIG option AL2/4.14/ aarch64 AL2/4.14/ x86_64 AL2/5.10/ aarch64 AL2/5.10/ x86_64 AL2023/6. 1/ AL2023/6. 1/ AL2023/6. 12/ AL2023/6. 12/ aarch64 x86_64 aarch6 x86_64 m m m y y y n n n n n n m n m y y y n n n n y n n n n n y n 4 n n n n y n n n n n y n n CONFIG_NF S_V2 n CONFIG_NT FS_FS n CONFIG_RO MFS_FS n CONFIG_SO LARIS_X86 _PARTITIO N n CONFIG_SQ UASHFS_ZS TD n CONFIG_SU N_PARTITI ON Andrew File System support (AFS) The kernel is no longer built with support for the afs file system. AL2 did not ship with user-space support for afs. cramfs support The kernel is no longer built with support for the cramfs file system. The successor in AL2023 is the squashfs file system. Kernel Filesystem support 55 Amazon Linux 2023 BSD disklabel support User Guide The kernel is no longer built with support for BSD disk labels. If reading volumes with BSD disk labels is required, various BSDs can be launched. Device Mapper changes There have been several changes to the Device Mapper targets configured in the AL2023 kernel. eCryptFs support The ecryptfs file system has been deprecated in Amazon Linux. The user-space components of ecryptfs were present in AL1, removed in AL2, and AL2023 no longer builds the kernel with ecryptfs support. exFAT Support for the exFAT file system was added in the 5.10 kernel in AL2. It was not present at AL2 launch with a 4.14 kernel. AL2023 continues to support the exFAT file system. The ext2, ext3, and ext4 file systems AL2023 ships with the CONFIG_EXT4_USE_FOR_EXT2 option, which means that the ext4 file system code will be used to read legacy ext2 file systems. CONFIG_GFS2_FS The kernel is no longer built with CONFIG_GFS2_FS. Apple Extended HFS file system support (HFS+) In AL2, only the x86-64 kernels were built with the hfsplus file system support. The AL2 5.15 kernel does not include hfsplus support on any architecture. In AL2023, we complete the deprecation of hfsplus support in Amazon Linux. HFS file system support In AL2, only the x86-64 kernels were built with the hfs file system support. The AL2 5.15 kernel does not include hfs support on any architecture. In AL2023, we complete the deprecation of hfs support in Amazon Linux. Kernel Filesystem support 56 Amazon Linux 2023 JFS file system support User Guide Older AL2 x86-64 kernels were built with jfs file system support. The AL2 5.15 kernel does not include jfs support on any architecture. Neither AL1 or AL2 shipped with JFS userspace. In AL2023, we complete the deprecation of jfs support in Amazon Linux. The upstream Linux kernel is considering the removal of JFS. Therefore, if you have data on a JFS file system, you should migrate it to another file system. In 2024, JFS was removed from all current Amazon Linux kernels. Windows Logical Disk Manager (Dynamic Disk) support (CONFIG_LDM_PARTITION) AL2023 no longer supports Windows 2000, Windows XP, or Windows Vista dynamic disks with MS- DOS style partitions. This code did not ever support the newer GPT based dynamic disks introduced with Windows Vista. Macintosh partition map support AL2023 no longer supports the classic Macintosh partition map. Modern
al2023-ug-023
al2023-ug.pdf
23
jfs support in Amazon Linux. The upstream Linux kernel is considering the removal of JFS. Therefore, if you have data on a JFS file system, you should migrate it to another file system. In 2024, JFS was removed from all current Amazon Linux kernels. Windows Logical Disk Manager (Dynamic Disk) support (CONFIG_LDM_PARTITION) AL2023 no longer supports Windows 2000, Windows XP, or Windows Vista dynamic disks with MS- DOS style partitions. This code did not ever support the newer GPT based dynamic disks introduced with Windows Vista. Macintosh partition map support AL2023 no longer supports the classic Macintosh partition map. Modern macOS versions will create modern GPT partition tables by default over this older type. NFSv2 support AL2023 no longer supports NFSv2, but continues to support NFSv3, NFSv4, NFSv4.1, and NFSv4.2. We recommend that you migrate to NFSv3 or newer. NTFS (CONFIG_NTFS_FS) The ntfs3 code replaced ntfs for accessing NTFS file systems on Amazon Linux as of the 5.10 kernel in AL2. AL2023 no longer includes the ntfs code, and relies exclusively on the ntfs3 code for accessing NTFS file systems. romfs file system The squashfs file system is the successor of the romfs file system in Amazon Linux, and the AL2023 kernel is no longer built with support for romfs. Solaris x86 hard disk partition format AL2023 no longer supports the Solaris x86 hard disk partition format. Kernel Filesystem support 57 Amazon Linux 2023 User Guide squashfszstd compression AL2023 adds support for zstd compressed squashfs file systems on all supported architectures. Sun partition table support AL2023 no longer includes support for the Sun partition table format (CONFIG_SUN_PARTITION). /tmp is now tmpfs Amazon Linux 2023 introduces changes to how /tmp behaves when compared to Amazon Linux 2. The default configuration for AL2 was that both /tmp and /var/tmp were on the root file system. Amazon Linux 2023 defaults to using tmpfs for /tmp with a limit of 50% of RAM and a maximum of one million inodes. These changes bring Amazon Linux in line with the behavior of other Linux distributions. For full details of the file system layout of AL2023, see /tmp and /var/tmp in the Filesystem Layout section. AMI and Container Image changes There have been some changes to the packages included in AMIs and containers. Amazon Linux 2023 introduces a the section called “AL2023 Minimal container image”, and support for building the section called “Building bare-bones AL2023 container images”. For more information, see Using AL2023 in containers. Comparing packages installed on Amazon Linux 2 and Amazon Linux 2023 AMIs A comparison of the RPMs present on the Amazon Linux 2 and AL2023 standard AMIs. Package acl acpid alternatives /tmp changes AL2 AMI 2.2.51 2.0.19 AL2023 AMI 2.3.1 2.0.32 1.15 58 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI amazon-chrony-config amazon-ec2-net-utils amazon-linux-extras amazon-linux-extras- yum-plugin amazon-linux-repo-s3 amazon-linux-sb-keys amazon-rpm-config 2.0.3 2.0.3 amazon-ssm-agent 3.3.987.0 4.3 2.5.1 2023.6.20241031 2023.1 228 3.3.987.0 amd-ucode-firmware 20200421 (noarch) 20210208 (noarch) at attr audit audit-libs authconfig aws-cfn-bootstrap awscli awscli-2 basesystem bash bash-completion 3.1.13 2.4.46 2.8.1 2.8.1 6.2.8 2.0 1.18.147 10.0 4.2.46 2.1 3.1.23 2.5.1 3.0.6 3.0.6 2.0 2.15.30 11 5.2.15 2.11 Amazon Linux 2 and AL2023 AMI comparison 59 Amazon Linux 2023 Package bc bind-export-libs bind-libs bind-libs-lite bind-license bind-utils binutils blktrace AL2 AMI 1.06.95 9.11.4 9.11.4 9.11.4 9.11.4 9.11.4 2.29.1 1.0.5 boost-date-time 1.53.0 (x86_64) boost-filesystem boost-system 1.53.0 (x86_64) boost-thread 1.53.0 (x86_64) bridge-utils bzip2 bzip2-libs 1.5 1.0.6 1.0.6 ca-certificates 2023.2.68 c-ares checkpolicy chkconfig chrony 1.7.4 4.2 User Guide AL2023 AMI 1.07.1 9.18.28 9.18.28 9.18.28 2.39 1.75.0 1.75.0 1.75.0 1.0.8 1.0.8 2023.2.68 1.19.1 3.4 1.15 4.3 Amazon Linux 2 and AL2023 AMI comparison 60 Amazon Linux 2023 Package cloud-init cloud-init-cfg-ec2 cloud-utils-growpart coreutils coreutils-common cpio cracklib cracklib-dicts cronie cronie-anacron crontabs crypto-policies crypto-policies-sc ripts cryptsetup cryptsetup-libs curl curl-minimal cyrus-sasl-lib cyrus-sasl-plain dbus AL2 AMI 19.3 0.31 8.22 2.12 2.9.0 2.9.0 1.4.11 1.4.11 1.11 1.7.4 1.7.4 8.3.0 2.1.26 2.1.26 1.10.24 User Guide AL2023 AMI 22.2.2 22.2.2 0.31 8.32 8.32 2.13 2.9.6 2.9.6 1.11 20220428 20220428 2.6.1 2.6.1 8.5.0 2.1.27 2.1.27 1.12.28 Amazon Linux 2 and AL2023 AMI comparison 61 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI dbus-broker dbus-common dbus-libs device-mapper 1.10.24 1.02.170 device-mapper-event 1.02.170 device-mapper-event- 1.02.170 libs 32 1.12.28 1.12.28 1.02.185 device-mapper-libs 1.02.170 1.02.185 device-mapper-pers 0.7.3 4.2.5 4.2.5 4.2.5 3.3 3.2 1.0.0.rc16 1.0.0.rc16 istent-data dhclient dhcp-common dhcp-libs diffutils dmidecode dmraid dmraid-events dnf dnf-data dnf-plugin-release- notification 3.8 4.14.0 4.14.0 1.2 Amazon Linux 2 and AL2023 AMI comparison 62 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI dnf-plugins-core dnf-plugin-support- info dnf-utils dosfstools 3.0.20 dracut dracut-config-ec2 dracut-config-gene 033 2.0 033 ric dwz dyninst e2fsprogs e2fsprogs-libs ec2-hibinit-agent ec2-instance-connect ec2-instance-conne ct-selinux ec2-net-utils ec2-utils ed 9.3.1 (x86_64) 1.42.9 1.42.9 1.0.8 1.1 1.1 1.7.3 1.2 1.9 efibootmgr 15 (aarch64) 4.3.0 1.2 4.3.0 4.2 055 3.0 055 0.14 10.2.1 1.46.5 1.46.5 1.0.8 1.1 1.1 2.2.0 1.14.2 Amazon Linux 2 and AL2023 AMI comparison 63 Amazon
al2023-ug-024
al2023-ug.pdf
24
3.3 3.2 1.0.0.rc16 1.0.0.rc16 istent-data dhclient dhcp-common dhcp-libs diffutils dmidecode dmraid dmraid-events dnf dnf-data dnf-plugin-release- notification 3.8 4.14.0 4.14.0 1.2 Amazon Linux 2 and AL2023 AMI comparison 62 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI dnf-plugins-core dnf-plugin-support- info dnf-utils dosfstools 3.0.20 dracut dracut-config-ec2 dracut-config-gene 033 2.0 033 ric dwz dyninst e2fsprogs e2fsprogs-libs ec2-hibinit-agent ec2-instance-connect ec2-instance-conne ct-selinux ec2-net-utils ec2-utils ed 9.3.1 (x86_64) 1.42.9 1.42.9 1.0.8 1.1 1.1 1.7.3 1.2 1.9 efibootmgr 15 (aarch64) 4.3.0 1.2 4.3.0 4.2 055 3.0 055 0.14 10.2.1 1.46.5 1.46.5 1.0.8 1.1 1.1 2.2.0 1.14.2 Amazon Linux 2 and AL2023 AMI comparison 63 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI efi-filesystem efi-srpm-macros efivar efivar-libs 31 (aarch64) elfutils-debuginfod- client elfutils-default-y 0.176 ama-scope elfutils-libelf elfutils-libs ethtool expat file file-libs filesystem findutils fipscheck fipscheck-lib fonts-srpm-macros freetype fstrm 0.176 0.176 4.8 2.1.0 5.11 5.11 3.2 4.5.11 1.4.1 1.4.1 2.8 5 5 38 38 0.188 0.188 0.188 0.188 5.15 2.5.0 5.39 5.39 3.14 4.8.0 2.0.5 0.6.1 Amazon Linux 2 and AL2023 AMI comparison 64 Amazon Linux 2023 Package fuse-libs gawk gdbm gdbm-libs gdisk generic-logos GeoIP gettext gettext-libs ghc-srpm-macros glib2 glibc glibc-all-langpacks glibc-common glibc-gconv-extra glibc-locale-source glibc-minimal-lang pack gmp gnupg2 gnupg2-minimal AL2 AMI AL2023 AMI User Guide 2.9.2 4.0.2 1.13 0.8.10 18.0.0 1.5.0 0.19.8.1 0.19.8.1 2.56.1 2.26 2.26 2.26 2.26 2.26 6.0.0 2.0.22 2.9.9 5.1.0 1.19 1.0.8 0.21 0.21 1.5.0 2.74.7 2.34 2.34 2.34 2.34 2.34 6.2.1 2.3.7 Amazon Linux 2 and AL2023 AMI comparison 65 Amazon Linux 2023 Package gnutls go-srpm-macros gpgme gpm-libs grep groff-base grub2 grub2-common AL2 AMI AL2023 AMI User Guide 3.8.0 3.2.0 1.15.1 1.20.7 3.8 1.22.4 2.06 1.3.2 1.20.7 2.20 1.22.2 2.06 2.06 grub2-efi-aa64 2.06 (aarch64) grub2-efi-aa64-ec2 2.06 (aarch64) 2.06 (aarch64) grub2-efi-aa64-mod 2.06 (noarch) ules grub2-efi-x64-ec2 2.06 (x86_64) 2.06 (x86_64) grub2-pc 2.06 (x86_64) grub2-pc-modules 2.06 (noarch) grub2-tools grub2-tools-minimal grubby gssproxy gzip hardlink 2.06 2.06 8.28 0.7.0 1.5 1.3 2.06 2.06 2.06 8.40 0.8.4 1.12 Amazon Linux 2 and AL2023 AMI comparison 66 AL2 AMI AL2023 AMI User Guide 3.23 1.7.0 0.20140811.1 0.20140811.1 0.20140811.1 1.7.0 0.384 6.7 49 10.09 6.10.0 hunspell-en 0.20121024 hunspell-en-GB 0.20121024 hunspell-en-US 0.20121024 hunspell-filesystem 1.1.0 3.13 1.3.2 0.252 5.1 9.49.47 5.10.0 1.8.4 1.8.4 Amazon Linux 2023 Package hibagent hostname hunspell hwdata info inih initscripts iproute iptables iptables-libs iputils irqbalance jansson jbigkit-libs jemalloc jitterentropy 20180629 20210202 1.7.0 2.10 2.0 1.9.0 2.14 5.2.1 3.4.1 Amazon Linux 2 and AL2023 AMI comparison 67 Amazon Linux 2023 User Guide AL2 AMI AL2023 AMI Package jq json-c kbd kbd-legacy kbd-misc kernel 0.11 1.15.5 1.15.5 1.15.5 5.10.228 kernel-libbpf kernel-livepatch-r epo-s3 kernel-srpm-macros kernel-tools 5.10.228 keyutils keyutils-libs kmod kmod-libs kpartx kpatch-runtime krb5-libs langtable langtable-data langtable-python 1.5.8 1.5.8 25 25 0.4.9 0.9.4 1.15.1 0.0.31 0.0.31 0.0.31 1.7.1 0.14 2.4.0 2.4.0 6.1.112 6.1.112 2023.6.20241031 1.0 6.1.112 1.6.3 1.6.3 29 29 0.9.7 1.21.3 Amazon Linux 2 and AL2023 AMI comparison 68 Amazon Linux 2023 User Guide Package less libacl libaio libarchive libargon2 libassuan libattr libbasicobjects libblkid libcap libcap-ng libcbor libcollection libcom_err libcomps libconfig libcroco libcrypt libcurl AL2 AMI 458 2.2.51 0.3.109 2.1.0 2.4.46 0.1.1 2.30.2 2.54 0.7.5 0.7.0 1.42.9 1.4.9 0.6.12 2.26 8.3.0 AL2023 AMI 608 2.3.1 0.3.111 3.7.4 20171227 2.5.5 2.5.1 0.1.1 2.37.4 2.48 0.8.2 0.7.0 0.7.0 1.46.5 0.1.20 1.7.2 libcurl-minimal 8.5.0 Amazon Linux 2 and AL2023 AMI comparison 69 Amazon Linux 2023 Package libdaemon libdb libdb-utils libdhash libdnf libdrm libdwarf libeconf libedit libestr libev libevent libfastjson libfdisk libffi libfido2 libgcc libgcrypt libgomp libgpg-error AL2 AMI AL2023 AMI User Guide 0.14 5.3.21 5.3.21 2.4.97 20130207 (x86_64) 3.0 0.1.9 2.0.21 0.99.4 2.30.2 3.0.13 7.3.1 1.5.3 7.3.1 1.12 5.3.28 0.5.0 0.69.0 0.4.0 3.1 4.33 2.1.12 2.37.4 3.4.4 1.10.0 11.4.1 1.10.2 11.4.1 1.42 Amazon Linux 2 and AL2023 AMI comparison 70 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI libibverbs libicu libidn libidn2 libini_config 50.2 1.28 2.3.0 1.3.1 libjpeg-turbo 2.0.90 libkcapi libkcapi-hmaccalc libldb libmaxminddb libmetalink libmnl libmodulemd 0.1.3 1.0.3 libmount 2.30.2 libnetfilter_connt 1.0.6 rack libnfnetlink libnfsidmap libnghttp2 libnl3 libnl3-cli 1.0.1 0.25 1.41.0 3.2.28 3.2.28 48.0 2.3.2 1.3.1 1.4.0 1.4.0 2.6.2 1.5.2 0.1.3 1.0.4 2.13.0 2.37.4 2.5.4 1.59.0 3.5.0 Amazon Linux 2 and AL2023 AMI comparison 71 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI libpath_utils libpcap 0.2.1 1.5.3 libpciaccess 0.14 (x86_64) libpipeline 1.2.3 libpkgconf libpng libpsl libpwquality libref_array librepo libreport-filesystem libseccomp libselinux libselinux-utils libsemanage libsepol libsigsegv 1.5.13 0.21.5 1.2.3 0.1.5 2.5.2 2.5 2.5 2.5 2.5 libsmartcols 2.30.2 libsolv libss 1.42.9 0.2.1 1.10.1 1.5.3 1.8.0 0.21.1 1.4.4 0.1.5 1.14.5 2.15.2 2.5.3 3.4 3.4 3.4 3.4 2.13 2.37.4 0.7.22 1.46.5 Amazon Linux 2 and AL2023 AMI comparison 72 Amazon Linux 2023 Package libssh2 libsss_certmap libsss_idmap libsss_nss_idmap libsss_sudo libstdc++ libstoragemgmt libstoragemgmt-pyt hon AL2 AMI 1.4.3 1.16.5 1.16.5 7.3.1 1.6.1 1.6.1 libstoragemgmt-pyt 1.6.1 hon-clibs libsysfs libtalloc libtasn1 libtdb libteam libtevent libtextstyle libtiff libtirpc libunistring 2.1.0 4.10 1.27 4.0.3 0.2.4 0.9.3 User Guide AL2023 AMI 2.9.4 2.9.4 2.9.4 2.9.4 11.4.1 1.9.4 2.3.4 4.19.0 1.4.7 0.13.0 0.21 1.3.3 0.9.10 Amazon Linux 2 and AL2023 AMI comparison 73
al2023-ug-025
al2023-ug.pdf
25
2.5 2.5 2.5 2.5 libsmartcols 2.30.2 libsolv libss 1.42.9 0.2.1 1.10.1 1.5.3 1.8.0 0.21.1 1.4.4 0.1.5 1.14.5 2.15.2 2.5.3 3.4 3.4 3.4 3.4 2.13 2.37.4 0.7.22 1.46.5 Amazon Linux 2 and AL2023 AMI comparison 72 Amazon Linux 2023 Package libssh2 libsss_certmap libsss_idmap libsss_nss_idmap libsss_sudo libstdc++ libstoragemgmt libstoragemgmt-pyt hon AL2 AMI 1.4.3 1.16.5 1.16.5 7.3.1 1.6.1 1.6.1 libstoragemgmt-pyt 1.6.1 hon-clibs libsysfs libtalloc libtasn1 libtdb libteam libtevent libtextstyle libtiff libtirpc libunistring 2.1.0 4.10 1.27 4.0.3 0.2.4 0.9.3 User Guide AL2023 AMI 2.9.4 2.9.4 2.9.4 2.9.4 11.4.1 1.9.4 2.3.4 4.19.0 1.4.7 0.13.0 0.21 1.3.3 0.9.10 Amazon Linux 2 and AL2023 AMI comparison 73 AL2 AMI AL2023 AMI User Guide Amazon Linux 2023 Package libuser libutempter libuuid libuv libverto libverto-libev libverto-libevent libwebp libxcrypt libxml2 libxml2-python libyaml libzstd linux-firmware-whe nce 0.60 1.1.6 2.30.2 0.2.5 0.2.5 0.3.0 2.9.1 2.9.1 0.1.4 lm_sensors-libs 3.4.0 lmdb-libs logrotate lsof lua lua-libs 3.8.6 4.87 5.1.4 0.63 1.2.1 2.37.4 1.47.0 0.3.2 0.3.2 4.4.33 2.10.4 0.2.5 1.5.5 20210208 (noarch) 3.6.0 0.9.29 3.20.1 4.94.0 5.4.4 Amazon Linux 2 and AL2023 AMI comparison 74 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI lua-srpm-macros 1 lvm2 lvm2-libs lz4 lz4-libs make man-db man-pages man-pages-overrides mariadb-libs mdadm 2.02.187 2.02.187 1.7.5 3.82 2.6.3 3.53 7.5.2 5.5.68 4.0 1.9.4 2.9.3 5.10 microcode_ctl 2.1 (x86_64) 2.1 (x86_64) mlocate mpfr mtr nano ncurses ncurses-base ncurses-libs nettle 0.26 0.92 2.9.8 6.0 6.0 6.0 2.7.1 4.1.0 5.8 6.2 6.2 6.2 3.8 Amazon Linux 2 and AL2023 AMI comparison 75 Amazon Linux 2023 Package net-tools newt newt-python nfs-utils npth nspr nss nss-pem nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util ntsysv numactl-libs ocaml-srpm-macros oniguruma openblas-srpm-macros openldap openssh AL2 AMI 2.0 0.52.15 0.52.15 1.3.0 4.35.0 3.90.0 1.0.3 3.90.0 3.90.0 3.90.0 3.90.0 3.90.0 1.7.4 2.0.9 2.4.44 7.4p1 User Guide AL2023 AMI 2.0 0.52.21 2.5.4 1.6 4.35.0 3.90.0 3.90.0 3.90.0 3.90.0 3.90.0 1.15 2.0.14 6 6.9.7.1 2 2.4.57 8.7p1 Amazon Linux 2 and AL2023 AMI comparison 76 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI openssh-clients openssh-server openssl openssl-libs openssl-pkcs11 os-prober p11-kit p11-kit-trust package-notes-srpm- macros pam parted passwd pciutils pciutils-libs pcre pcre2 pcre2-syntax perl perl-Carp perl-Class-Struct 7.4p1 7.4p1 1.0.2k 1.0.2k 1.58 0.23.22 0.23.22 1.1.8 3.1 0.79 3.5.1 3.5.1 8.32 10.23 5.16.3 1.26 8.7p1 8.7p1 3.0.8 3.0.8 0.4.12 1.77 0.24.1 0.24.1 0.4 1.5.1 3.4 0.80 3.7.0 3.7.0 10.40 10.40 1.50 0.66 Amazon Linux 2 and AL2023 AMI comparison 77 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI perl-constant 1.27 perl-DynaLoader perl-Encode 2.51 perl-Errno perl-Exporter 5.68 perl-Fcntl perl-File-Basename perl-File-Path 2.09 perl-File-stat 1.33 1.47 3.15 1.30 5.74 1.13 2.85 2.18 1.09 perl-File-Temp 0.23.01 0.231.100 perl-Filter perl-Getopt-Long perl-Getopt-Std 1.49 2.40 perl-HTTP-Tiny 0.033 perl-if perl-interpreter perl-IO perl-IPC-Open3 perl-libs perl-macros 5.16.3 5.16.3 2.52 1.12 0.078 0.60.800 5.32.1 1.43 1.21 5.32.1 Amazon Linux 2 and AL2023 AMI comparison 78 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI perl-MIME-Base64 perl-mro perl-overload perl-overloading perl-parent perl-PathTools perl-Pod-Escapes perl-podlators perl-Pod-Perldoc perl-Pod-Simple perl-Pod-Usage perl-POSIX 0.225 3.40 1.04 2.5.1 3.20 3.28 1.63 perl-Scalar-List-U 1.27 tils perl-SelectSaver perl-Socket 2.010 perl-srpm-macros perl-Storable 2.45 perl-subs perl-Symbol perl-Term-ANSIColor 3.16 1.23 1.31 0.02 0.238 3.78 1.07 4.14 3.28.01 3.42 2.01 1.94 1.56 1.02 2.032 1 3.21 1.03 1.08 5.01 Amazon Linux 2 and AL2023 AMI comparison 79 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI perl-Term-Cap perl-Text-ParseWords 3.29 perl-Text-Tabs+Wrap perl-threads perl-threads-shared perl-Time-HiRes perl-Time-Local perl-vars pinentry pkgconf pkgconfig pkgconf-m4 pkgconf-pkg-config plymouth plymouth-core-libs plymouth-scripts pm-utils policycoreutils policycoreutils-py thon-utils popt 1.87 1.43 1.9725 1.2300 0.8.1 0.27.1 0.8.9 0.8.9 0.8.9 1.4.1 2.5 1.13 1.17 3.30 2021.0726 1.300 1.05 1.8.0 1.8.0 1.8.0 3.4 3.4 1.18 Amazon Linux 2 and AL2023 AMI comparison 80 Amazon Linux 2023 Package postfix procps-ng protobuf-c psacct psmisc pth AL2 AMI 2.10.1 3.3.10 6.6.1 22.20 2.0.7 User Guide AL2023 AMI 3.3.17 1.4.1 6.6.4 23.4 publicsuffix-list- 20240208 20240212 dafsa pygpgme pyliblzma pystache python python2-botocore python2-colorama python2-cryptography python2-dateutil python2-futures python2-jmespath python2-jsonschema python2-oauthlib python2-pyasn1 0.3 0.5.3 0.5.3 2.7.18 1.18.6 0.3.9 1.7.2 2.6.1 3.0.5 0.9.3 2.5.1 2.0.1 0.1.9 Amazon Linux 2 and AL2023 AMI comparison 81 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI 4.11.3 3.4.1 0.3.3 41.2.0 1.11.0 3.7.16 python2-rpm python2-rsa python2-s3transfer python2-setuptools python2-six python3 python3-attrs python3-audit python3-awscrt python3-babel python3-cffi python3-chardet python3-colorama python3-configobj python3-cryptography python3-daemon 2.2.3 python3-dateutil python3-dbus python3-distro python3-dnf 3.9.16 20.3.0 3.0.6 0.19.19 2.9.1 1.14.5 4.0.0 0.4.4 5.0.6 36.0.1 2.3.0 2.8.1 1.2.18 1.5.0 4.14.0 Amazon Linux 2 and AL2023 AMI comparison 82 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI python3-dnf-plugins- core python3-docutils 0.14 python3-gpg python3-hawkey python3-idna python3-jinja2 python3-jmespath python3-jsonpatch python3-jsonpointer python3-jsonschema python3-libcomps python3-libdnf python3-libs 3.7.16 python3-libselinux python3-libsemanage python3-libstorage mgmt python3-lockfile 0.11.0 python3-markupsafe python3-netifaces 4.3.0 0.16 1.15.1 0.69.0 2.10 2.11.3 0.10.0 1.21 2.0 3.2.0 0.1.20 0.69.0 3.9.16 3.4 3.4 1.9.4 0.12.2 1.1.1 0.10.6 Amazon Linux 2 and AL2023 AMI comparison 83 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI python3-oauthlib python3-pip 20.2.2 python3-pip-wheel python3-ply python3-policycore utils python3-prettytable python3-prompt-too lkit python3-pycparser python3-pyrsistent python3-pyserial python3-pysocks python3-pystache 0.5.4 python3-pytz python3-pyyaml python3-requests python3-rpm python3-ruamel-yaml python3-ruamel-yaml- clib 3.0.2 21.3.1 3.11 3.4
al2023-ug-026
al2023-ug.pdf
26
comparison 82 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI python3-dnf-plugins- core python3-docutils 0.14 python3-gpg python3-hawkey python3-idna python3-jinja2 python3-jmespath python3-jsonpatch python3-jsonpointer python3-jsonschema python3-libcomps python3-libdnf python3-libs 3.7.16 python3-libselinux python3-libsemanage python3-libstorage mgmt python3-lockfile 0.11.0 python3-markupsafe python3-netifaces 4.3.0 0.16 1.15.1 0.69.0 2.10 2.11.3 0.10.0 1.21 2.0 3.2.0 0.1.20 0.69.0 3.9.16 3.4 3.4 1.9.4 0.12.2 1.1.1 0.10.6 Amazon Linux 2 and AL2023 AMI comparison 83 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI python3-oauthlib python3-pip 20.2.2 python3-pip-wheel python3-ply python3-policycore utils python3-prettytable python3-prompt-too lkit python3-pycparser python3-pyrsistent python3-pyserial python3-pysocks python3-pystache 0.5.4 python3-pytz python3-pyyaml python3-requests python3-rpm python3-ruamel-yaml python3-ruamel-yaml- clib 3.0.2 21.3.1 3.11 3.4 0.7.2 3.0.24 2.20 0.17.3 3.4 1.7.1 2022.7.1 5.4.1 2.25.1 4.16.1.3 0.16.6 0.1.2 Amazon Linux 2 and AL2023 AMI comparison 84 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI 4.4.1 59.6.0 59.6.0 1.15.0 235 1.25.10 0.2.5 0.13.1 python3-setools python3-setuptools 49.1.3 python3-setuptools- wheel python3-simplejson 3.2.0 python3-six python3-systemd python3-urllib3 python3-wcwidth python-babel python-backports 0.9.6 1.0 python-backports-s 3.5.0.1 sl_match_hostname python-cffi python-chardet python-chevron python-configobj python-daemon python-devel python-docutils python-enum34 1.6.0 2.2.1 4.7.2 1.6 2.7.18 0.12 1.0.4 Amazon Linux 2 and AL2023 AMI comparison 85 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI python-idna python-iniparse python-ipaddress python-jinja2 python-jsonpatch python-jsonpointer python-jwcrypto python-kitchen 2.4 0.4 1.0.16 2.7.2 1.2 1.9 0.4.2 1.1.1 python-libs 2.7.18 python-lockfile python-markupsafe python-pillow python-ply python-pycparser 0.9.1 0.11 2.0.0 3.4 2.14 python-pycurl 7.19.0 python-repoze-lru python-requests python-simplejson 0.4 2.6.0 3.2.0 python-srpm-macros 3.9 python-urlgrabber 3.10 Amazon Linux 2 and AL2023 AMI comparison 86 Amazon Linux 2023 Package python-urllib3 pyxattr PyYAML qrencode-libs quota quota-nls rdate readline rng-tools rootfiles rpcbind rpm rpm-build-libs rpm-libs rpm-plugin-selinux AL2 AMI 1.25.9 0.5.1 3.10 3.4.1 4.01 4.01 1.4 6.2 6.8 8.1 0.2.0 4.11.3 4.11.3 4.11.3 rpm-plugin-systemd- 4.11.3 inhibit rpm-sign-libs rsync rsyslog rust-srpm-macros 3.1.2 8.24.0 User Guide AL2023 AMI 4.06 4.06 8.1 6.14 8.1 1.2.6 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 3.2.6 21 Amazon Linux 2 and AL2023 AMI comparison 87 Amazon Linux 2023 User Guide Package AL2 AMI AL2023 AMI sbsigntools scl-utils 20130529 screen sed selinux-policy 4.1.0 4.2.2 3.13.1 selinux-policy-tar 3.13.1 geted setserial setup setuptool sgpio shadow-utils shared-mime-info slang sqlite sqlite-libs 2.17 2.8.71 1.19.11 1.2.0.10 4.1.5.1 1.8 2.2.4 3.7.17 sssd-client 1.16.5 sssd-common sssd-kcm sssd-nfs-idmap strace 4.26 0.9.4 4.8.0 4.8 38.1.45 38.1.45 2.13.7 4.9 2.3.2 3.40.0 2.9.4 2.9.4 2.9.4 2.9.4 6.8 Amazon Linux 2 and AL2023 AMI comparison 88 AL2 AMI AL2023 AMI User Guide Amazon Linux 2023 Package sudo sysctl-defaults sysstat systemd systemd-libs systemd-networkd systemd-pam systemd-resolved 1.8.23 1.0 10.1.5 219 219 systemd-sysv 219 systemd-udev system-release systemtap-runtime sysvinit-tools tar tbb tcp_wrappers tcp_wrappers-libs tcpdump tcsh teamd 2 4.5 2.88 1.26 7.6 7.6 4.9.2 6.18.01 1.27 1.9.15 1.0 12.5.6 252.23 252.23 252.23 252.23 252.23 252.23 2023.6.20241031 4.8 1.34 2020.3 4.99.1 6.24.07 Amazon Linux 2 and AL2023 AMI comparison 89 Amazon Linux 2023 Package time traceroute tzdata unzip update-motd usermode userspace-rcu ustr util-linux util-linux-core vim-common vim-data vim-enhanced vim-filesystem vim-minimal virt-what wget which words xfsdump AL2 AMI AL2023 AMI User Guide 1.7 2.0.22 2024a 6.0 1.1.2 1.111 1.0.4 2.30.2 9.0.2153 9.0.2153 9.0.2153 9.0.2153 9.0.2153 1.18 1.14 2.20 3.0 3.1.8 1.9 2.1.3 2024a 6.0 2.2 0.12.1 2.37.4 2.37.4 9.0.2153 9.0.2153 9.0.2153 9.0.2153 9.0.2153 1.21.3 2.21 3.0 3.1.11 Amazon Linux 2 and AL2023 AMI comparison 90 Amazon Linux 2023 Package xfsprogs xxd xxhash-libs xz xz-libs yajl yum yum-langpacks yum-metadata-parser AL2 AMI 5.0.0 9.0.2153 5.2.2 5.2.2 2.0.4 3.4.3 0.4.2 1.1.4 yum-plugin-priorit 1.1.31 1.1.31 3.0 1.2.7 ies yum-utils zip zlib zram-generator zram-generator-def aults zstd User Guide AL2023 AMI 5.18.0 9.0.2153 0.8.0 5.2.5 5.2.5 4.14.0 3.0 1.2.11 1.1.2 1.1.2 1.5.5 Comparing packages installed on Amazon Linux 2 and Amazon Linux 2023 Minimal AMIs A comparison of the RPMs present on the Amazon Linux 2 and AL2023 Minimal AMIs. Amazon Linux 2 and AL2023 Minimal AMI comparison 91 Amazon Linux 2023 Package acl User Guide AL2 Minimal AL2023 Minimal 2.2.51 alternatives amazon-chrony-config amazon-ec2-net-utils amazon-linux-extras 2.0.3 amazon-linux-repo-s3 amazon-linux-sb-keys 1.15 4.3 2.5.1 2023.6.20241031 2023.1 amd-ucode-firmware 20200421 (noarch) 20210208 (noarch) audit audit-libs authconfig awscli-2 basesystem bash bind-export-libs bzip2-libs 2.8.1 2.8.1 6.2.8 10.0 4.2.46 9.11.4 1.0.6 ca-certificates 2023.2.68 checkpolicy chkconfig chrony 1.7.4 4.2 3.0.6 3.0.6 2.15.30 11 5.2.15 1.0.8 2023.2.68 3.4 4.3 Amazon Linux 2 and AL2023 Minimal AMI comparison 92 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal 19.3 0.31 8.22 2.12 2.9.0 2.9.0 1.4.11 1.4.11 1.11 1.7.4 8.3.0 2.1.26 1.10.24 cloud-init cloud-init-cfg-ec2 cloud-utils-growpart coreutils coreutils-common cpio cracklib cracklib-dicts cronie cronie-anacron crontabs crypto-policies cryptsetup-libs curl curl-minimal cyrus-sasl-lib dbus dbus-broker dbus-common dbus-libs 1.10.24 22.2.2 22.2.2 0.31 8.32 8.32 2.13 2.9.6 2.9.6 20220428 2.6.1 8.5.0 2.1.27 1.12.28 32 1.12.28 1.12.28 Amazon Linux 2 and AL2023 Minimal AMI comparison 93 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal device-mapper 1.02.170 device-mapper-libs 1.02.170 1.02.185 1.02.185 dhclient dhcp-common dhcp-libs diffutils dnf dnf-data dnf-plugin-release- notification dnf-plugins-core dnf-plugin-support- info dracut dracut-config-ec2 dracut-config-gene ric e2fsprogs e2fsprogs-libs ec2-utils 4.2.5 4.2.5 4.2.5 3.3 033 2.0 033 1.42.9 1.42.9 1.2 efibootmgr 15 (aarch64) 3.8 4.14.0 4.14.0 1.2 4.3.0 1.2 055 3.0 055 1.46.5 1.46.5
al2023-ug-027
al2023-ug.pdf
27
coreutils-common cpio cracklib cracklib-dicts cronie cronie-anacron crontabs crypto-policies cryptsetup-libs curl curl-minimal cyrus-sasl-lib dbus dbus-broker dbus-common dbus-libs 1.10.24 22.2.2 22.2.2 0.31 8.32 8.32 2.13 2.9.6 2.9.6 20220428 2.6.1 8.5.0 2.1.27 1.12.28 32 1.12.28 1.12.28 Amazon Linux 2 and AL2023 Minimal AMI comparison 93 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal device-mapper 1.02.170 device-mapper-libs 1.02.170 1.02.185 1.02.185 dhclient dhcp-common dhcp-libs diffutils dnf dnf-data dnf-plugin-release- notification dnf-plugins-core dnf-plugin-support- info dracut dracut-config-ec2 dracut-config-gene ric e2fsprogs e2fsprogs-libs ec2-utils 4.2.5 4.2.5 4.2.5 3.3 033 2.0 033 1.42.9 1.42.9 1.2 efibootmgr 15 (aarch64) 3.8 4.14.0 4.14.0 1.2 4.3.0 1.2 055 3.0 055 1.46.5 1.46.5 2.2.0 Amazon Linux 2 and AL2023 Minimal AMI comparison 94 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal efi-filesystem efivar efivar-libs 31 (aarch64) elfutils-default-y 0.176 ama-scope elfutils-libelf elfutils-libs expat file file-libs filesystem findutils fipscheck fipscheck-lib freetype fuse-libs gawk gdbm gdbm-libs gdisk gettext 0.176 0.176 2.1.0 5.11 5.11 3.2 4.5.11 1.4.1 1.4.1 2.8 2.9.2 4.0.2 1.13 0.8.10 0.19.8.1 5 38 38 0.188 0.188 0.188 2.5.0 5.39 5.39 3.14 4.8.0 2.9.9 5.1.0 1.19 1.0.8 0.21 Amazon Linux 2 and AL2023 Minimal AMI comparison 95 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal gettext-libs glib2 glibc glibc-all-langpacks glibc-common glibc-locale-source glibc-minimal-lang pack gmp gnupg2 gnupg2-minimal gnutls gpgme grep groff-base grub2 grub2-common 0.19.8.1 2.56.1 2.26 2.26 2.26 2.26 2.26 6.0.0 2.0.22 1.3.2 2.20 1.22.2 2.06 2.06 0.21 2.74.7 2.34 2.34 2.34 2.34 6.2.1 2.3.7 3.8.0 1.15.1 3.8 1.22.4 2.06 grub2-efi-aa64 2.06 (aarch64) grub2-efi-aa64-ec2 2.06 (aarch64) 2.06 (aarch64) grub2-efi-aa64-mod 2.06 (noarch) ules Amazon Linux 2 and AL2023 Minimal AMI comparison 96 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal grub2-efi-x64-ec2 2.06 (x86_64) 2.06 (x86_64) grub2-pc 2.06 (x86_64) grub2-pc-modules 2.06 (noarch) grub2-tools grub2-tools-minimal grubby gzip hardlink hostname hwdata info inih initscripts iproute iptables iptables-libs 2.06 2.06 8.28 1.5 1.3 3.13 5.1 9.49.47 5.10.0 1.8.4 1.8.4 2.06 2.06 2.06 8.40 1.12 3.23 0.384 49 10.09 6.10.0 iputils 20180629 20210202 irqbalance 1.7.0 jansson jitterentropy 1.9.0 2.14 3.4.1 Amazon Linux 2 and AL2023 Minimal AMI comparison 97 Amazon Linux 2023 User Guide Package jq json-c kbd kbd-misc kernel kernel-libbpf kernel-livepatch-r epo-s3 keyutils-libs kmod kmod-libs kpartx krb5-libs less libacl libarchive libargon2 libassuan libattr libblkid libcap AL2 Minimal AL2023 Minimal 1.7.1 0.14 2.4.0 2.4.0 6.1.112 6.1.112 2023.6.20241031 1.6.3 29 29 1.21.3 608 2.3.1 3.7.4 20171227 2.5.5 2.5.1 2.37.4 2.48 4.14.355 1.5.8 25 25 0.4.9 1.15.1 458 2.2.51 2.1.0 2.4.46 2.30.2 2.54 Amazon Linux 2 and AL2023 Minimal AMI comparison 98 Amazon Linux 2023 Package libcap-ng libcbor AL2 Minimal AL2023 Minimal User Guide 0.7.5 libcom_err 1.42.9 libcomps libcroco libcrypt libcurl libcurl-minimal libdb libdb-utils libdnf libeconf libedit libestr libfastjson libfdisk libffi libfido2 libgcc libgcrypt 0.6.12 2.26 8.3.0 5.3.21 5.3.21 3.0 0.1.9 0.99.4 2.30.2 3.0.13 7.3.1 1.5.3 0.8.2 0.7.0 1.46.5 0.1.20 8.5.0 5.3.28 0.69.0 0.4.0 3.1 2.37.4 3.4.4 1.10.0 11.4.1 1.10.2 Amazon Linux 2 and AL2023 Minimal AMI comparison 99 AL2 Minimal AL2023 Minimal User Guide Amazon Linux 2023 Package libgomp libgpg-error libicu libidn libidn2 libkcapi libkcapi-hmaccalc libmetalink libmnl libmodulemd 7.3.1 1.12 50.2 1.28 2.3.0 0.1.3 1.0.3 libmount 2.30.2 libnetfilter_connt 1.0.6 rack libnfnetlink libnghttp2 libpcap libpipeline libpng libpsl libpwquality librepo 1.0.1 1.41.0 1.5.3 1.2.3 1.5.13 0.21.5 1.2.3 11.4.1 1.42 2.3.2 1.4.0 1.4.0 1.0.4 2.13.0 2.37.4 1.59.0 1.5.3 0.21.1 1.4.4 1.14.5 Amazon Linux 2 and AL2023 Minimal AMI comparison 100 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal libreport-filesystem libseccomp libselinux libselinux-utils libsemanage libsepol libsigsegv 2.5.2 2.5 2.5 2.5 2.5 libsmartcols 2.30.2 libsolv libss libssh2 libstdc++ libsysfs libtasn1 libtextstyle libunistring libuser libutempter libuuid libverto 1.42.9 1.4.3 7.3.1 2.1.0 4.10 0.9.3 0.60 1.1.6 2.30.2 0.2.5 2.15.2 2.5.3 3.4 3.4 3.4 3.4 2.13 2.37.4 0.7.22 1.46.5 11.4.1 4.19.0 0.21 0.9.10 0.63 1.2.1 2.37.4 0.3.2 Amazon Linux 2 and AL2023 Minimal AMI comparison 101 Amazon Linux 2023 Package libxcrypt libxml2 libyaml libzstd AL2 Minimal AL2023 Minimal User Guide 2.9.1 0.1.4 4.4.33 2.10.4 0.2.5 1.5.5 linux-firmware-whe 20210208 (noarch) nce logrotate lua lua-libs lz4 lz4-libs make man-db mariadb-libs 3.8.6 5.1.4 1.7.5 3.82 2.6.3 5.5.68 3.20.1 5.4.4 1.9.4 2.9.3 microcode_ctl 2.1 (x86_64) 2.1 (x86_64) mpfr ncurses ncurses-base ncurses-libs nettle net-tools 6.0 6.0 6.0 2.7.1 2.0 4.1.0 6.2 6.2 6.2 3.8 2.0 Amazon Linux 2 and AL2023 Minimal AMI comparison 102 Amazon Linux 2023 Package newt newt-python npth nspr nss nss-pem nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util numactl-libs oniguruma openldap openssh openssh-clients openssh-server openssl openssl-libs openssl-pkcs11 AL2 Minimal AL2023 Minimal User Guide 0.52.15 0.52.15 4.35.0 3.90.0 1.0.3 3.90.0 3.90.0 3.90.0 3.90.0 3.90.0 2.0.9 2.4.44 7.4p1 7.4p1 7.4p1 1.0.2k 1.0.2k 1.6 2.0.14 6.9.7.1 2.4.57 8.7p1 8.7p1 8.7p1 3.0.8 3.0.8 0.4.12 Amazon Linux 2 and AL2023 Minimal AMI comparison 103 Amazon Linux 2023 Package os-prober p11-kit p11-kit-trust pam passwd pciutils pciutils-libs pcre pcre2 pcre2-syntax pinentry pkgconfig policycoreutils popt postfix procps-ng psmisc pth AL2 Minimal AL2023 Minimal User Guide 1.58 0.23.22 0.23.22 1.1.8 0.79 8.32 10.23 0.8.1 0.27.1 2.5 1.13 2.10.1 3.3.10 22.20 2.0.7 1.77 0.24.1 0.24.1 1.5.1 0.80
al2023-ug-028
al2023-ug.pdf
28
nss-util numactl-libs oniguruma openldap openssh openssh-clients openssh-server openssl openssl-libs openssl-pkcs11 AL2 Minimal AL2023 Minimal User Guide 0.52.15 0.52.15 4.35.0 3.90.0 1.0.3 3.90.0 3.90.0 3.90.0 3.90.0 3.90.0 2.0.9 2.4.44 7.4p1 7.4p1 7.4p1 1.0.2k 1.0.2k 1.6 2.0.14 6.9.7.1 2.4.57 8.7p1 8.7p1 8.7p1 3.0.8 3.0.8 0.4.12 Amazon Linux 2 and AL2023 Minimal AMI comparison 103 Amazon Linux 2023 Package os-prober p11-kit p11-kit-trust pam passwd pciutils pciutils-libs pcre pcre2 pcre2-syntax pinentry pkgconfig policycoreutils popt postfix procps-ng psmisc pth AL2 Minimal AL2023 Minimal User Guide 1.58 0.23.22 0.23.22 1.1.8 0.79 8.32 10.23 0.8.1 0.27.1 2.5 1.13 2.10.1 3.3.10 22.20 2.0.7 1.77 0.24.1 0.24.1 1.5.1 0.80 3.7.0 3.7.0 10.40 10.40 3.4 1.18 3.3.17 23.4 publicsuffix-list- 20240208 20240212 dafsa pygpgme 0.3 Amazon Linux 2 and AL2023 Minimal AMI comparison 104 Amazon Linux 2023 Package pyliblzma python python2-cryptography python2-jsonschema python2-oauthlib python2-pyasn1 python2-rpm python2-setuptools python2-six python3 python3-attrs python3-audit python3-awscrt python3-babel python3-cffi python3-chardet python3-colorama python3-configobj python3-cryptography python3-dateutil AL2 Minimal AL2023 Minimal User Guide 0.5.3 2.7.18 1.7.2 2.5.1 2.0.1 0.1.9 4.11.3 41.2.0 1.11.0 3.9.16 20.3.0 3.0.6 0.19.19 2.9.1 1.14.5 4.0.0 0.4.4 5.0.6 36.0.1 2.8.1 Amazon Linux 2 and AL2023 Minimal AMI comparison 105 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal python3-dbus python3-distro python3-dnf python3-dnf-plugins- core python3-docutils python3-gpg python3-hawkey python3-idna python3-jinja2 python3-jmespath python3-jsonpatch python3-jsonpointer python3-jsonschema python3-libcomps python3-libdnf python3-libs python3-libselinux python3-libsemanage python3-markupsafe python3-netifaces 1.2.18 1.5.0 4.14.0 4.3.0 0.16 1.15.1 0.69.0 2.10 2.11.3 0.10.0 1.21 2.0 3.2.0 0.1.20 0.69.0 3.9.16 3.4 3.4 1.1.1 0.10.6 Amazon Linux 2 and AL2023 Minimal AMI comparison 106 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal python3-oauthlib python3-pip-wheel python3-ply python3-policycore utils python3-prettytable python3-prompt-too lkit python3-pycparser python3-pyrsistent python3-pyserial python3-pysocks python3-pytz python3-pyyaml python3-requests python3-rpm python3-ruamel-yaml python3-ruamel-yaml- clib python3-setools python3-setuptools 3.0.2 21.3.1 3.11 3.4 0.7.2 3.0.24 2.20 0.17.3 3.4 1.7.1 2022.7.1 5.4.1 2.25.1 4.16.1.3 0.16.6 0.1.2 4.4.1 59.6.0 Amazon Linux 2 and AL2023 Minimal AMI comparison 107 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal 59.6.0 1.15.0 235 1.25.10 0.2.5 python3-setuptools- wheel python3-six python3-systemd python3-urllib3 python3-wcwidth python-babel python-backports 0.9.6 1.0 python-backports-s 3.5.0.1 sl_match_hostname python-cffi python-chardet python-configobj python-devel python-enum34 python-idna python-iniparse python-ipaddress python-jinja2 python-jsonpatch python-jsonpointer 1.6.0 2.2.1 4.7.2 2.7.18 1.0.4 2.4 0.4 1.0.16 2.7.2 1.2 1.9 Amazon Linux 2 and AL2023 Minimal AMI comparison 108 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal python-jwcrypto python-libs python-markupsafe python-ply python-pycparser 0.4.2 2.7.18 0.11 3.4 2.14 python-pycurl 7.19.0 python-repoze-lru python-requests python-urlgrabber 0.4 2.6.0 3.10 python-urllib3 1.25.9 pyxattr PyYAML qrencode-libs readline rng-tools rootfiles rpm rpm-build-libs rpm-libs rpm-plugin-selinux 0.5.1 3.10 3.4.1 6.2 6.8 8.1 4.11.3 4.11.3 4.11.3 8.1 6.14 8.1 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 Amazon Linux 2 and AL2023 Minimal AMI comparison 109 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal rpm-plugin-systemd- 4.11.3 inhibit rpm-sign-libs rsyslog 8.24.0 sbsigntools sed selinux-policy 4.2.2 3.13.1 selinux-policy-tar 3.13.1 geted setup shadow-utils shared-mime-info slang sqlite sqlite-libs sudo sysctl-defaults systemd systemd-libs systemd-networkd systemd-pam 2.8.71 4.1.5.1 1.8 2.2.4 3.7.17 1.8.23 1.0 219 219 4.16.1.3 4.16.1.3 0.9.4 4.8 38.1.45 38.1.45 2.13.7 4.9 3.40.0 1.9.15 1.0 252.23 252.23 252.23 252.23 Amazon Linux 2 and AL2023 Minimal AMI comparison 110 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal systemd-resolved systemd-sysv 219 systemd-udev system-release sysvinit-tools tar tcp_wrappers-libs tzdata update-motd userspace-rcu ustr util-linux util-linux-core vim-data vim-minimal which xfsprogs xz xz-libs yum 2 2.88 1.26 7.6 2024a 1.1.2 1.0.4 2.30.2 9.0.2153 9.0.2153 2.20 5.0.0 5.2.2 5.2.2 3.4.3 252.23 252.23 2023.6.20241031 1.34 2024a 2.2 0.12.1 2.37.4 2.37.4 9.0.2153 9.0.2153 2.21 5.18.0 5.2.5 5.2.5 4.14.0 Amazon Linux 2 and AL2023 Minimal AMI comparison 111 Amazon Linux 2023 User Guide Package AL2 Minimal AL2023 Minimal yum-metadata-parser 1.1.4 yum-plugin-priorit 1.1.31 1.2.7 ies zlib zram-generator zram-generator-def aults zstd 1.2.11 1.1.2 1.1.2 1.5.5 Comparing packages installed on Amazon Linux 2 and Amazon Linux 2023 base container images A comparison of the RPMs present on the Amazon Linux 2 and AL2023 base container images. Package AL2 Container AL2023 Container alternatives 1.15 amazon-linux-extras 2.0.3 amazon-linux-repo- 2023.6.20241031 cdn audit-libs basesystem bash bzip2-libs 10.0 4.2.46 1.0.6 3.0.6 11 5.2.15 1.0.8 Amazon Linux 2 and AL2023 Container comparison 112 Amazon Linux 2023 User Guide Package AL2 Container AL2023 Container ca-certificates 2023.2.68 2023.2.68 1.7.4 8.22 2.12 8.3.0 2.1.26 3.3 chkconfig coreutils coreutils-single cpio crypto-policies curl curl-minimal cyrus-sasl-lib diffutils dnf dnf-data elfutils-default-y ama-scope elfutils-libelf 0.176 elfutils-libs expat file-libs filesystem findutils gawk 2.1.0 5.11 3.2 4.5.11 4.0.2 8.32 20220428 8.5.0 4.14.0 4.14.0 0.188 0.188 0.188 2.5.0 5.39 3.14 5.1.0 Amazon Linux 2 and AL2023 Container comparison 113 Amazon Linux 2023 Package gdbm gdbm-libs glib2 glibc glibc-common glibc-langpack-en glibc-minimal-lang pack gmp gnupg2 gnupg2-minimal gpgme grep info json-c keyutils-libs krb5-libs libacl libarchive libassuan libattr AL2 Container AL2023 Container User Guide 1.13 2.56.1 2.26 2.26 2.26 2.26 6.0.0 2.0.22 1.3.2 2.20 5.1 1.5.8 1.15.1 2.2.51 2.1.0 2.4.46 1.19 2.74.7 2.34 2.34 2.34 6.2.1 2.3.7 1.15.1 3.8 0.14 1.6.3 1.21.3 2.3.1 3.7.4 2.5.5 2.5.1 Amazon Linux 2 and AL2023 Container comparison 114 AL2 Container AL2023 Container User Guide Amazon Linux 2023 Package libblkid libcap libcap-ng 2.30.2
al2023-ug-029
al2023-ug.pdf
29
0.188 0.188 0.188 2.5.0 5.39 3.14 5.1.0 Amazon Linux 2 and AL2023 Container comparison 113 Amazon Linux 2023 Package gdbm gdbm-libs glib2 glibc glibc-common glibc-langpack-en glibc-minimal-lang pack gmp gnupg2 gnupg2-minimal gpgme grep info json-c keyutils-libs krb5-libs libacl libarchive libassuan libattr AL2 Container AL2023 Container User Guide 1.13 2.56.1 2.26 2.26 2.26 2.26 6.0.0 2.0.22 1.3.2 2.20 5.1 1.5.8 1.15.1 2.2.51 2.1.0 2.4.46 1.19 2.74.7 2.34 2.34 2.34 6.2.1 2.3.7 1.15.1 3.8 0.14 1.6.3 1.21.3 2.3.1 3.7.4 2.5.5 2.5.1 Amazon Linux 2 and AL2023 Container comparison 114 AL2 Container AL2023 Container User Guide Amazon Linux 2023 Package libblkid libcap libcap-ng 2.30.2 2.54 libcom_err 1.42.9 libcomps libcrypt libcurl libcurl-minimal libdb libdb-utils libdnf libffi libgcc libgcrypt libgomp libgpg-error libidn2 libmetalink libmodulemd 2.26 8.3.0 5.3.21 5.3.21 3.0.13 7.3.1 1.5.3 1.12 2.3.0 0.1.3 libmount 2.30.2 2.37.4 2.48 0.8.2 1.46.5 0.1.20 8.5.0 0.69.0 3.4.4 11.4.1 1.10.2 11.4.1 1.42 2.3.2 2.13.0 2.37.4 Amazon Linux 2 and AL2023 Container comparison 115 Amazon Linux 2023 User Guide Package AL2 Container AL2023 Container libnghttp2 libpsl librepo libreport-filesystem libselinux libsepol libsigsegv libsmartcols libsolv libssh2 libstdc++ libtasn1 libunistring libuuid libverto libxcrypt libxml2 libyaml libzstd lua 1.41.0 0.21.5 2.5 2.5 1.4.3 7.3.1 4.10 0.9.3 2.30.2 0.2.5 2.9.1 5.1.4 1.59.0 0.21.1 1.14.5 2.15.2 3.4 3.4 2.13 2.37.4 0.7.22 11.4.1 4.19.0 0.9.10 2.37.4 0.3.2 4.4.33 2.10.4 0.2.5 1.5.5 Amazon Linux 2 and AL2023 Container comparison 116 Amazon Linux 2023 Package lua-libs lz4-libs mpfr ncurses ncurses-base ncurses-libs npth nspr nss nss-pem nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util openldap openssl-libs p11-kit p11-kit-trust pcre AL2 Container AL2023 Container User Guide 5.4.4 1.9.4 4.1.0 6.2 6.2 1.6 3.0.8 0.24.1 0.24.1 6.0 6.0 6.0 4.35.0 3.90.0 1.0.3 3.90.0 3.90.0 3.90.0 3.90.0 3.90.0 2.4.44 1.0.2k 0.23.22 0.23.22 8.32 Amazon Linux 2 and AL2023 Container comparison 117 Amazon Linux 2023 Package pcre2 pcre2-syntax pinentry popt pth AL2 Container AL2023 Container User Guide 10.40 10.40 1.18 0.8.1 1.13 2.0.7 publicsuffix-list- 20240208 20240212 0.3 0.5.3 2.7.18 4.11.3 dafsa pygpgme pyliblzma python python2-rpm python3 python3-dnf python3-gpg python3-hawkey python3-libcomps python3-libdnf python3-libs python3-pip-wheel python3-rpm 3.9.16 4.14.0 1.15.1 0.69.0 0.1.20 0.69.0 3.9.16 21.3.1 4.16.1.3 Amazon Linux 2 and AL2023 Container comparison 118 Amazon Linux 2023 User Guide Package AL2 Container AL2023 Container python3-setuptools- wheel python-iniparse python-libs python-pycurl python-urlgrabber pyxattr readline rpm rpm-build-libs rpm-libs rpm-sign-libs sed setup shared-mime-info sqlite sqlite-libs system-release tzdata vim-data vim-minimal 0.4 2.7.18 7.19.0 3.10 0.5.1 6.2 4.11.3 4.11.3 4.11.3 4.2.2 2.8.71 1.8 3.7.17 2 2024a 9.0.2153 9.0.2153 59.6.0 8.1 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 4.8 2.13.7 3.40.0 2023.6.20241031 2024a Amazon Linux 2 and AL2023 Container comparison 119 Amazon Linux 2023 Package xz-libs yum yum-metadata-parser AL2 Container AL2023 Container User Guide 5.2.2 3.4.3 1.1.4 5.2.5 4.14.0 yum-plugin-ovl 1.1.31 yum-plugin-priorit 1.1.31 ies zlib 1.2.7 1.2.11 Amazon Linux 2 and AL2023 Container comparison 120 Amazon Linux 2023 User Guide Comparing AL1 and AL2023 The following topics describe key differences between AL1 and AL2023 that aren't already covered by the comparison with AL2. Note AL1 reached its end-of-life (EOL) on December 31, 2023 and will not receive any security updates or bug fixes starting January 1, 2024. For more information about AL1 EOL and maintenance support, see the blog post Update on Amazon Linux AMI end-of-life. We recommend that you upgrade applications to AL2023, which includes long-term support until 2028. Topics • Support for each release • systemd replaces upstart as init system • Python 2.6 and 2.7 has been replaced with Python 3 • OpenJDK 8 as oldest JDK • AL2023 kernel changes from Amazon Linux 1 (AL1) • Comparing packages installed on Amazon Linux 1 (AL1) and Amazon Linux 2023 AMIs • Comparing packages installed on Amazon Linux 1 (AL1) and Amazon Linux 2023 Minimal AMIs • Comparing packages installed on Amazon Linux 1 (AL1) and Amazon Linux 2023 base container images Support for each release For AL2023, we offer five years of support from the release date. AL1 ended standard support as of December 31, 2020 and ended maintenance support as of December 31, 2023. For more information, see Release cadence. Support for each release 121 Amazon Linux 2023 User Guide systemd replaces upstart as init system In AL2 upstart was replaced by systemd as the init system. AL2023 also uses systemd as its init system, further adopting new features and functionality of systemd. Python 2.6 and 2.7 has been replaced with Python 3 Although AL1 marked Python 2.6 as EOL with the 2018.03 release, the packages were still available in the repositories to install. AL2 shipped with Python 2.7 as the earliest supported Python version, and AL2023 completes the transition to Python 3. No Python 2.x versions are included in the AL2023 repositories. For more information on Python on Amazon Linux, see Python in AL2023. OpenJDK 8 as oldest JDK AL2023 ships with Amazon Corretto as the default (and only) Java Development Kit (JDK). All Java based packages in AL2023 are built with Amazon Corretto 17. In
al2023-ug-030
al2023-ug.pdf
30
has been replaced with Python 3 Although AL1 marked Python 2.6 as EOL with the 2018.03 release, the packages were still available in the repositories to install. AL2 shipped with Python 2.7 as the earliest supported Python version, and AL2023 completes the transition to Python 3. No Python 2.x versions are included in the AL2023 repositories. For more information on Python on Amazon Linux, see Python in AL2023. OpenJDK 8 as oldest JDK AL2023 ships with Amazon Corretto as the default (and only) Java Development Kit (JDK). All Java based packages in AL2023 are built with Amazon Corretto 17. In AL1, OpenJDK 1.6.0 (java-1.6.0-openjdk) went EOL with the first 2018.03 release, and OpenJDK 1.7.0 (java-1.7.0-openjdk) went EOL in mid-2020, although both versions were available in the AL1 repositories. The earliest OpenJDK version available in AL2023 is OpenJDK 8, provided by Amazon Corretto 8. AL2023 kernel changes from Amazon Linux 1 (AL1) Kernel Live Patching Both AL2023 and AL2 add support for kernel live-patching functionality. This allows you to patch critical and important security vulnerabilities in the Linux kernel without reboot or downtime. For more information, see Kernel Live Patching on AL2023. Kernel file system support There have been several changes in the file systems that the kernel in AL1 will support mounting, along with changes in the partitioning schemes that the kernel will parse. systemd replaces upstart as init system 122 Amazon Linux 2023 User Guide CONFIG option AL1/4.14/ x86_64 AL2023/6.1/ aarch64 AL2023/6.1/ x86_64 AL2023/6. 12/aarch64 AL2023/6. 12/x86_64 CONFIG_AF m S_FS CONFIG_AF m _RXRPC CONFIG_BS y D_DISKLAB EL CONFIG_CR m AMFS n n n n n n n n n n n n n n n n CONFIG_CR N/A N/A N/A N/A N/A AMFS_BLOC KDEV CONFIG_DM N/A _CLONE CONFIG_DM n _ERA CONFIG_DM m _INTEGRIT Y CONFIG_DM n _LOG_WRIT ES CONFIG_DM n _SWITCH CONFIG_DM n _VERITY n n m m n n n n m m n n n n m m n n n n m m n n Kernel file system support 123 Amazon Linux 2023 User Guide CONFIG option AL1/4.14/ x86_64 AL2023/6.1/ aarch64 AL2023/6.1/ x86_64 AL2023/6. 12/aarch64 AL2023/6. 12/x86_64 CONFIG_EC m RYPT_FS CONFIG_EX N/A FAT_FS CONFIG_EX m T2_FS CONFIG_EX m T3_FS CONFIG_GF n S2_FS CONFIG_HF m SPLUS_FS CONFIG_HF m S_FS CONFIG_JF n S_FS CONFIG_LD y M_PARTITI ON CONFIG_MA y C_PARTITI ON CONFIG_NF m S_V2 n m n n n n n n n n n n m n n n n n n n n n n m n n n n n n n n n n m n n n n n n n n n Kernel file system support 124 Amazon Linux 2023 User Guide CONFIG option AL1/4.14/ x86_64 AL2023/6.1/ aarch64 AL2023/6.1/ x86_64 AL2023/6. 12/aarch64 AL2023/6. 12/x86_64 CONFIG_NT m FS_FS CONFIG_RO m MFS_FS CONFIG_SO y LARIS_X86 _PARTITIO N CONFIG_SQ y UASHFS_ZS TD CONFIG_SU y N_PARTITI ON n n n y n n n n y n n n n y n n n n y n Security focused kernel config changes CONFIG option AL1/4.14/ x86_64 AL2023/6.1/ aarch64 AL2023/6.1/ x86_64 AL2023/6. 12/aarch64 AL2023/6. 12/x86_64 CONFIG_BU y y y y y G_ON_DATA _CORRUPTI ON CONFIG_DE 4096 65536 65536 65536 65536 FAULT_MMA P_MIN_ADD R Security focused kernel config changes 125 Amazon Linux 2023 User Guide CONFIG option AL1/4.14/ x86_64 AL2023/6.1/ aarch64 AL2023/6.1/ x86_64 AL2023/6. 12/aarch64 AL2023/6. 12/x86_64 CONFIG_DE y VMEM CONFIG_DE y VPORT CONFIG_FO y RTIFY_SOU RCE n n y n n y n n y n n y CONFIG_HA N/A N/A N/A N/A N/A RDENED_US ERCOPY_FA LLBACK CONFIG_IN N/A IT_ON_ALL OC_DEFAUL T_ON CONFIG_IN N/A IT_ON_FRE E_DEFAULT _ON CONFIG_IO N/A MMU_DEFAU LT_DMA_ST RICT CONFIG_LD y ISC_AUTOL OAD n n n n n n n n n n n n n n n n Security focused kernel config changes 126 Amazon Linux 2023 User Guide CONFIG option AL1/4.14/ x86_64 AL2023/6.1/ aarch64 AL2023/6.1/ x86_64 AL2023/6. 12/aarch64 AL2023/6. 12/x86_64 CONFIG_SC N/A N/A HED_CORE CONFIG_SC y HED_STACK _END_CHEC K CONFIG_SE n CURITY_DM ESG_RESTR ICT CONFIG_SE y CURITY_SE LINUX_DIS ABLE CONFIG_SH N/A UFFLE_PAG E_ALLOCAT OR CONFIG_SL y AB_FREELI ST_HARDEN ED CONFIG_SL n AB_FREELI ST_RANDOM y y n y y y y y y n y y y N/A y y y y y N/A N/A y y y y y y Other kernel configuration changes Other kernel configuration changes 127 Amazon Linux 2023 User Guide CONFIG option AL1/4.14/ x86_64 AL2023/6.1/ aarch64 AL2023/6.1/ x86_64 AL2023/6. 12/aarch64 AL2023/6. 12/x86_64 100 4096 100 8192 100 4096 100 8192 CONFIG_HZ 250 CONFIG_NR 8192 _CPUS CONFIG_PA n NIC_ON_OO PS CONFIG_PA 0 NIC_ON_OO PS_VALUE CONFIG_PP m P CONFIG_SL m IP y 1 n n CONFIG_XE y N/A N_PV y 1 n n n y 1 n n N/A y 1 n n n Comparing packages installed on Amazon Linux 1 (AL1) and Amazon Linux 2023 AMIs A comparison of the RPMs present on the AL1 and AL2023 standard AMIs.
al2023-ug-031
al2023-ug.pdf
31
configuration changes Other kernel configuration changes 127 Amazon Linux 2023 User Guide CONFIG option AL1/4.14/ x86_64 AL2023/6.1/ aarch64 AL2023/6.1/ x86_64 AL2023/6. 12/aarch64 AL2023/6. 12/x86_64 100 4096 100 8192 100 4096 100 8192 CONFIG_HZ 250 CONFIG_NR 8192 _CPUS CONFIG_PA n NIC_ON_OO PS CONFIG_PA 0 NIC_ON_OO PS_VALUE CONFIG_PP m P CONFIG_SL m IP y 1 n n CONFIG_XE y N/A N_PV y 1 n n n y 1 n n N/A y 1 n n n Comparing packages installed on Amazon Linux 1 (AL1) and Amazon Linux 2023 AMIs A comparison of the RPMs present on the AL1 and AL2023 standard AMIs. Package acl acpid alsa-lib AL1 AMI AL2023 AMI 2.2.49 2.0.19 1.0.22 2.3.1 2.0.32 AL1 and AL2023 AMI comparison 128 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI alternatives amazon-chrony-config amazon-ec2-net-utils amazon-linux-repo-s3 amazon-linux-sb-keys amazon-rpm-config amazon-ssm-agent 3.2.2222.0 amd-ucode-firmware at attr audit audit-libs authconfig 3.1.10 2.4.46 2.6.5 2.6.5 6.2.8 1.15 4.3 2.5.1 2023.6.20241031 2023.1 228 3.3.987.0 20210208 3.1.23 2.5.1 3.0.6 3.0.6 aws-amitools-ec2 1.5.13 aws-cfn-bootstrap 1.4 2.0 aws-cli awscli-2 basesystem bash bash-completion 1.18.107 10.0 4.2.46 2.15.30 11 5.2.15 2.11 AL1 and AL2023 AMI comparison 129 Amazon Linux 2023 Package bc bind-libs bind-license bind-utils binutils boost-filesystem boost-system boost-thread bzip2 bzip2-libs AL1 AMI 1.06.95 9.8.2 9.8.2 2.27 1.0.6 1.0.6 ca-certificates 2023.2.62 c-ares checkpolicy chkconfig chrony 2.1.10 1.3.49.3 cloud-disk-utils cloud-init 0.27 0.7.6 cloud-init-cfg-ec2 cloud-utils-growpart copy-jdk-configs 3.3 User Guide AL2023 AMI 1.07.1 9.18.28 9.18.28 9.18.28 2.39 1.75.0 1.75.0 1.75.0 1.0.8 1.0.8 2023.2.68 1.19.1 3.4 1.15 4.3 22.2.2 22.2.2 0.31 AL1 and AL2023 AMI comparison 130 Amazon Linux 2023 Package coreutils coreutils-common cpio cracklib cracklib-dicts cronie cronie-anacron crontabs crypto-policies crypto-policies-sc ripts cryptsetup cryptsetup-libs curl curl-minimal cyrus-sasl cyrus-sasl-lib cyrus-sasl-plain dash db4 db4-utils AL1 AMI 8.22 2.10 2.8.16 2.8.16 1.4.4 1.4.4 1.10 1.6.7 1.6.7 7.61.1 2.1.23 2.1.23 2.1.23 0.5.5.1 4.7.25 4.7.25 User Guide AL2023 AMI 8.32 8.32 2.13 2.9.6 2.9.6 1.11 20220428 20220428 2.6.1 2.6.1 8.5.0 2.1.27 2.1.27 AL1 and AL2023 AMI comparison 131 Amazon Linux 2023 Package dbus dbus-broker dbus-common dbus-libs dejavu-fonts-common dejavu-sans-fonts dejavu-serif-fonts AL1 AMI 1.6.12 1.6.12 2.33 2.33 2.33 User Guide AL2023 AMI 1.12.28 32 1.12.28 1.12.28 device-mapper 1.02.135 1.02.185 device-mapper-event 1.02.135 device-mapper-event- 1.02.135 libs device-mapper-libs 1.02.135 1.02.185 device-mapper-pers 0.6.3 istent-data dhclient dhcp-common diffutils dmraid dmraid-events dnf dnf-data 4.1.1 4.1.1 3.3 1.0.0.rc16 1.0.0.rc16 3.8 4.14.0 4.14.0 AL1 and AL2023 AMI comparison 132 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI dnf-plugin-release- notification dnf-plugins-core dnf-plugin-support- info dnf-utils dosfstools dracut dracut-config-ec2 dracut-config-gene ric 004 dracut-modules-gro 0.20 wroot dump dwz dyninst e2fsprogs e2fsprogs-libs ec2-hibinit-agent ec2-instance-connect ec2-instance-conne ct-selinux 0.4 1.43.5 1.43.5 1.0.0 1.2 4.3.0 1.2 4.3.0 4.2 055 3.0 055 0.14 10.2.1 1.46.5 1.46.5 1.0.8 1.1 1.1 AL1 and AL2023 AMI comparison 133 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI 0.7 0.7 1.1 ec2-net-utils ec2-utils ed efi-filesystem efi-srpm-macros efivar efivar-libs elfutils-debuginfod- client elfutils-default-y ama-scope elfutils-libelf 0.168 elfutils-libs epel-release ethtool expat file file-libs filesystem findutils fipscheck 6 3.15 2.1.0 5.37 5.37 2.4.30 4.4.2 1.3.1 2.2.0 1.14.2 5 5 38 38 0.188 0.188 0.188 0.188 5.15 2.5.0 5.39 5.39 3.14 4.8.0 AL1 and AL2023 AMI comparison 134 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI fipscheck-lib fontconfig fontpackages-files ystem fonts-srpm-macros freetype fstrm fuse-libs gawk gdbm gdbm-libs gdisk generic-logos 1.3.1 2.8.0 1.41 2.3.11 2.9.4 3.1.7 1.8.0 0.8.10 17.0.0 get_reference_source 1.2 gettext gettext-libs ghc-srpm-macros giflib glib2 glibc glibc-all-langpacks 4.1.6 2.36.3 2.17 2.0.5 0.6.1 2.9.9 5.1.0 1.19 1.0.8 0.21 0.21 1.5.0 2.74.7 2.34 2.34 AL1 and AL2023 AMI comparison 135 Amazon Linux 2023 Package glibc-common glibc-gconv-extra glibc-locale-source gmp gnupg2 gnupg2-minimal gnutls go-srpm-macros gpgme gpm-libs grep groff groff-base grub grub2-common AL1 AMI 2.17 6.0.0 2.0.28 1.4.3 1.20.6 2.20 1.22.2 1.22.2 0.97 grub2-efi-x64-ec2 grub2-pc-modules grub2-tools grub2-tools-minimal grubby 7.0.15 User Guide AL2023 AMI 2.34 2.34 2.34 6.2.1 2.3.7 3.8.0 3.2.0 1.15.1 1.20.7 3.8 1.22.4 2.06 2.06 2.06 2.06 2.06 8.40 AL1 and AL2023 AMI comparison 136 Amazon Linux 2023 User Guide Package gssproxy gzip hesiod hibagent hmaccalc hostname hunspell hunspell-en hunspell-en-GB hunspell-en-US hunspell-filesystem hwdata info inih initscripts iproute iptables iputils AL1 AMI AL2023 AMI 0.8.4 1.12 3.23 1.7.0 0.20140811.1 0.20140811.1 0.20140811.1 1.7.0 0.384 6.7 49 10.09 6.10.0 1.5 3.1.0 1.0.0 0.9.12 0.233 5.1 9.03.58 4.4.0 1.4.21 20121221 20210202 irqbalance 1.5.0 jansson 1.9.0 2.14 AL1 and AL2023 AMI comparison 137 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI java-1.7.0-openjdk 1.7.0.321 javapackages-tools 0.9.1 jemalloc jitterentropy jpackage-utils 1.7.5 jq json-c kbd kbd-misc kernel 1.15 1.15 4.14.336 kernel-libbpf kernel-livepatch-r epo-s3 kernel-srpm-macros kernel-tools 4.14.336 keyutils keyutils-libs kmod kmod-libs kpartx kpatch-runtime 1.5.8 1.5.8 14 14 0.4.9 5.2.1 3.4.1 1.7.1 0.14 2.4.0 2.4.0 6.1.112 6.1.112 2023.6.20241031 1.0 6.1.112 1.6.3 1.6.3 29 29 0.9.7 AL1 and AL2023 AMI comparison 138 Amazon Linux 2023 Package krb5-libs lcms2 less libacl libaio libarchive libargon2 libassuan libattr libbasicobjects libblkid libcap libcap54 libcap-ng libcbor libcgroup AL1 AMI 1.15.1 2.6 436 2.2.49 0.3.109 2.0.3 2.4.46 2.23.2 2.16 2.54 0.7.5 0.40.rc1 libcollection libcom_err 1.43.5 libcomps libconfig User Guide AL2023 AMI 1.21.3 608 2.3.1 0.3.111
al2023-ug-032
al2023-ug.pdf
32
javapackages-tools 0.9.1 jemalloc jitterentropy jpackage-utils 1.7.5 jq json-c kbd kbd-misc kernel 1.15 1.15 4.14.336 kernel-libbpf kernel-livepatch-r epo-s3 kernel-srpm-macros kernel-tools 4.14.336 keyutils keyutils-libs kmod kmod-libs kpartx kpatch-runtime 1.5.8 1.5.8 14 14 0.4.9 5.2.1 3.4.1 1.7.1 0.14 2.4.0 2.4.0 6.1.112 6.1.112 2023.6.20241031 1.0 6.1.112 1.6.3 1.6.3 29 29 0.9.7 AL1 and AL2023 AMI comparison 138 Amazon Linux 2023 Package krb5-libs lcms2 less libacl libaio libarchive libargon2 libassuan libattr libbasicobjects libblkid libcap libcap54 libcap-ng libcbor libcgroup AL1 AMI 1.15.1 2.6 436 2.2.49 0.3.109 2.0.3 2.4.46 2.23.2 2.16 2.54 0.7.5 0.40.rc1 libcollection libcom_err 1.43.5 libcomps libconfig User Guide AL2023 AMI 1.21.3 608 2.3.1 0.3.111 3.7.4 20171227 2.5.5 2.5.1 0.1.1 2.37.4 2.48 0.8.2 0.7.0 0.7.0 1.46.5 0.1.20 1.7.2 AL1 and AL2023 AMI comparison 139 Amazon Linux 2023 Package libcurl libcurl-minimal AL1 AMI 7.61.1 libdb libdhash libdnf libeconf libedit libev libevent libfdisk libffi libfido2 libfontenc libgcc libgcc72 libgcrypt libgomp libgpg-error libgssglue libibverbs 2.11 2.0.21 3.0.13 1.0.5 7.2.1 1.5.3 1.11 0.1 User Guide AL2023 AMI 8.5.0 5.3.28 0.5.0 0.69.0 0.4.0 3.1 4.33 2.1.12 2.37.4 3.4.4 1.10.0 11.4.1 1.10.2 11.4.1 1.42 48.0 AL1 and AL2023 AMI comparison 140 Amazon Linux 2023 User Guide AL1 AMI AL2023 AMI Package libICE libicu libidn libidn2 1.0.6 50.2 1.18 2.3.0 libini_config libjpeg-turbo 1.2.90 libkcapi libkcapi-hmaccalc libldb libmaxminddb libmetalink libmnl 1.0.3 libmodulemd libmount 2.23.2 libnetfilter_connt 1.0.4 rack libnfnetlink libnfsidmap libnghttp2 libnih libnl 1.0.1 0.25 1.33.0 1.0.1 1.1.4 2.3.2 1.3.1 1.4.0 1.4.0 2.6.2 1.5.2 0.1.3 1.0.4 2.13.0 2.37.4 2.5.4 1.59.0 AL1 and AL2023 AMI comparison 141 AL1 AMI AL2023 AMI User Guide Amazon Linux 2023 Package libnl3 libpath_utils libpcap libpipeline 1.2.3 libpkgconf libpng libpsl libpwquality libref_array librepo libreport-filesystem libseccomp libselinux libselinux-utils libsemanage libsepol libsigsegv libSM libsmartcols libsolv 1.2.49 0.6.2 1.2.3 2.1.10 2.1.10 2.1.6 2.1.7 1.2.1 2.23.2 3.5.0 0.2.1 1.10.1 1.5.3 1.8.0 0.21.1 1.4.4 0.1.5 1.14.5 2.15.2 2.5.3 3.4 3.4 3.4 3.4 2.13 2.37.4 0.7.22 AL1 and AL2023 AMI comparison 142 AL1 AMI 1.43.5 1.4.2 User Guide AL2023 AMI 1.46.5 Amazon Linux 2023 Package libss libssh2 libsss_certmap libsss_idmap libsss_nss_idmap libsss_sudo libstdc++ libstdc++72 7.2.1 libstoragemgmt libsysfs libtalloc libtasn1 libtdb libtevent libtextstyle libtirpc libudev libunistring libuser libutempter 2.1.0 2.3 0.2.4 173 0.9.3 0.60 1.1.5 2.9.4 2.9.4 2.9.4 2.9.4 11.4.1 1.9.4 2.3.4 4.19.0 1.4.7 0.13.0 0.21 1.3.3 0.9.10 0.63 1.2.1 AL1 and AL2023 AMI comparison 143 Amazon Linux 2023 Package libuuid libuv libverto libverto-libev libX11 libX11-common libXau libxcb libXcomposite libxcrypt libXext libXfont libXi libxml2 libxml2-python27 libXrender libxslt libXtst libyaml libzstd AL1 AMI 2.23.2 0.2.5 1.6.0 1.6.0 1.0.6 1.11 0.4.3 1.3.2 1.4.5 1.7.2 2.9.1 2.9.1 0.9.8 1.1.28 1.2.2 0.1.6 User Guide AL2023 AMI 2.37.4 1.47.0 0.3.2 0.3.2 4.4.33 2.10.4 0.2.5 1.5.5 AL1 and AL2023 AMI comparison 144 Amazon Linux 2023 User Guide Package AL1 AMI linux-firmware-whe nce lm_sensors-libs lmdb-libs log4j-cve-2021-442 1.3 28-hotpatch logrotate lsof lua lua-libs lua-srpm-macros lvm2 lvm2-libs lz4-libs mailcap make man-db man-pages mdadm microcode_ctl mingetty 3.7.8 4.82 5.1.4 2.02.166 2.02.166 2.1.31 3.82 2.6.3 4.10 3.2.6 2.1 1.08 AL2023 AMI 20210208 3.6.0 0.9.29 3.20.1 4.94.0 5.4.4 1 1.9.4 2.9.3 5.10 2.1 AL1 and AL2023 AMI comparison 145 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI mpfr nano nc ncurses ncurses-base ncurses-libs nettle net-tools newt newt-python27 nfs-utils npth nspr nss nss-pem nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util 2.5.3 1.84 5.7 5.7 5.7 1.60 0.52.11 0.52.11 1.3.0 4.25.0 3.53.1 1.0.3 3.53.1 3.53.1 3.53.1 3.53.1 3.53.1 4.1.0 5.8 6.2 6.2 6.2 3.8 2.0 0.52.21 2.5.4 1.6 4.35.0 3.90.0 3.90.0 3.90.0 3.90.0 3.90.0 AL1 and AL2023 AMI comparison 146 Amazon Linux 2023 User Guide Package ntp ntpdate ntsysv numactl numactl-libs ocaml-srpm-macros oniguruma openblas-srpm-macros openldap openssh openssh-clients openssh-server openssl openssl-libs openssl-pkcs11 os-prober p11-kit p11-kit-trust package-notes-srpm- macros pam AL1 AMI 4.2.8p15 4.2.8p15 1.3.49.3 2.0.7 2.4.40 7.4p1 7.4p1 7.4p1 1.0.2k 0.18.5 0.18.5 1.1.8 AL2023 AMI 1.15 2.0.14 6 6.9.7.1 2 2.4.57 8.7p1 8.7p1 8.7p1 3.0.8 3.0.8 0.4.12 1.77 0.24.1 0.24.1 0.4 1.5.1 AL1 and AL2023 AMI comparison 147 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI pam_ccreds pam_krb5 pam_passwdqc parted passwd pciutils pciutils-libs pcre pcre2 pcre2-syntax perl perl-Carp perl-Class-Struct perl-constant perl-Digest perl-Digest-HMAC perl-Digest-MD5 perl-Digest-SHA perl-DynaLoader perl-Encode 10 2.3.11 1.0.5 2.1 0.79 3.1.10 3.1.10 8.21 5.16.3 1.26 1.27 1.17 1.03 2.52 5.85 2.51 3.4 0.80 3.7.0 3.7.0 10.40 10.40 1.50 0.66 1.33 1.47 3.15 AL1 and AL2023 AMI comparison 148 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI perl-Errno perl-Exporter 5.68 perl-Fcntl perl-File-Basename perl-File-Path 2.09 perl-File-stat 1.30 5.74 1.13 2.85 2.18 1.09 perl-File-Temp 0.23.01 0.231.100 perl-Filter perl-Getopt-Long perl-Getopt-Std 1.49 2.40 perl-HTTP-Tiny 0.033 perl-if perl-interpreter perl-IO perl-IPC-Open3 perl-libs perl-macros perl-MIME-Base64 perl-mro perl-overload 5.16.3 5.16.3 2.52 1.12 0.078 0.60.800 5.32.1 1.43 1.21 5.32.1 3.16 1.23 1.31 AL1 and AL2023 AMI comparison 149 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI perl-overloading perl-parent perl-PathTools perl-Pod-Escapes perl-podlators perl-Pod-Perldoc perl-Pod-Simple perl-Pod-Usage perl-POSIX 0.225 3.40 1.04 2.5.1 3.20 3.28 1.63 perl-Scalar-List-U 1.27 tils perl-SelectSaver perl-Socket 2.010 perl-srpm-macros perl-Storable 2.45 perl-subs perl-Symbol perl-Term-ANSIColor perl-Term-Cap perl-Text-ParseWords 3.29 0.02 0.238 3.78 1.07 4.14 3.28.01 3.42 2.01 1.94 1.56
al2023-ug-033
al2023-ug.pdf
33
perl-Fcntl perl-File-Basename perl-File-Path 2.09 perl-File-stat 1.30 5.74 1.13 2.85 2.18 1.09 perl-File-Temp 0.23.01 0.231.100 perl-Filter perl-Getopt-Long perl-Getopt-Std 1.49 2.40 perl-HTTP-Tiny 0.033 perl-if perl-interpreter perl-IO perl-IPC-Open3 perl-libs perl-macros perl-MIME-Base64 perl-mro perl-overload 5.16.3 5.16.3 2.52 1.12 0.078 0.60.800 5.32.1 1.43 1.21 5.32.1 3.16 1.23 1.31 AL1 and AL2023 AMI comparison 149 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI perl-overloading perl-parent perl-PathTools perl-Pod-Escapes perl-podlators perl-Pod-Perldoc perl-Pod-Simple perl-Pod-Usage perl-POSIX 0.225 3.40 1.04 2.5.1 3.20 3.28 1.63 perl-Scalar-List-U 1.27 tils perl-SelectSaver perl-Socket 2.010 perl-srpm-macros perl-Storable 2.45 perl-subs perl-Symbol perl-Term-ANSIColor perl-Term-Cap perl-Text-ParseWords 3.29 0.02 0.238 3.78 1.07 4.14 3.28.01 3.42 2.01 1.94 1.56 1.02 2.032 1 3.21 1.03 1.08 5.01 1.17 3.30 perl-Text-Tabs+Wrap 2021.0726 AL1 and AL2023 AMI comparison 150 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI perl-threads perl-threads-shared perl-Time-HiRes perl-Time-Local perl-vars pinentry pkgconf pkgconfig pkgconf-m4 pkgconf-pkg-config pm-utils policycoreutils policycoreutils-py thon-utils popt procmail procps procps-ng protobuf-c psacct psmisc 1.87 1.43 1.9725 1.2300 0.7.6 0.27.1 1.4.1 2.1.12 1.13 3.22 3.2.8 6.3.2 22.20 1.300 1.05 1.8.0 1.8.0 1.8.0 3.4 3.4 1.18 3.3.17 1.4.1 6.6.4 23.4 AL1 and AL2023 AMI comparison 151 Amazon Linux 2023 Package pth AL1 AMI 2.0.7 User Guide AL2023 AMI publicsuffix-list- 20240212 dafsa python27 python27-babel python27-backports 2.7.18 0.9.4 1.0 python27-backports- 3.4.0.2 ssl_match_hostname python27-boto 2.48.0 python27-botocore 1.17.31 python27-chardet python27-colorama python27-configobj python27-crypto python27-daemon python27-dateutil 2.0.1 0.4.1 4.7.2 2.6.1 1.5.2 2.1 python27-devel 2.7.18 python27-docutils python27-ecdsa python27-futures python27-imaging 0.11 0.11 3.0.3 1.1.6 AL1 and AL2023 AMI comparison 152 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI python27-iniparse python27-jinja2 python27-jmespath python27-jsonpatch python27-jsonpointer python27-kitchen python27-libs python27-lockfile python27-markupsafe 0.3.1 2.7.2 0.9.2 1.2 1.0 1.1.1 2.7.18 0.8 0.11 python27-paramiko 1.15.1 python27-pip python27-ply python27-pyasn1 9.0.3 3.4 0.1.7 python27-pycurl 7.19.0 python27-pygpgme python27-pyliblzma python27-pystache python27-pyxattr python27-PyYAML python27-requests 0.3 0.5.3 0.5.3 0.5.0 3.10 1.2.3 AL1 and AL2023 AMI comparison 153 Amazon Linux 2023 Package python27-rsa AL1 AMI 3.4.1 python27-setuptools 36.2.7 python27-simplejson python27-six python27-urlgrabber 3.6.5 1.8.0 3.10 python27-urllib3 1.24.3 python27-virtualenv 15.1.0 python3 python3-attrs python3-audit python3-awscrt python3-babel python3-cffi python3-chardet python3-colorama python3-configobj python3-cryptography python3-daemon python3-dateutil python3-dbus User Guide AL2023 AMI 3.9.16 20.3.0 3.0.6 0.19.19 2.9.1 1.14.5 4.0.0 0.4.4 5.0.6 36.0.1 2.3.0 2.8.1 1.2.18 AL1 and AL2023 AMI comparison 154 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI python3-distro python3-dnf python3-dnf-plugins- core python3-docutils python3-gpg python3-hawkey python3-idna python3-jinja2 python3-jmespath python3-jsonpatch python3-jsonpointer python3-jsonschema python3-libcomps python3-libdnf python3-libs python3-libselinux python3-libsemanage python3-libstorage mgmt python3-lockfile 1.5.0 4.14.0 4.3.0 0.16 1.15.1 0.69.0 2.10 2.11.3 0.10.0 1.21 2.0 3.2.0 0.1.20 0.69.0 3.9.16 3.4 3.4 1.9.4 0.12.2 AL1 and AL2023 AMI comparison 155 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI python3-markupsafe python3-netifaces python3-oauthlib python3-pip-wheel python3-ply python3-policycore utils python3-prettytable python3-prompt-too lkit python3-pycparser python3-pyrsistent python3-pyserial python3-pysocks python3-pytz python3-pyyaml python3-requests python3-rpm python3-ruamel-yaml python3-ruamel-yaml- clib 1.1.1 0.10.6 3.0.2 21.3.1 3.11 3.4 0.7.2 3.0.24 2.20 0.17.3 3.4 1.7.1 2022.7.1 5.4.1 2.25.1 4.16.1.3 0.16.6 0.1.2 AL1 and AL2023 AMI comparison 156 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI python3-setools python3-setuptools python3-setuptools- wheel python3-six python3-systemd python3-urllib3 python3-wcwidth python-chevron python-srpm-macros quota quota-nls readline rmt rng-tools rootfiles rpcbind rpm rpm-build-libs rpm-libs rpm-plugin-selinux 4.00 4.00 6.2 0.4 5 8.1 0.2.0 4.11.3 4.11.3 4.11.3 4.4.1 59.6.0 59.6.0 1.15.0 235 1.25.10 0.2.5 0.13.1 3.9 4.06 4.06 8.1 6.14 8.1 1.2.6 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 AL1 and AL2023 AMI comparison 157 Amazon Linux 2023 User Guide Package AL1 AMI rpm-plugin-systemd- inhibit rpm-python27 4.11.3 rpm-sign-libs rsync rsyslog ruby ruby20 ruby20-irb ruby20-libs rubygem20-bigdecimal rubygem20-json rubygem20-psych rubygem20-rdoc 3.0.6 5.8.10 2.0 2.0.0.648 2.0.0.648 2.0.0.648 1.2.0 1.8.3 2.0.0 4.2.2 rubygems20 2.0.14.1 rust-srpm-macros sbsigntools screen sed selinux-policy 4.0.3 4.2.1 AL2023 AMI 4.16.1.3 4.16.1.3 3.2.6 21 0.9.4 4.8.0 4.8 38.1.45 AL1 and AL2023 AMI comparison 158 Amazon Linux 2023 User Guide Package AL1 AMI selinux-policy-tar AL2023 AMI 38.1.45 geted sendmail setserial setup sgpio shadow-utils shared-mime-info slang sqlite sqlite-libs sssd-client sssd-common sssd-kcm sssd-nfs-idmap strace sudo sysctl-defaults sysfsutils sysstat systemd 8.14.4 2.17 2.8.14 1.2.0.10 4.1.4.2 1.1 2.2.1 3.7.17 1.8.23 1.0 2.1.0 2.13.7 4.9 2.3.2 3.40.0 2.9.4 2.9.4 2.9.4 2.9.4 6.8 1.9.15 1.0 12.5.6 252.23 AL1 and AL2023 AMI comparison 159 Amazon Linux 2023 User Guide Package AL1 AMI AL2023 AMI systemd-libs systemd-networkd systemd-pam systemd-resolved systemd-udev 252.23 252.23 252.23 252.23 252.23 system-release 2018.03 2023.6.20241031 systemtap-runtime sysvinit tar tbb tcp_wrappers tcp_wrappers-libs tcpdump tcsh time tmpwatch traceroute ttmkfdir tzdata tzdata-java 2.87 1.26 7.6 7.6 1.7 2.9.16 2.0.14 3.0.9 2023c 2023c 4.8 1.34 2020.3 4.99.1 6.24.07 1.9 2.1.3 2024a AL1 and AL2023 AMI comparison 160 Amazon Linux 2023 Package udev unzip update-motd upstart userspace-rcu ustr util-linux util-linux-core vim-common vim-data vim-enhanced vim-filesystem vim-minimal wget which words xfsdump xfsprogs xorg-x11-fonts-Type1 xorg-x11-font-utils AL1 AMI AL2023 AMI User Guide 173 6.0 1.0.1 0.6.5 1.0.4 2.23.2 9.0.2120 9.0.2120 9.0.2120 9.0.2120 9.0.2120 1.18 2.19 3.0 7.2 7.2 6.0 2.2 0.12.1 2.37.4 2.37.4 9.0.2153 9.0.2153 9.0.2153 9.0.2153 9.0.2153 1.21.3 2.21 3.0 3.1.11 5.18.0 AL1 and AL2023 AMI comparison 161 Amazon Linux 2023 Package xxd xxhash-libs xz xz-libs yum yum-metadata-parser AL1 AMI 9.0.2120 5.2.2 5.2.2 3.4.3 1.1.4 yum-plugin-priorit 1.1.31 ies yum-plugin-upgrade- 1.1.31 1.1.31 3.0 1.2.8 helper yum-utils zip
al2023-ug-034
al2023-ug.pdf
34
and AL2023 AMI comparison 160 Amazon Linux 2023 Package udev unzip update-motd upstart userspace-rcu ustr util-linux util-linux-core vim-common vim-data vim-enhanced vim-filesystem vim-minimal wget which words xfsdump xfsprogs xorg-x11-fonts-Type1 xorg-x11-font-utils AL1 AMI AL2023 AMI User Guide 173 6.0 1.0.1 0.6.5 1.0.4 2.23.2 9.0.2120 9.0.2120 9.0.2120 9.0.2120 9.0.2120 1.18 2.19 3.0 7.2 7.2 6.0 2.2 0.12.1 2.37.4 2.37.4 9.0.2153 9.0.2153 9.0.2153 9.0.2153 9.0.2153 1.21.3 2.21 3.0 3.1.11 5.18.0 AL1 and AL2023 AMI comparison 161 Amazon Linux 2023 Package xxd xxhash-libs xz xz-libs yum yum-metadata-parser AL1 AMI 9.0.2120 5.2.2 5.2.2 3.4.3 1.1.4 yum-plugin-priorit 1.1.31 ies yum-plugin-upgrade- 1.1.31 1.1.31 3.0 1.2.8 helper yum-utils zip zlib zram-generator zram-generator-def aults zstd User Guide AL2023 AMI 9.0.2153 0.8.0 5.2.5 5.2.5 4.14.0 3.0 1.2.11 1.1.2 1.1.2 1.5.5 Comparing packages installed on Amazon Linux 1 (AL1) and Amazon Linux 2023 Minimal AMIs A comparison of the RPMs present on the AL1 and AL2023 Minimal AMIs. AL1 and AL2023 Minimal AMI comparison 162 AL1 Minimal AL2023 Minimal User Guide Amazon Linux 2023 Package acpid alternatives amazon-chrony-config amazon-ec2-net-utils amazon-linux-repo-s3 amazon-linux-sb-keys amd-ucode-firmware audit audit-libs authconfig awscli-2 basesystem bash binutils bzip2 bzip2-libs 2.0.19 2.6.5 2.6.5 6.2.8 10.0 4.2.46 2.27 1.0.6 1.0.6 ca-certificates 2023.2.62 checkpolicy chkconfig chrony 2.1.10 1.3.49.3 1.15 4.3 2.5.1 2023.6.20241031 2023.1 20210208 3.0.6 3.0.6 2.15.30 11 5.2.15 1.0.8 2023.2.68 3.4 4.3 AL1 and AL2023 Minimal AMI comparison 163 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal cloud-disk-utils cloud-init 0.27 0.7.6 cloud-init-cfg-ec2 cloud-utils-growpart coreutils 8.22 coreutils-common cpio cracklib cracklib-dicts cronie cronie-anacron crontabs crypto-policies cryptsetup-libs curl curl-minimal cyrus-sasl cyrus-sasl-lib dash db4 2.10 2.8.16 2.8.16 1.4.4 1.4.4 1.10 7.61.1 2.1.23 2.1.23 0.5.5.1 4.7.25 22.2.2 22.2.2 0.31 8.32 8.32 2.13 2.9.6 2.9.6 20220428 2.6.1 8.5.0 2.1.27 AL1 and AL2023 Minimal AMI comparison 164 AL1 Minimal AL2023 Minimal 4.7.25 User Guide Amazon Linux 2023 Package db4-utils dbus dbus-broker dbus-common dbus-libs 1.6.12 device-mapper device-mapper-libs 4.1.1 4.1.1 3.3 004 dhclient dhcp-common diffutils dnf dnf-data dnf-plugin-release- notification dnf-plugins-core dnf-plugin-support- info dracut dracut-config-ec2 dracut-config-gene ric 1.12.28 32 1.12.28 1.12.28 1.02.185 1.02.185 3.8 4.14.0 4.14.0 1.2 4.3.0 1.2 055 3.0 055 AL1 and AL2023 Minimal AMI comparison 165 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal dracut-modules-gro 0.20 1.43.5 1.43.5 0.7 1.1 wroot e2fsprogs e2fsprogs-libs ec2-utils ed efi-filesystem efivar efivar-libs elfutils-default-y ama-scope elfutils-libelf 0.168 elfutils-libs ethtool expat file file-libs filesystem findutils fipscheck fipscheck-lib 3.15 2.1.0 5.37 5.37 2.4.30 4.4.2 1.3.1 1.3.1 1.46.5 1.46.5 2.2.0 5 38 38 0.188 0.188 0.188 2.5.0 5.39 5.39 3.14 4.8.0 AL1 and AL2023 Minimal AMI comparison 166 AL1 Minimal AL2023 Minimal User Guide Amazon Linux 2023 Package fuse-libs gawk gdbm gdbm-libs gdisk generic-logos 2.9.4 3.1.7 1.8.0 0.8.10 17.0.0 get_reference_source 1.2 gettext gettext-libs glib2 glibc 2.36.3 2.17 glibc-all-langpacks glibc-common 2.17 glibc-locale-source gmp gnupg2 gnupg2-minimal gnutls gpgme grep 6.0.0 2.0.28 1.4.3 2.20 2.9.9 5.1.0 1.19 1.0.8 0.21 0.21 2.74.7 2.34 2.34 2.34 2.34 6.2.1 2.3.7 3.8.0 1.15.1 3.8 AL1 and AL2023 Minimal AMI comparison 167 Amazon Linux 2023 Package groff groff-base grub grub2-common grub2-efi-x64-ec2 grub2-pc-modules grub2-tools grub2-tools-minimal grubby gzip hesiod hmaccalc hostname hwdata info inih initscripts iproute iptables iputils AL1 Minimal AL2023 Minimal User Guide 1.22.2 1.22.2 0.97 7.0.15 1.5 3.1.0 0.9.12 0.233 5.1 9.03.58 4.4.0 1.4.21 1.22.4 2.06 2.06 2.06 2.06 2.06 8.40 1.12 3.23 0.384 49 10.09 6.10.0 20121221 20210202 AL1 and AL2023 Minimal AMI comparison 168 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal irqbalance jansson jitterentropy jq json-c kbd kbd-misc kernel kernel-libbpf kernel-livepatch-r epo-s3 keyutils-libs kmod kmod-libs krb5-libs less libacl libarchive libargon2 libassuan libattr 1.15 1.15 4.14.336 1.5.8 14 14 1.15.1 436 2.2.49 2.0.3 2.4.46 1.9.0 2.14 3.4.1 1.7.1 0.14 2.4.0 2.4.0 6.1.112 6.1.112 2023.6.20241031 1.6.3 29 29 1.21.3 608 2.3.1 3.7.4 20171227 2.5.5 2.5.1 AL1 and AL2023 Minimal AMI comparison 169 Amazon Linux 2023 User Guide Package libblkid libcap libcap54 libcap-ng libcbor libcgroup libcom_err libcomps libcurl libcurl-minimal libdb libdnf libeconf libedit libfdisk libffi libfido2 libgcc libgcc72 libgcrypt AL1 Minimal AL2023 Minimal 2.23.2 2.16 2.54 0.7.5 0.40.rc1 1.43.5 7.61.1 2.11 3.0.13 7.2.1 1.5.3 2.37.4 2.48 0.8.2 0.7.0 1.46.5 0.1.20 8.5.0 5.3.28 0.69.0 0.4.0 3.1 2.37.4 3.4.4 1.10.0 11.4.1 1.10.2 AL1 and AL2023 Minimal AMI comparison 170 AL1 Minimal AL2023 Minimal User Guide Amazon Linux 2023 Package libgomp libgpg-error libicu libidn libidn2 libkcapi 1.11 50.2 1.18 2.3.0 libkcapi-hmaccalc libmnl 1.0.3 libmodulemd libmount 2.23.2 libnetfilter_connt 1.0.4 1.0.1 1.33.0 1.0.1 0.6.2 1.2.3 rack libnfnetlink libnghttp2 libnih libpipeline libpsl libpwquality librepo libreport-filesystem libseccomp 11.4.1 1.42 2.3.2 1.4.0 1.4.0 1.0.4 2.13.0 2.37.4 1.59.0 1.5.3 0.21.1 1.4.4 1.14.5 2.15.2 2.5.3 AL1 and AL2023 Minimal AMI comparison 171 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal libselinux libselinux-utils libsemanage libsepol libsigsegv 2.1.10 2.1.10 2.1.6 2.1.7 libsmartcols 2.23.2 libsolv libss libssh2 libstdc++ libstdc++72 libsysfs libtasn1 libtextstyle libudev libunistring libuser libutempter libuuid libverto 1.43.5 1.4.2 7.2.1 2.1.0 2.3 173 0.9.3 0.60 1.1.5 2.23.2 0.2.5 3.4 3.4 3.4 3.4 2.13 2.37.4 0.7.22 1.46.5 11.4.1 4.19.0 0.21 0.9.10 0.63 1.2.1 2.37.4 0.3.2 AL1 and AL2023 Minimal AMI
al2023-ug-035
al2023-ug.pdf
35
1.2.3 rack libnfnetlink libnghttp2 libnih libpipeline libpsl libpwquality librepo libreport-filesystem libseccomp 11.4.1 1.42 2.3.2 1.4.0 1.4.0 1.0.4 2.13.0 2.37.4 1.59.0 1.5.3 0.21.1 1.4.4 1.14.5 2.15.2 2.5.3 AL1 and AL2023 Minimal AMI comparison 171 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal libselinux libselinux-utils libsemanage libsepol libsigsegv 2.1.10 2.1.10 2.1.6 2.1.7 libsmartcols 2.23.2 libsolv libss libssh2 libstdc++ libstdc++72 libsysfs libtasn1 libtextstyle libudev libunistring libuser libutempter libuuid libverto 1.43.5 1.4.2 7.2.1 2.1.0 2.3 173 0.9.3 0.60 1.1.5 2.23.2 0.2.5 3.4 3.4 3.4 3.4 2.13 2.37.4 0.7.22 1.46.5 11.4.1 4.19.0 0.21 0.9.10 0.63 1.2.1 2.37.4 0.3.2 AL1 and AL2023 Minimal AMI comparison 172 Amazon Linux 2023 Package libxcrypt libxml2 libyaml libzstd linux-firmware-whe nce logrotate lua lua-libs lz4-libs make man-db microcode_ctl mingetty mpfr ncurses ncurses-base ncurses-libs nettle net-tools newt AL1 Minimal AL2023 Minimal User Guide 4.4.33 2.10.4 0.2.5 1.5.5 20210208 3.20.1 5.4.4 1.9.4 2.9.3 2.1 4.1.0 6.2 6.2 6.2 3.8 2.0 2.9.1 0.1.6 3.7.8 5.1.4 3.82 2.1 1.08 5.7 5.7 5.7 1.60 0.52.11 AL1 and AL2023 Minimal AMI comparison 173 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal newt-python27 0.52.11 npth nspr nss nss-pem nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util ntp ntpdate numactl-libs oniguruma openldap openssh openssh-clients openssh-server openssl openssl-libs 4.25.0 3.53.1 1.0.3 3.53.1 3.53.1 3.53.1 3.53.1 3.53.1 4.2.8p15 4.2.8p15 2.4.40 7.4p1 7.4p1 1.0.2k 1.6 2.0.14 6.9.7.1 2.4.57 8.7p1 8.7p1 8.7p1 3.0.8 3.0.8 AL1 and AL2023 Minimal AMI comparison 174 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal openssl-pkcs11 os-prober p11-kit p11-kit-trust pam passwd pciutils pciutils-libs pcre pcre2 pcre2-syntax pinentry pkgconfig policycoreutils popt procmail procps procps-ng psmisc pth 0.18.5 0.18.5 1.1.8 0.79 3.1.10 3.1.10 8.21 0.7.6 0.27.1 2.1.12 1.13 3.22 3.2.8 22.20 2.0.7 0.4.12 1.77 0.24.1 0.24.1 1.5.1 0.80 3.7.0 3.7.0 10.40 10.40 3.4 1.18 3.3.17 23.4 AL1 and AL2023 Minimal AMI comparison 175 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal publicsuffix-list- 20240212 dafsa python27 python27-babel python27-backports 2.7.18 0.9.4 1.0 python27-backports- 3.4.0.2 ssl_match_hostname python27-chardet python27-configobj python27-iniparse python27-jinja2 python27-jsonpatch python27-jsonpointer 2.0.1 4.7.2 0.3.1 2.7.2 1.2 1.0 python27-libs 2.7.18 python27-markupsafe 0.11 python27-pycurl 7.19.0 python27-pygpgme python27-pyliblzma python27-pyxattr python27-PyYAML python27-requests 0.3 0.5.3 0.5.0 3.10 1.2.3 AL1 and AL2023 Minimal AMI comparison 176 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal python27-setuptools 36.2.7 python27-six python27-urlgrabber 1.8.0 3.10 python27-urllib3 1.24.3 python3 python3-attrs python3-audit python3-awscrt python3-babel python3-cffi python3-chardet python3-colorama python3-configobj python3-cryptography python3-dateutil python3-dbus python3-distro python3-dnf python3-dnf-plugins- core python3-docutils 3.9.16 20.3.0 3.0.6 0.19.19 2.9.1 1.14.5 4.0.0 0.4.4 5.0.6 36.0.1 2.8.1 1.2.18 1.5.0 4.14.0 4.3.0 0.16 AL1 and AL2023 Minimal AMI comparison 177 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal python3-gpg python3-hawkey python3-idna python3-jinja2 python3-jmespath python3-jsonpatch python3-jsonpointer python3-jsonschema python3-libcomps python3-libdnf python3-libs python3-libselinux python3-libsemanage python3-markupsafe python3-netifaces python3-oauthlib python3-pip-wheel python3-ply python3-policycore utils python3-prettytable 1.15.1 0.69.0 2.10 2.11.3 0.10.0 1.21 2.0 3.2.0 0.1.20 0.69.0 3.9.16 3.4 3.4 1.1.1 0.10.6 3.0.2 21.3.1 3.11 3.4 0.7.2 AL1 and AL2023 Minimal AMI comparison 178 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal python3-prompt-too lkit python3-pycparser python3-pyrsistent python3-pyserial python3-pysocks python3-pytz python3-pyyaml python3-requests python3-rpm python3-ruamel-yaml python3-ruamel-yaml- clib python3-setools python3-setuptools python3-setuptools- wheel python3-six python3-systemd python3-urllib3 python3-wcwidth 3.0.24 2.20 0.17.3 3.4 1.7.1 2022.7.1 5.4.1 2.25.1 4.16.1.3 0.16.6 0.1.2 4.4.1 59.6.0 59.6.0 1.15.0 235 1.25.10 0.2.5 AL1 and AL2023 Minimal AMI comparison 179 AL1 Minimal AL2023 Minimal User Guide Amazon Linux 2023 Package readline rng-tools rootfiles rpm rpm-build-libs rpm-libs rpm-plugin-selinux rpm-plugin-systemd- inhibit 6.2 8.1 4.11.3 4.11.3 4.11.3 rpm-python27 4.11.3 rpm-sign-libs rsyslog 5.8.10 sbsigntools sed 4.2.1 selinux-policy selinux-policy-tar geted sendmail setserial setup shadow-utils 8.14.4 2.17 2.8.14 4.1.4.2 8.1 6.14 8.1 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 0.9.4 4.8 38.1.45 38.1.45 2.13.7 4.9 AL1 and AL2023 Minimal AMI comparison 180 Amazon Linux 2023 User Guide Package AL1 Minimal AL2023 Minimal 1.1 2.2.1 3.7.17 1.8.23 1.0 2.1.0 shared-mime-info slang sqlite sqlite-libs sudo sysctl-defaults sysfsutils systemd systemd-libs systemd-networkd systemd-pam systemd-resolved systemd-udev 3.40.0 1.9.15 1.0 252.23 252.23 252.23 252.23 252.23 252.23 system-release 2018.03 2023.6.20241031 sysvinit tar tcp_wrappers-libs tzdata udev update-motd 2.87 1.26 7.6 2023c 173 1.0.1 1.34 2024a 2.2 AL1 and AL2023 Minimal AMI comparison 181 AL1 Minimal AL2023 Minimal User Guide Amazon Linux 2023 Package upstart userspace-rcu ustr util-linux util-linux-core vim-data vim-minimal which xfsprogs xz xz-libs yum yum-metadata-parser 0.6.5 1.0.4 2.23.2 9.0.2120 9.0.2120 2.19 5.2.2 5.2.2 3.4.3 1.1.4 yum-plugin-priorit 1.1.31 ies yum-plugin-upgrade- 1.1.31 helper zlib zram-generator zram-generator-def aults 1.2.8 0.12.1 2.37.4 2.37.4 9.0.2153 9.0.2153 2.21 5.18.0 5.2.5 5.2.5 4.14.0 1.2.11 1.1.2 1.1.2 AL1 and AL2023 Minimal AMI comparison 182 Amazon Linux 2023 Package zstd AL1 Minimal AL2023 Minimal 1.5.5 User Guide Comparing packages installed on Amazon Linux 1 (AL1) and Amazon Linux 2023 base container images A comparison of the RPMs present on the AL1 and AL2023 base container images. Package AL1 Container AL2023 Container alternatives amazon-linux-repo- cdn audit-libs basesystem bash bzip2-libs 10.0 4.2.46 1.0.6 1.15 2023.6.20241031 3.0.6 11 5.2.15 1.0.8 ca-certificates 2023.2.62 2023.2.68 1.3.49.3 8.22 chkconfig coreutils coreutils-single crypto-policies curl 7.61.1 curl-minimal cyrus-sasl-lib 2.1.23 8.32 20220428 8.5.0 AL1 and AL2023 Container comparison
al2023-ug-036
al2023-ug.pdf
36
9.0.2153 2.21 5.18.0 5.2.5 5.2.5 4.14.0 1.2.11 1.1.2 1.1.2 AL1 and AL2023 Minimal AMI comparison 182 Amazon Linux 2023 Package zstd AL1 Minimal AL2023 Minimal 1.5.5 User Guide Comparing packages installed on Amazon Linux 1 (AL1) and Amazon Linux 2023 base container images A comparison of the RPMs present on the AL1 and AL2023 base container images. Package AL1 Container AL2023 Container alternatives amazon-linux-repo- cdn audit-libs basesystem bash bzip2-libs 10.0 4.2.46 1.0.6 1.15 2023.6.20241031 3.0.6 11 5.2.15 1.0.8 ca-certificates 2023.2.62 2023.2.68 1.3.49.3 8.22 chkconfig coreutils coreutils-single crypto-policies curl 7.61.1 curl-minimal cyrus-sasl-lib 2.1.23 8.32 20220428 8.5.0 AL1 and AL2023 Container comparison 183 AL1 Container AL2023 Container User Guide 4.7.25 4.7.25 Amazon Linux 2023 Package db4 db4-utils dnf dnf-data elfutils-default-y ama-scope elfutils-libelf 0.168 elfutils-libs expat file-libs filesystem gawk gdbm gdbm-libs glib2 glibc glibc-common glibc-minimal-lang pack gmp gnupg2 2.1.0 5.37 2.4.30 3.1.7 1.8.0 2.36.3 2.17 2.17 6.0.0 2.0.28 4.14.0 4.14.0 0.188 0.188 0.188 2.5.0 5.39 3.14 5.1.0 1.19 2.74.7 2.34 2.34 2.34 6.2.1 AL1 and AL2023 Container comparison 184 Amazon Linux 2023 User Guide Package AL1 Container AL2023 Container gnupg2-minimal gpgme grep gzip info json-c keyutils-libs krb5-libs libacl libarchive libassuan libattr libblkid libcap libcap-ng 1.4.3 2.20 1.5 5.1 1.5.8 1.15.1 2.2.49 2.0.3 2.4.46 2.16 libcom_err 1.43.5 libcomps libcurl libcurl-minimal libdnf 7.61.1 2.3.7 1.15.1 3.8 0.14 1.6.3 1.21.3 2.3.1 3.7.4 2.5.5 2.5.1 2.37.4 2.48 0.8.2 1.46.5 0.1.20 8.5.0 0.69.0 AL1 and AL2023 Container comparison 185 Amazon Linux 2023 Package libffi libgcc libgcc72 libgcrypt libgomp libgpg-error libicu libidn2 libmodulemd libmount libnghttp2 libpsl librepo libreport-filesystem libselinux libsepol libsigsegv libsmartcols libsolv libssh2 AL1 Container AL2023 Container User Guide 3.0.13 7.2.1 1.5.3 1.11 50.2 2.3.0 1.33.0 0.6.2 2.1.10 2.1.7 1.4.2 3.4.4 11.4.1 1.10.2 11.4.1 1.42 2.3.2 2.13.0 2.37.4 1.59.0 0.21.1 1.14.5 2.15.2 3.4 3.4 2.13 2.37.4 0.7.22 AL1 and AL2023 Container comparison 186 Amazon Linux 2023 Package libstdc++ libstdc++72 libtasn1 libunistring libuuid libverto libxcrypt libxml2 libxml2-python27 libyaml libzstd lua lua-libs lz4-libs make mpfr ncurses ncurses-base ncurses-libs npth AL1 Container AL2023 Container User Guide 7.2.1 2.3 0.9.3 0.2.5 2.9.1 2.9.1 5.1.4 3.82 5.7 5.7 5.7 11.4.1 4.19.0 0.9.10 2.37.4 0.3.2 4.4.33 2.10.4 0.2.5 1.5.5 5.4.4 1.9.4 4.1.0 6.2 6.2 1.6 AL1 and AL2023 Container comparison 187 Amazon Linux 2023 User Guide Package AL1 Container AL2023 Container nspr nss nss-pem nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util openldap openssl openssl-libs p11-kit p11-kit-trust pcre pcre2 pcre2-syntax pinentry pkgconfig popt pth 4.25.0 3.53.1 1.0.3 3.53.1 3.53.1 3.53.1 3.53.1 3.53.1 2.4.40 1.0.2k 0.18.5 0.18.5 8.21 0.7.6 0.27.1 1.13 2.0.7 3.0.8 0.24.1 0.24.1 10.40 10.40 1.18 AL1 and AL2023 Container comparison 188 Amazon Linux 2023 User Guide Package AL1 Container AL2023 Container publicsuffix-list- 20240212 2.7.18 2.0.1 0.3.1 1.1.1 2.7.18 7.19.0 0.3 0.5.3 0.5.0 3.10 dafsa python27 python27-chardet python27-iniparse python27-kitchen python27-libs python27-pycurl python27-pygpgme python27-pyliblzma python27-pyxattr python27-urlgrabber python3 python3-dnf python3-gpg python3-hawkey python3-libcomps python3-libdnf python3-libs python3-pip-wheel python3-rpm 3.9.16 4.14.0 1.15.1 0.69.0 0.1.20 0.69.0 3.9.16 21.3.1 4.16.1.3 AL1 and AL2023 Container comparison 189 Amazon Linux 2023 User Guide Package AL1 Container AL2023 Container python3-setuptools- wheel readline rpm rpm-build-libs rpm-libs rpm-python27 rpm-sign-libs sed setup shared-mime-info sqlite sqlite-libs 6.2 4.11.3 4.11.3 4.11.3 4.11.3 4.2.1 2.8.14 1.1 3.7.17 59.6.0 8.1 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 4.8 2.13.7 3.40.0 sysctl-defaults 1.0 system-release 2018.03 2023.6.20241031 tar tzdata xz-libs yum yum-metadata-parser 1.26 2023c 5.2.2 3.4.3 1.1.4 yum-plugin-ovl 1.1.31 2024a 5.2.5 4.14.0 AL1 and AL2023 Container comparison 190 Amazon Linux 2023 User Guide Package AL1 Container AL2023 Container yum-plugin-priorit 1.1.31 ies yum-utils zlib 1.1.31 1.2.8 1.2.11 AL1 and AL2023 Container comparison 191 Amazon Linux 2023 User Guide AL2023 system requirements This section describes the system requirements for using AL2023. Topics • CPU requirements for running AL2023 • Memory (RAM) requirements for running AL2023 CPU requirements for running AL2023 To run any AL2023 code, the processor used needs to meet certain minimum requirements. Attempts to run AL2023 on CPUs that do not meet these requirements might result in illegal instruction errors very early in code execution. The minimum requirements apply to AL2023 on Amazon EC2, AL2023 in containers, and AL2023 outside Amazon EC2. ARM CPU Requirements for AL2023 All AL2023 aarch64 (ARM) binaries are built for 64-bit. No 32-bit ARM binaries are available, so a 64-bit ARM CPU is required. Note For Arm-based instances, AL2023 only supports instance types that use Graviton2 or later processors. AL2023 doesn't support A1 instances. AL2023 requires an ARMv8.2 compliant processor with the Cryptography Extension (ARMv8.2+crypto). All AL2023 packages for aarch64 are built with the -march=armv8.2-a +crypto compiler flag. Although we attempt to print graceful error messages when AL2023 code is attempted to be run on older ARM processors, it is possible that the first error message may be an illegal instruction error. CPU requirements for running AL2023 192 Amazon Linux 2023 Note User Guide Because of the AL2023 aarch64 base CPU requirements, all Raspberry Pi systems prior to the Raspberry Pi 5 do not meet the minimum CPU requirements. x86-64 CPU Requirements for
al2023-ug-037
al2023-ug.pdf
37
instances. AL2023 requires an ARMv8.2 compliant processor with the Cryptography Extension (ARMv8.2+crypto). All AL2023 packages for aarch64 are built with the -march=armv8.2-a +crypto compiler flag. Although we attempt to print graceful error messages when AL2023 code is attempted to be run on older ARM processors, it is possible that the first error message may be an illegal instruction error. CPU requirements for running AL2023 192 Amazon Linux 2023 Note User Guide Because of the AL2023 aarch64 base CPU requirements, all Raspberry Pi systems prior to the Raspberry Pi 5 do not meet the minimum CPU requirements. x86-64 CPU Requirements for AL2023 All AL2023 x86-64 binaries are built for the x86-64v2 revision of the x86-64 architecture by passing -march=x86-64-v2 to the compiler. The x86-64v2 revision of the architecture adds the following CPU features on top of the baseline x86-64 architecture: • CMPXCHG16B • LAHF-SAHF • POPCNT • SSE3 • SSE4_1 • SSE4_2 • SSSE3 This roughly maps to x86-64 processors released in 2009 or later. Examples include the Intel Nehalem, AMD Jaguar, Atom Silvermont, along with the VIA Nano and Eden C microarchitectures. In Amazon EC2, all x86-64 instance types support x86-64v2, including M1, C1, and M2 instance families. No 32-bit x86 (i686) AL2023 binaries are built. Although AL2023 retains support for running 32-bit userspace binaries, this functionality is deprecated and might be removed in a future major version of Amazon Linux. For more information, see 32bit x86 (i686) Packages. Memory (RAM) requirements for running AL2023 The Amazon EC2 .nano family of instance types (t2.nano, t3.nano, t3a.nano, and t4g.nano) have 512 MB RAM which is the minimum requirement for AL2023. x86-64 CPU Requirements for AL2023 193 Amazon Linux 2023 Note User Guide Although 512 MB is the miminum requirement, these instance types are memory constrained and functionality and performance may be limited. AL2023 images have not been tested on systems with less than 512 MB RAM. Running AL2023 based container images in less than 512 MB RAM will be dependent on the containerized workload. Some workloads, such as dnf upgrade between some AL2023 releases can require more than 512 MB RAM. For this reason, the AL2023.3 release introduced enabling zram by default for instances with less than 800 MB of RAM. For containerized workloads, this means that some workloads might run fine on AL2023 instances with this amount of memory, but fail when run in a container restricted to this amount of memory usage. For instance types with less than 800 MB of RAM, AL2023 (as of AL2023.3 or newer) will enable zram based swap by default. Examples of Amazon EC2 instance types with less than 800 MB memory include t4g.nano, t3a.nano, t3.nano, t2.nano, and t1.micro. This means fewer out of memory scenarios for these instance types, because AL2023 will on-demand compress and decompress memory pages. This enables workloads that would otherwise require an instance type with more memory, at the expense of CPU usage needed to do the compression. Memory (RAM) requirements for running AL2023 194 Amazon Linux 2023 User Guide AL2023 Graphical Desktop Amazon Linux 2023 provides an optional, lightweight, cloud-optimized graphical interface based on GNOME as of release 2023.7. This modern desktop environment delivers enhanced productivity features with built-in tools like Firefox for secure browsing, while maintaining Amazon DCV and VNC support for remote access. Related topics For more information about installing the graphical desktop environment, see the following documentation: • Tutorial: Install the GNOME desktop environment on AL2023 Related topics 195 Amazon Linux 2023 User Guide Running applications on AL2023 This section covers methods for running applications on Amazon Linux 2023 (AL2023), including managing when they start (and restart), and controlling resource usage. Topics • Limiting process resource usage in AL2023 using systemd • Limiting process resource usage in AL2023 using cgroups Limiting process resource usage in AL2023 using systemd On Amazon Linux 2023 (AL2023), we recommend using systemd to control what resources can be used by processes, or groups of processes. Using systemd is a powerful and easy to use replacement for either manipulating cgroups manually, or using utilities such as cpulimit, which was previously only available for Amazon Linux in the third party EPEL repository. For comprehensive information, see the upstream systemd documentation for systemd.resource- control, or the man page for systemd.resource-control on an AL2023 instance. The examples below will use the stress-ng CPU stress test (from the stress-ng package) to simulate a CPU heavy application, and memcached to simulate a memory heavy application. The below examples cover placing a CPU limit on a one-off command and a memory limit on a service. Most resource constraints that systemd offers can be used in any place that systemd will run a process, and multiple can be used at the same time. The examples below are limited to a single constraint for illustrive purposes. Resource control with
al2023-ug-038
al2023-ug.pdf
38
control, or the man page for systemd.resource-control on an AL2023 instance. The examples below will use the stress-ng CPU stress test (from the stress-ng package) to simulate a CPU heavy application, and memcached to simulate a memory heavy application. The below examples cover placing a CPU limit on a one-off command and a memory limit on a service. Most resource constraints that systemd offers can be used in any place that systemd will run a process, and multiple can be used at the same time. The examples below are limited to a single constraint for illustrive purposes. Resource control with systemd-run for running one-off commands While commonly associated with system services, systemd can also be used by non-root users to run services, schedule timers, or run one-off processes. In the following example, we are going to use stress-ng as our example application. In the first example, we will run it using systemd-run in the ec2-user default account, and in the second example we will place limits on its CPU usage. Example Use systemd-run on the command line to run a process, not limiting resource usage 1. Ensure the stress-ng package is installed, as we are going to use it for our example. Resource control with systemd 196 Amazon Linux 2023 User Guide [ec2-user ~]$ sudo dnf install -y stress-ng 2. Use systemd-run to execute a 10 second CPU stress test without limiting how much CPU it can use. [ec2-user ~]$ systemd-run --user --tty --wait --property=CPUAccounting=1 stress-ng --cpu 1 --timeout 10 Running as unit: run-u6.service Press ^] three times within 1s to disconnect TTY. stress-ng: info: [339368] setting to a 10 second run per stressor stress-ng: info: [339368] dispatching hogs: 1 cpu stress-ng: info: [339368] successful run completed in 10.00s Finished with result: success Main processes terminated with: code=exited/status=0 Service runtime: 10.068s CPU time consumed: 9.060s The --user option tells systemd-run to execute the command as the user we are logged in as, the --tty option means a TTY is attached, --wait means to wait until the service is finished, and the --property=CPUAccounting=1 option instructs systemd-run to record how much CPU time is used running the process. The --property command line option can be used to pass systemd-run settings that could be configured in a systemd.unit configuration file. When instructed to place load on the CPU, the stress-ng program will use all available CPU time to perform its test for the duration you ask it to run. For a real-world application, it may be desirable to place a limit on total run-time of a process. In the below example, we will ask stress- ng to run for a longer time than the maximum duration restriction we place on it using systemd- run. Example Use systemd-run on the command line to run a process, limiting CPU usage to 1 second 1. 2. Ensure the stress-ng is installed to run this example. The LimitCPU property is the equivalent of ulimit -t which will limit the maximum amount of time on the CPU this process will be allowed to use. In this case, since we are asking Resource control with systemd-run for running one-off commands 197 Amazon Linux 2023 User Guide for a 10 second stress run, and we are limiting the CPU usage to 1 second, the command will receive a SIGXCPU signal and fail. [ec2-user ~]$ systemd-run --user --tty --wait --property=CPUAccounting=1 -- property=LimitCPU=1 stress-ng --cpu 1 --timeout 10 Running as unit: run-u12.service Press ^] three times within 1s to disconnect TTY. stress-ng: info: [340349] setting to a 10 second run per stressor stress-ng: info: [340349] dispatching hogs: 1 cpu stress-ng: fail: [340349] cpu instance 0 corrupted bogo-ops counter, 1370 vs 0 stress-ng: fail: [340349] cpu instance 0 hash error in bogo-ops counter and run flag, 3250129726 vs 0 stress-ng: fail: [340349] metrics-check: stressor metrics corrupted, data is compromised stress-ng: info: [340349] unsuccessful run completed in 1.14s Finished with result: exit-code Main processes terminated with: code=exited/status=2 Service runtime: 1.201s CPU time consumed: 1.008s More commonly, you may want to restrict the percentage of CPU time that can be consumed by a particular process. In the below example, we will restrict the percentage of CPU time that can be consumed by stress-ng. For a real-world service, it may be desirable to limit the maximum percentage of CPU time a background process can consume in order to leave resources free for the process serving user requests. Example Use systemd-run to limit a process to 10% of CPU time on one CPU 1. Ensure the stress-ng is installed to run this example. 2. We are going to use the CPUQuota property to tell systemd-run to constrain CPU usage for the command we are going to run. We are not limiting the amount of time the process can run for, just how much CPU it can use.
al2023-ug-039
al2023-ug.pdf
39
real-world service, it may be desirable to limit the maximum percentage of CPU time a background process can consume in order to leave resources free for the process serving user requests. Example Use systemd-run to limit a process to 10% of CPU time on one CPU 1. Ensure the stress-ng is installed to run this example. 2. We are going to use the CPUQuota property to tell systemd-run to constrain CPU usage for the command we are going to run. We are not limiting the amount of time the process can run for, just how much CPU it can use. [ec2-user ~]$ systemd-run --user --tty --wait --property=CPUAccounting=1 -- property=CPUQuota=10% stress-ng --cpu 1 --timeout 10 Running as unit: run-u13.service Press ^] three times within 1s to disconnect TTY. stress-ng: info: [340664] setting to a 10 second run per stressor stress-ng: info: [340664] dispatching hogs: 1 cpu Resource control with systemd-run for running one-off commands 198 Amazon Linux 2023 User Guide stress-ng: info: [340664] successful run completed in 10.08s Finished with result: success Main processes terminated with: code=exited/status=0 Service runtime: 10.140s CPU time consumed: 1.014s Note how the CPU accounting tells us that while the service ran for 10 seconds, it only consumed 1 second of actual CPU time. There are many ways to configure systemd to limit resource usage for CPU, memory, networking, and IO. See the upstream systemd documentation for systemd.resource-control, or the man page for systemd.resource-control on an AL2023 instance for comprehensive documentation. Behind the scenes, systemd is using features of the Linux kernel such as cgroups to implement these limits while avoiding the need for you to configure them by hand. The Linux Kernel documentation for cgroup-v2 contains extensive details about cgroups work. Resource control in a systemd service There are several parameters that can be added to the [Service] section of systemd services to control system resource usage. These include both hard and soft limits. For the exact behavior of each option, refer to the upstream systemd documentation for systemd.resource-control, or the man page for systemd.resource-control on an AL2023 instance. Commonly used limits are MemoryHigh to specify a throttling limit on memory usage, MemoryMax to set a hard upper limit (which, once reached, the OOM Killer is invoked), and CPUQuota (as illustrated in the previous section). It is also possible to configure weights and priorities rather than fixed numbers. Example Using systemd to set memory usage limits on services In this example we will set a hard memory usage limit for memcached, a simple key-value cache, and show how the OOM Killer is invoked for that service rather than the whole system. 1. First, we need to install the packages required for this example. [ec2-user ~]$ sudo dnf install -y memcached libmemcached-awesome-tools 2. Enable the memcached.service and then start the service so that memcached is running. Resource control in a systemd service 199 Amazon Linux 2023 User Guide [ec2-user ~]$ sudo systemctl enable memcached.service Created symlink /etc/systemd/system/multi-user.target.wants/memcached.service # / usr/lib/systemd/system/memcached.service. [ec2-user ~]$ sudo systemctl start memcached.service 3. Check that memcached.service is running. [ec2-user ~]$ sudo systemctl status memcached.service # memcached.service - memcached daemon Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled) Active: active (running) since Fri 2025-01-31 22:36:42 UTC; 1s ago Main PID: 356294 (memcached) Tasks: 10 (limit: 18907) Memory: 1.8M CPU: 20ms CGroup: /system.slice/memcached.service ##356294 /usr/bin/memcached -p 11211 -u memcached -m 64 -c 1024 -l 127.0.0.1,::1 Jan 31 22:35:36 ip-1-2-3-4.us-west-2.compute.internal systemd[1]: Started memcached.service - memcached daemon. 4. Now that memcached is installed and running, we can observe that it functions by insterting some random data into the cache In /etc/sysconfig/memcached the CACHESIZE variable is set to 64 by default, meaning 64 megabytes. By inserting more data into the cache than the maximum cache size, we can see that we fill the cache and some items are evicted using memcached-tool, and that the memcached.service is using around 64MB of memory. [ec2-user ~]$ for i in $(seq 1 150); do dd if=/dev/random of=$i bs=512k count=1; memcp -s localhost $i; done [ec2-user ~]$ memcached-tool localhost display # Item_Size Max_age Pages Count Full? Evicted Evict_Time OOM 2 120B 0s 1 0 no 0 0 0 39 512.0K 4s 63 126 yes 24 2 0 [ec2-user ~]$ sudo systemctl status memcached.service # memcached.service - memcached daemon Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled) Resource control in a systemd service 200 Amazon Linux 2023 User Guide Active: active (running) since Fri 2025-01-31 22:36:42 UTC; 7min ago Main PID: 356294 (memcached) Tasks: 10 (limit: 18907) Memory: 66.7M CPU: 203ms CGroup: /system.slice/memcached.service ##356294 /usr/bin/memcached -p 11211 -u memcached -m 64 -c 1024 -l 127.0.0.1,::1 Jan 31 22:36:42 ip-1-2-3-4.us-west-2.compute.internal systemd[1]: Started memcached.service - memcached daemon. 5. Use the MemoryMax property to set a hard limit for the memcached.service where, if hit, the OOM Killer will be invoked. Additional options can be set for the service by adding them
al2023-ug-040
al2023-ug.pdf
40
- memcached daemon Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled) Resource control in a systemd service 200 Amazon Linux 2023 User Guide Active: active (running) since Fri 2025-01-31 22:36:42 UTC; 7min ago Main PID: 356294 (memcached) Tasks: 10 (limit: 18907) Memory: 66.7M CPU: 203ms CGroup: /system.slice/memcached.service ##356294 /usr/bin/memcached -p 11211 -u memcached -m 64 -c 1024 -l 127.0.0.1,::1 Jan 31 22:36:42 ip-1-2-3-4.us-west-2.compute.internal systemd[1]: Started memcached.service - memcached daemon. 5. Use the MemoryMax property to set a hard limit for the memcached.service where, if hit, the OOM Killer will be invoked. Additional options can be set for the service by adding them to an override file. This can be done either by directly editing the /etc/systemd/system/ memcached.service.d/override.conf file, or interactively using the edit command of systemctl. [ec2-user ~]$ sudo systemctl edit memcached.service Add the below to the override to set a hard limit of 32MB of memory for the service. [Service] MemoryMax=32M 6. Tell systemd to reload its configuration [ec2-user ~]$ sudo systemctl daemon-reload 7. Observe that the memcached.service is now running with a memory limit of 32MB. [ec2-user ~]$ sudo systemctl status memcached.service # memcached.service - memcached daemon Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled) Drop-In: /etc/systemd/system/memcached.service.d ##override.conf Active: active (running) since Fri 2025-01-31 23:09:13 UTC; 49s ago Main PID: 358423 (memcached) Tasks: 10 (limit: 18907) Resource control in a systemd service 201 Amazon Linux 2023 User Guide Memory: 1.8M (max: 32.0M available: 30.1M) CPU: 25ms CGroup: /system.slice/memcached.service ##358423 /usr/bin/memcached -p 11211 -u memcached -m 64 -c 1024 -l 127.0.0.1,::1 Jan 31 23:09:13 ip-1-2-3-4.us-west-2.compute.internal systemd[1]: Started memcached.service - memcached daemon. 8. The service will function normally while using less than 32MB of memory, which we can check by loading less than 32MB of random data into the cache, and then checking the status of the service. [ec2-user ~]$ for i in $(seq 1 30); do dd if=/dev/random of=$i bs=512k count=1; memcp -s localhost $i; done [ec2-user ~]$ sudo systemctl status memcached.service # memcached.service - memcached daemon Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled) Drop-In: /etc/systemd/system/memcached.service.d ##override.conf Active: active (running) since Fri 2025-01-31 23:14:48 UTC; 3s ago Main PID: 359492 (memcached) Tasks: 10 (limit: 18907) Memory: 18.2M (max: 32.0M available: 13.7M) CPU: 42ms CGroup: /system.slice/memcached.service ##359492 /usr/bin/memcached -p 11211 -u memcached -m 64 -c 1024 -l 127.0.0.1,::1 Jan 31 23:14:48 ip-1-2-3-4.us-west-2.compute.internal systemd[1]: Started memcached.service - memcached daemon. 9. We can now make memcached to use more than 32MB of memory by attempting to use the full 64MB of cache that the default memcached configuration is. [ec2-user ~]$ for i in $(seq 1 150); do dd if=/dev/random of=$i bs=512k count=1; memcp -s localhost $i; done Resource control in a systemd service 202 Amazon Linux 2023 User Guide You will observe that at some point during the above command there are connection errors to the memcached server. This is because the OOM Killer has killed the process due to the restriction we placed on it. The rest of the system will function as normal, and no other processes will be considered by the OOM Killer, as it is only the memcached.service that we have restricted. [ec2-user ~]$ sudo systemctl status memcached.service # memcached.service - memcached daemon Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled) Drop-In: /etc/systemd/system/memcached.service.d ##override.conf Active: failed (Result: oom-kill) since Fri 2025-01-31 23:20:28 UTC; 2s ago Duration: 2.901s Process: 360130 ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS (code=killed, signal=KILL) Main PID: 360130 (code=killed, signal=KILL) CPU: 94ms Jan 31 23:20:25 ip-1-2-3-4.us-west-2.compute.internal systemd[1]: Started memcached.service - memcached daemon. Jan 31 23:20:28 ip-1-2-3-4.us-west-2.compute.internal systemd[1]: memcached.service: A process of this unit has been killed by the OOM killer. Jan 31 23:20:28 ip-1-2-3-4.us-west-2.compute.internal systemd[1]: memcached.service: Main process exited, code=killed, status=9/KILL Jan 31 23:20:28 ip-1-2-3-4.us-west-2.compute.internal systemd[1]: memcached.service: Failed with result 'oom-kill'. Limiting process resource usage in AL2023 using cgroups While it is recommended to use Resource control with systemd, this section covers basic usage of the base libcgroup-tools utilities to limit CPU and memory usage of processes. Both methods are alternatives to using the cpulimit utility, previously found in EPEL. The example below covers running the stress-ng stress test (from the stress-ng package) while limiting its CPU and memory usage using utilities from the libcgroup-tools package, and the tunables in sysfs. Using cgroups utilities 203 Amazon Linux 2023 User Guide Use libcgroup-tools on the command line to limit resource usage 1. Install the libcgroup-tools package. [ec2-user ~]$ sudo dnf install libcgroup-tools 2. Create a cgroup with the memory and cpu controllers, and give it a name (our-example- limits). Using the -a and -t options to allow the ec2-user user to control the tunables of the cgroup [ec2-user ~]$ sudo cgcreate -a ec2-user -t ec2-user -g memory,cpu:our-example- limits There is now a /sys/fs/cgroup/our-example-limits/ directory that contains files that can be used to control each tunable. Note Amazon Linux 2 uses cgroup-v1 rather cgroup-v2 which is used on AL2023. On AL2,
al2023-ug-041
al2023-ug.pdf
41
Guide Use libcgroup-tools on the command line to limit resource usage 1. Install the libcgroup-tools package. [ec2-user ~]$ sudo dnf install libcgroup-tools 2. Create a cgroup with the memory and cpu controllers, and give it a name (our-example- limits). Using the -a and -t options to allow the ec2-user user to control the tunables of the cgroup [ec2-user ~]$ sudo cgcreate -a ec2-user -t ec2-user -g memory,cpu:our-example- limits There is now a /sys/fs/cgroup/our-example-limits/ directory that contains files that can be used to control each tunable. Note Amazon Linux 2 uses cgroup-v1 rather cgroup-v2 which is used on AL2023. On AL2, the sysfs paths are different, and there will be /sys/fs/cgroup/memory/our- example-limits and /sys/fs/cgroup/cpu/our-example-limits directories owned by ec2-user which contain files that can be used to control the limits of the cgroup. 3. Limit memory usage of all processes in our cgroup to 100 million bytes. [ec2-user ~]$ echo 100000000 > /sys/fs/cgroup/our-example-limits/memory.max Note Amazon Linux 2 uses cgroup-v1 rather than the cgroup-v2 that Amazon Linux 2023 uses. This means that some tunables are different. To limit memory usage on AL2, the below tunable is used instead. [ec2-user ~]$ echo 10000000 > /sys/fs/cgroup/memory/our-example-limits/ memory.limit_in_bytes Using cgroups utilities 204 Amazon Linux 2023 User Guide 4. Limit CPU usage of all processes in our cgroup to 10%. The format of the cpu.max file is $MAX $PERIOD, limiting the group to consuming $MAX for every $PERIOD. [ec2-user ~]$ echo 10000 100000 > /sys/fs/cgroup/our-example-limits/cpu.max Amazon Linux 2 uses cgroup-v1 rather than the cgroup-v2 that Amazon Linux 2023 uses. This means that some tunables are different, including how to limit CPU usage. 5. The below example runs stress-ng (which can be installed by running dnf install - y stress-ng) in the our-example-limits cgroup. While the stress-ng command is running, you can observe using top that it is limited to 10% of CPU time. [ec2-user ~]$ sudo cgexec -g memory,cpu:our-example-limits stress-ng --cpu 1 6. Clean up by removing the cgroup [ec2-user ~]$ sudo cgdelete -g memory,cpu:our-example-limits The Linux Kernel documentation for cgroup-v2 contains extensive details about how they work. The documentation of the cpu and memory controllers covers the details of how to use each tunable option. Using cgroups utilities 205 Amazon Linux 2023 User Guide Using AL2023 on AWS You can set up AL2023 for use with other AWS services. For example, you can choose an AL2023 AMI when you launch an Amazon Elastic Compute Cloud (Amazon EC2) instance. For these setup procedures, you use the AWS Identity and Access Management (IAM) service. For complete information about IAM, see the following reference materials: • AWS Identity and Access Management (IAM) • IAM User Guide Topics • Getting started with AWS • AL2023 on Amazon EC2 • Using AL2023 in containers • AL2023 on AWS Elastic Beanstalk • Using AL2023 in AWS CloudShell • Using AL2023 based Amazon ECS AMIs to host containerized workloads • Using Amazon Elastic File System on AL2023 • Using Amazon EMR built on AL2023 • Using AL2023 in AWS Lambda Getting started with AWS Sign up for an AWS account If you do not have an AWS account, complete the following steps to create one. To sign up for an AWS account 1. Open https://portal.aws.amazon.com/billing/signup. 2. Follow the online instructions. Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad. Getting started with AWS 206 Amazon Linux 2023 User Guide When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform tasks that require root user access. AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view your current account activity and manage your account by going to https://aws.amazon.com/ and choosing My Account. Create a user with administrative access After you sign up for an AWS account, secure your AWS account root user, enable AWS IAM Identity Center, and create an administrative user so that you don't use the root user for everyday tasks. Secure your AWS account root user 1. Sign in to the AWS Management Console as the account owner by choosing Root user and entering your AWS account email address. On the next page, enter your password. For help signing in by using root user, see Signing in as the root user in the AWS Sign-In User Guide. 2. Turn on multi-factor authentication (MFA) for your root user. For instructions, see Enable a virtual MFA device for your AWS account root user (console) in the IAM User Guide. Create a user with administrative access 1. Enable IAM Identity Center. For instructions, see Enabling AWS IAM Identity
al2023-ug-042
al2023-ug.pdf
42
user 1. Sign in to the AWS Management Console as the account owner by choosing Root user and entering your AWS account email address. On the next page, enter your password. For help signing in by using root user, see Signing in as the root user in the AWS Sign-In User Guide. 2. Turn on multi-factor authentication (MFA) for your root user. For instructions, see Enable a virtual MFA device for your AWS account root user (console) in the IAM User Guide. Create a user with administrative access 1. Enable IAM Identity Center. For instructions, see Enabling AWS IAM Identity Center in the AWS IAM Identity Center User Guide. 2. In IAM Identity Center, grant administrative access to a user. For a tutorial about using the IAM Identity Center directory as your identity source, see Configure user access with the default IAM Identity Center directory in the AWS IAM Identity Center User Guide. Create a user with administrative access 207 Amazon Linux 2023 User Guide Sign in as the user with administrative access • To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user. For help signing in using an IAM Identity Center user, see Signing in to the AWS access portal in the AWS Sign-In User Guide. Assign access to additional users 1. In IAM Identity Center, create a permission set that follows the best practice of applying least- privilege permissions. For instructions, see Create a permission set in the AWS IAM Identity Center User Guide. 2. Assign users to a group, and then assign single sign-on access to the group. For instructions, see Add groups in the AWS IAM Identity Center User Guide. Granting programmatic access Users need programmatic access if they want to interact with AWS outside of the AWS Management Console. The way to grant programmatic access depends on the type of user that's accessing AWS. To grant users programmatic access, choose one of the following options. Which user needs programmatic access? To By Workforce identity (Users managed in IAM Identity Center) Use temporary credentials to sign programmatic requests to the AWS CLI, AWS SDKs, or AWS APIs. Following the instructions for the interface that you want to use. • For the AWS CLI, see Configuring the AWS CLI to use AWS IAM Identity Center in the AWS Granting programmatic access 208 Amazon Linux 2023 User Guide Which user needs programmatic access? To By Command Line Interface User Guide. • For AWS SDKs, tools, and AWS APIs, see IAM Identity Center authentication in the AWS SDKs and Tools Reference Guide. IAM IAM Use temporary credentials to sign programmatic requests Following the instructions in Using temporary credentia to the AWS CLI, AWS SDKs, or AWS APIs. ls with AWS resources in the IAM User Guide. (Not recommended) Use long-term credentials to Following the instructions for the interface that you want to sign programmatic requests use. to the AWS CLI, AWS SDKs, or AWS APIs. • For the AWS CLI, see Authenticating using IAM user credentials in the AWS Command Line Interface User Guide. • For AWS SDKs and tools, see Authenticate using long-term credentials in the AWS SDKs and Tools Reference Guide. • For AWS APIs, see Managing access keys for IAM users in the IAM User Guide. Granting programmatic access 209 Amazon Linux 2023 User Guide AL2023 on Amazon EC2 Use one of the following procedures to launch an Amazon EC2 instance with an AL2023 AMI. You can choose either the standard AMI, or the minimal AMI. For more information about the differences between the standard AMI and the minimal AMI, see Comparing AL2023 standard (default) and minimal AMIs. Topics • Launching AL2023 using the Amazon EC2 console • Launching AL2023 using the SSM parameter and AWS CLI • Launching the latest AL2023 AMI using AWS CloudFormation • Launching AL2023 using a specific AMI ID • AL2023 AMI deprecation and life cycle • Connecting to AL2023 instances • Comparing AL2023 standard and minimal AMIs Launching AL2023 using the Amazon EC2 console Use the Amazon EC2 console to launch an AL2023 AMI. Note For Arm-based instances, AL2023 only supports instance types that use Graviton2 or later processors. AL2023 doesn't support A1 instances. Use the following steps to launch an Amazon EC2 instance with an AL2023 AMI from the Amazon EC2 console. To launch an EC2 instance with an AL2023 AMI 1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/. 2. 3. 4. In the navigation pane, choose AMIs. From the filter drop-down, choose Public images. In the search field, enter al2023-ami. AL2023 on Amazon EC2 210 Amazon Linux 2023 Note User Guide Make sure that amazon appears in the Owner alias column. 5. Select an image from the list. Under
al2023-ug-043
al2023-ug.pdf
43
instance types that use Graviton2 or later processors. AL2023 doesn't support A1 instances. Use the following steps to launch an Amazon EC2 instance with an AL2023 AMI from the Amazon EC2 console. To launch an EC2 instance with an AL2023 AMI 1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/. 2. 3. 4. In the navigation pane, choose AMIs. From the filter drop-down, choose Public images. In the search field, enter al2023-ami. AL2023 on Amazon EC2 210 Amazon Linux 2023 Note User Guide Make sure that amazon appears in the Owner alias column. 5. Select an image from the list. Under Source, you can determine whether the AMI is standard or minimal. An AL2023 AMI name can be interpreted by using this format: 'al2023-[ami || ami-minimal]-2023.0.[release build date].[build number]-kernel-[version number]-[arm64 || x86_64]' 6. The following image shows a partial list of AL2023 AMIs. For more information about launching Amazon EC2 instances, see Get started with Amazon EC2 Linux instances in the Amazon EC2 User Guide. Launching AL2023 using the SSM parameter and AWS CLI In the AWS CLI, you can use an AMI's SSM parameter value to launch a new instance of AL2023. More specifically, use one of the dynamic SSM parameter values from the following list, and add / aws/service/ami-amazon-linux-latest/ before the SSM parameter value/. You use this to launch the instance in the AWS CLI. • al2023-ami-kernel-default-arm64 for arm64 architecture • al2023-ami-minimal-kernel-default-arm64 for arm64 architecture (minimal AMI) • al2023-ami-kernel-default-x86_64 for x86_64 architecture • al2023-ami-minimal-kernel-default-x86_64 for x86_64 architecture (minimal AMI) Launching AL2023 using the SSM parameter and AWS CLI 211 Amazon Linux 2023 Note User Guide Each of the italic items is an example parameter. Replace them with your own information. $ aws ec2 run-instances \ --image-id \ resolve:ssm:/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64 \ --instance-type m5.xlarge \ --region us-east-1 \ --key-name aws-key-us-east-1 \ --security-group-ids sg-004a7650 The --image-id flag specifies the SSM parameter value. The --instance-type flag specifies the type and size of the instance. This flag must be compatible with the AMI type that you selected. The --region flag specifies the AWS Region where you create your instance. The --key-name flag specifies the AWS Region's key that's used to connect to the instance. If you don't provide a key that exists in the Region where you create the instance, you can't connect to the instance using SSH. The --security-group-ids flag specifies the security group that determines the access permissions for inbound and outbound network traffic. Important The AWS CLI requires that you specify an existing security group that allows access to the instance from your remote machine over port TCP:22. Without a specified security group, your new instance are placed in a default security group. In a default security group, your instance can only connect with the other instances within your VPC. For more information, see Launching, listing, and terminating Amazon EC2 instances in the AWS Command Line Interface User Guide. Launching AL2023 using the SSM parameter and AWS CLI 212 Amazon Linux 2023 User Guide Launching the latest AL2023 AMI using AWS CloudFormation To launch an AL2023 AMI using AWS CloudFormation, use one of the following templates. Note The x86_64 and Arm64 AMIs each require different instance types. For more information, see Amazon EC2 Instance Types JSON template: { "Parameters": { "LatestAmiId": { "Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>", "Default": "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel- default-x86_64" } }, "Resources": { "MyEC2Instance": { "Type": "AWS::EC2::Instance", "Properties": { "InstanceType": "t2.large", "ImageId": { "Ref": "LatestAmiId" } } } } } YAML template: Parameters: LatestAmiId: Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>' Default: '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default- x86_64' Launching the latest AL2023 AMI using AWS CloudFormation 213 Amazon Linux 2023 Resources: Instance: Type: 'AWS::EC2::Instance' Properties: InstanceType: 't2.large' ImageId: !Ref LatestAmiId User Guide Make sure to replace the AMI parameter at the end of the "Default" section, if needed. The following parameter values are available: • al2023-ami-kernel-6.1-arm64 for arm64 architecture • al2023-ami-minimal-kernel-6.1-arm64 for arm64 architecture (minimal AMI) • al2023-ami-kernel-6.1-x86_64 for x86_64 architecture • al2023-ami-minimal-kernel-6.1-x86_64 for x86_64 architecture (minimal AMI) The following are dynamic kernel specifications. The default kernel version automatically changes with each major kernel version update. • al2023-ami-kernel-default-arm64 for arm64 architecture • al2023-ami-minimal-kernel-default-arm64 for arm64 architecture (minimal AMI) • al2023-ami-kernel-default-x86_64 for x86_64 architecture • al2023-ami-minimal-kernel-default-x86_64 for x86_64 architecture (minimal AMI) Launching AL2023 using a specific AMI ID You can launch a specific AL2023 AMI using the AMI ID. You can determine which AL2023 AMI ID is needed by looking at the AMI list in the Amazon EC2 console. Or, you can use AWS Systems Manager. If you're using Systems Manager, make sure to select the AMI alias from those that are listed in the previous section. For more information, see Query for the latest Amazon Linux AMI IDs using AWS Systems Manager Parameter Store. AL2023 AMI deprecation and life cycle Each new AL2023 release includes a new AMI. When the AMI is registered, it's marked with a deprecation date. The deprecation date for
al2023-ug-044
al2023-ug.pdf
44
AMI using the AMI ID. You can determine which AL2023 AMI ID is needed by looking at the AMI list in the Amazon EC2 console. Or, you can use AWS Systems Manager. If you're using Systems Manager, make sure to select the AMI alias from those that are listed in the previous section. For more information, see Query for the latest Amazon Linux AMI IDs using AWS Systems Manager Parameter Store. AL2023 AMI deprecation and life cycle Each new AL2023 release includes a new AMI. When the AMI is registered, it's marked with a deprecation date. The deprecation date for each AL2023 AMI is 90 days from the time it was released to match the time period that Kernel Live Patching on AL2023 is offered for each individual kernel release. Launching AL2023 using a specific AMI ID 214 Amazon Linux 2023 Note User Guide The 90 day deprecation date refers to an individual AMI and doesn’t refer to the AL2023 Release cadence or product support period. For more information about AMI deprecation, see Deprecate an AMI in the Amazon EC2 User Guide. Regularly using an updated AMI to launch an instance ensures that the instance starts with the latest security updates, including an updated kernel. If you launch a previous version of an AMI and apply updates, there is a period of time that the instance doesn't have the latest security updates. To ensure you're using the latest AMI, we recommend that you use SSM parameters. For more information about using SSM parameters to launch an instance, see: • Launching AL2023 using the SSM parameter and AWS CLI • Launching the latest AL2023 AMI using AWS CloudFormation Connecting to AL2023 instances Use SSH or AWS Systems Manager to connect to your AL2023 instance. Connect to your instance using SSH For instructions on how to use SSH to connect to an instance, see Connect to your Linux instance using SSH in the Amazon EC2 User Guide. Connect to your instance using AWS Systems Manager For instructions on how to use AWS Systems Manager to connect to an AL2023 instance, see Connect to your Linux instance using Session Manager in the Amazon EC2 User Guide. Using Amazon EC2 Instance Connect The AL2023 AMI, excluding the minimal AMI, comes with the EC2 Instance Connect agent installed by default. To use EC2 Instance Connect with an AL2023 instance launched from the minimal AMI, you must install the ec2-instance-connect package. For instructions on using EC2 Instance Connect, see Connect to your Linux instance with EC2 Instance Connect in the Amazon EC2 User Guide. Connecting to AL2023 instances 215 Amazon Linux 2023 User Guide Comparing AL2023 standard and minimal AMIs You can launch an Amazon EC2 instance with either a standard (default) or minimal AL2023 AMI. For instructions on how to launch an Amazon EC2 instance with the standard or minimal AMI type, see AL2023 on Amazon EC2. The standard AL2023 AMI comes with all of the most commonly used applications and tools installed. We recommend the standard AMI if you want to get started quickly and aren't interested in customizing the AMI. The minimal AL2023 AMI is the basic, streamlined version that contains only the most basic tools and utilities necessary to run the operating system (OS). We recommend the minimal AMI if you want to have the smallest OS footprint possible. The minimal AMI offers slightly reduced disk space utilization and better long-term cost efficiency. The minimal AMI is suitable if you want a smaller OS and don't mind manually installing tools and applications. The Container image is closer to the AL2023 minimal AMI in package set. Comparing packages installed on Amazon Linux 2023 Images A comparison of the RPMs present on the AL2023 AMI, Minimal AMI, and Container images. Package acl acpid AMI 2.3.1 2.0.32 alternatives 1.15 amazon-chrony- 4.3 config amazon-ec2-net- 2.5.1 utils amazon-linux- repo-cdn Minimal AMI Container 1.15 1.15 4.3 2.5.1 2023.6.20241031 Comparing AL2023 standard (default) and minimal AMIs 216 Amazon Linux 2023 User Guide Package AMI Minimal AMI Container amazon-linux- 2023.6.20241031 2023.6.20241031 repo-s3 amazon-linux- 2023.1 2023.1 sb-keys amazon-rpm- 228 config amazon-ssm- 3.3.987.0 20210208 (noarch) 20210208 (noarch) agent amd-ucode- firmware at attr audit audit-libs aws-cfn-b ootstrap 3.1.23 2.5.1 3.0.6 3.0.6 2.0 awscli-2 2.15.30 basesystem 11 bash 5.2.15 bash-completion 2.11 bc bind-libs 1.07.1 9.18.28 bind-license 9.18.28 3.0.6 3.0.6 2.15.30 11 5.2.15 3.0.6 11 5.2.15 Comparing AL2023 standard (default) and minimal AMIs 217 Amazon Linux 2023 User Guide Package AMI Minimal AMI Container bind-utils 9.18.28 binutils boost-fil esystem boost-system boost-thread bzip2 bzip2-libs 2.39 1.75.0 1.75.0 1.75.0 1.0.8 1.0.8 1.0.8 1.0.8 ca-certificates 2023.2.68 2023.2.68 2023.2.68 c-ares 1.19.1 checkpolicy chkconfig chrony 3.4 1.15 4.3 cloud-init 22.2.2 cloud-init-cfg- 22.2.2 ec2 cloud-utils- 0.31 growpart coreutils coreutils- common 8.32 8.32 3.4 4.3 22.2.2 22.2.2 0.31 8.32 8.32 Comparing AL2023 standard (default) and minimal AMIs 218 Amazon Linux 2023 User
al2023-ug-045
al2023-ug.pdf
45
2.15.30 basesystem 11 bash 5.2.15 bash-completion 2.11 bc bind-libs 1.07.1 9.18.28 bind-license 9.18.28 3.0.6 3.0.6 2.15.30 11 5.2.15 3.0.6 11 5.2.15 Comparing AL2023 standard (default) and minimal AMIs 217 Amazon Linux 2023 User Guide Package AMI Minimal AMI Container bind-utils 9.18.28 binutils boost-fil esystem boost-system boost-thread bzip2 bzip2-libs 2.39 1.75.0 1.75.0 1.75.0 1.0.8 1.0.8 1.0.8 1.0.8 ca-certificates 2023.2.68 2023.2.68 2023.2.68 c-ares 1.19.1 checkpolicy chkconfig chrony 3.4 1.15 4.3 cloud-init 22.2.2 cloud-init-cfg- 22.2.2 ec2 cloud-utils- 0.31 growpart coreutils coreutils- common 8.32 8.32 3.4 4.3 22.2.2 22.2.2 0.31 8.32 8.32 Comparing AL2023 standard (default) and minimal AMIs 218 Amazon Linux 2023 User Guide Package AMI Minimal AMI Container coreutils- single cpio cracklib 2.13 2.9.6 cracklib-dicts 2.9.6 crontabs 1.11 8.32 2.13 2.9.6 2.9.6 crypto-policies 20220428 20220428 20220428 crypto-po 20220428 licies-scripts cryptsetup 2.6.1 cryptsetup-libs 2.6.1 curl-minimal 8.5.0 cyrus-sasl-lib 2.1.27 cyrus-sasl- 2.1.27 plain dbus 1.12.28 dbus-broker 32 dbus-common 1.12.28 dbus-libs 1.12.28 device-mapper 1.02.185 device-mapper- 1.02.185 libs 8.5.0 2.6.1 8.5.0 2.1.27 1.12.28 32 1.12.28 1.12.28 1.02.185 1.02.185 Comparing AL2023 standard (default) and minimal AMIs 219 Amazon Linux 2023 Package diffutils dnf dnf-data dnf-plugi n-release- notification AMI 3.8 4.14.0 4.14.0 1.2 dnf-plugins- 4.3.0 core dnf-plugin- support-info 1.2 dnf-utils 4.3.0 dosfstools dracut dracut-config- ec2 4.2 055 3.0 dracut-config- 055 generic dwz dyninst e2fsprogs 0.14 10.2.1 1.46.5 e2fsprogs-libs 1.46.5 ec2-hibinit- 1.0.8 agent Minimal AMI Container User Guide 4.14.0 4.14.0 3.8 4.14.0 4.14.0 1.2 4.3.0 1.2 055 3.0 055 1.46.5 1.46.5 Comparing AL2023 standard (default) and minimal AMIs 220 Amazon Linux 2023 Package ec2-instance- connect AMI 1.1 ec2-instance- 1.1 connect-selinu x ec2-utils ed efi-filesystem efi-srpm-macros efivar efivar-libs elfutils- debuginfod- client 2.2.0 1.14.2 5 5 38 38 0.188 Minimal AMI Container User Guide 2.2.0 5 38 38 elfutils- 0.188 0.188 0.188 default-yama- scope elfutils-libelf 0.188 elfutils-libs 0.188 ethtool expat file file-libs 5.15 2.5.0 5.39 5.39 0.188 0.188 2.5.0 5.39 5.39 0.188 0.188 2.5.0 5.39 Comparing AL2023 standard (default) and minimal AMIs 221 Minimal AMI Container User Guide Amazon Linux 2023 Package filesystem findutils fonts-srpm- macros fstrm fuse-libs gawk gdbm-libs gdisk gettext gettext-libs AMI 3.14 4.8.0 2.0.5 0.6.1 2.9.9 5.1.0 1.19 1.0.8 0.21 0.21 3.14 4.8.0 2.9.9 5.1.0 1.19 1.0.8 0.21 0.21 ghc-srpm-macros 1.5.0 glib2 glibc glibc-all- langpacks glibc-common glibc-gconv- extra 2.74.7 2.74.7 2.34 2.34 2.34 2.34 2.34 2.34 2.34 glibc-locale- 2.34 2.34 source 3.14 5.1.0 1.19 2.74.7 2.34 2.34 Comparing AL2023 standard (default) and minimal AMIs 222 Amazon Linux 2023 User Guide Package AMI Minimal AMI Container glibc-minimal- langpack gmp 6.2.1 gnupg2-minimal 2.3.7 gnutls 3.8.0 go-srpm-macros 3.2.0 gpgme gpm-libs grep 1.15.1 1.20.7 3.8 groff-base 1.22.4 grub2-common 2.06 2.34 6.2.1 2.3.7 6.2.1 2.3.7 3.8.0 1.15.1 1.15.1 3.8 3.8 1.22.4 2.06 grub2-efi-aa64- 2.06 (aarch64) 2.06 (aarch64) ec2 grub2-efi-x64- 2.06 (x86_64) 2.06 (x86_64) ec2 grub2-pc- modules grub2-tools grub2-tools- minimal grubby gssproxy 2.06 2.06 2.06 8.40 0.8.4 2.06 2.06 2.06 8.40 Comparing AL2023 standard (default) and minimal AMIs 223 Minimal AMI Container User Guide 1.12 3.23 Amazon Linux 2023 Package gzip hostname hunspell AMI 1.12 3.23 1.7.0 hunspell-en 0.20140811.1 hunspell-en-GB 0.20140811.1 hunspell-en-US 0.20140811.1 hunspell- filesystem 1.7.0 hwdata 0.384 0.384 info inih initscripts iproute iputils irqbalance jansson jemalloc jitterentropy jq json-c kbd 6.7 49 10.09 6.10.0 49 10.09 6.10.0 20210202 20210202 1.9.0 2.14 5.2.1 3.4.1 1.7.1 0.14 2.4.0 1.9.0 2.14 3.4.1 1.7.1 0.14 2.4.0 0.14 Comparing AL2023 standard (default) and minimal AMIs 224 Amazon Linux 2023 Package kbd-misc AMI 2.4.0 kernel 6.1.112 kernel-libbpf 6.1.112 Minimal AMI Container User Guide 2.4.0 6.1.112 6.1.112 kernel-li vepatch-repo- s3 2023.6.20241031 2023.6.20241031 kernel-srpm- 1.0 macros kernel-tools 6.1.112 keyutils keyutils-libs kmod kmod-libs 1.6.3 1.6.3 29 29 kpatch-runtime 0.9.7 krb5-libs 1.21.3 less libacl libaio 608 2.3.1 0.3.111 1.6.3 29 29 1.21.3 608 2.3.1 1.6.3 1.21.3 2.3.1 libarchive 3.7.4 3.7.4 3.7.4 libargon2 20171227 20171227 libassuan 2.5.5 2.5.5 2.5.5 Comparing AL2023 standard (default) and minimal AMIs 225 Amazon Linux 2023 Package libattr AMI 2.5.1 Minimal AMI Container 2.5.1 2.5.1 User Guide libbasicobjects 0.1.1 libblkid 2.37.4 libcap libcap-ng libcbor libcollection libcom_err libcomps libconfig 2.48 0.8.2 0.7.0 0.7.0 1.46.5 0.1.20 1.7.2 libcurl-minimal 8.5.0 libdb libdhash libdnf libeconf libedit libev libevent libfdisk libffi 5.3.28 0.5.0 0.69.0 0.4.0 3.1 4.33 2.1.12 2.37.4 3.4.4 2.37.4 2.48 0.8.2 0.7.0 1.46.5 0.1.20 8.5.0 5.3.28 0.69.0 0.4.0 3.1 2.37.4 3.4.4 2.37.4 2.48 0.8.2 1.46.5 0.1.20 8.5.0 0.69.0 3.4.4 Comparing AL2023 standard (default) and minimal AMIs 226 Amazon Linux 2023 Package libfido2 libgcc libgcrypt libgomp libgpg-error libibverbs libidn2 libini_config libkcapi libkcapi- hmaccalc libldb libmaxminddb libmetalink libmnl libmodulemd libmount libnfsidmap libnghttp2 libnl3 libpath_utils AMI 1.10.0 11.4.1 1.10.2 11.4.1 1.42 48.0 2.3.2 1.3.1 1.4.0 1.4.0 2.6.2 1.5.2 0.1.3 1.0.4 2.13.0 2.37.4 2.5.4 1.59.0 3.5.0 0.2.1 Minimal AMI Container User Guide 1.10.0 11.4.1 1.10.2 11.4.1 1.42 11.4.1 1.10.2 11.4.1 1.42 2.3.2 2.3.2 1.4.0 1.4.0 1.0.4 2.13.0 2.37.4 2.13.0 2.37.4 1.59.0 1.59.0 Comparing AL2023 standard (default) and minimal AMIs 227 Amazon Linux 2023 Package libpcap libpipeline libpkgconf libpsl libpwquality libref_array librepo libreport- filesystem AMI 1.10.1 1.5.3 1.8.0 0.21.1 1.4.4 0.1.5 1.14.5 2.15.2 libseccomp 2.5.3 libselinux libselinux- utils libsemanage
al2023-ug-046
al2023-ug.pdf
46
libgomp libgpg-error libibverbs libidn2 libini_config libkcapi libkcapi- hmaccalc libldb libmaxminddb libmetalink libmnl libmodulemd libmount libnfsidmap libnghttp2 libnl3 libpath_utils AMI 1.10.0 11.4.1 1.10.2 11.4.1 1.42 48.0 2.3.2 1.3.1 1.4.0 1.4.0 2.6.2 1.5.2 0.1.3 1.0.4 2.13.0 2.37.4 2.5.4 1.59.0 3.5.0 0.2.1 Minimal AMI Container User Guide 1.10.0 11.4.1 1.10.2 11.4.1 1.42 11.4.1 1.10.2 11.4.1 1.42 2.3.2 2.3.2 1.4.0 1.4.0 1.0.4 2.13.0 2.37.4 2.13.0 2.37.4 1.59.0 1.59.0 Comparing AL2023 standard (default) and minimal AMIs 227 Amazon Linux 2023 Package libpcap libpipeline libpkgconf libpsl libpwquality libref_array librepo libreport- filesystem AMI 1.10.1 1.5.3 1.8.0 0.21.1 1.4.4 0.1.5 1.14.5 2.15.2 libseccomp 2.5.3 libselinux libselinux- utils libsemanage libsepol libsigsegv libsmartcols libsolv libss 3.4 3.4 3.4 3.4 2.13 2.37.4 0.7.22 1.46.5 libsss_certmap 2.9.4 libsss_idmap 2.9.4 Minimal AMI Container User Guide 1.5.3 0.21.1 1.4.4 1.14.5 2.15.2 2.5.3 3.4 3.4 3.4 3.4 2.13 2.37.4 0.7.22 1.46.5 0.21.1 1.14.5 2.15.2 3.4 3.4 2.13 2.37.4 0.7.22 Comparing AL2023 standard (default) and minimal AMIs 228 Amazon Linux 2023 Package libsss_ns s_idmap libsss_sudo libstdc++ AMI 2.9.4 2.9.4 11.4.1 libstoragemgmt 1.9.4 libtalloc libtasn1 libtdb libtevent libtextstyle libtirpc 2.3.4 4.19.0 1.4.7 0.13.0 0.21 1.3.3 libunistring 0.9.10 libuser libutempter libuuid libuv libverto 0.63 1.2.1 2.37.4 1.47.0 0.3.2 libverto-libev 0.3.2 libxcrypt libxml2 libyaml 4.4.33 2.10.4 0.2.5 Minimal AMI Container User Guide 11.4.1 11.4.1 4.19.0 4.19.0 0.21 0.9.10 0.63 1.2.1 2.37.4 0.9.10 2.37.4 0.3.2 0.3.2 4.4.33 2.10.4 0.2.5 4.4.33 2.10.4 0.2.5 Comparing AL2023 standard (default) and minimal AMIs 229 Amazon Linux 2023 Package libzstd AMI 1.5.5 Minimal AMI Container 1.5.5 1.5.5 User Guide linux-firmware- 20210208 (noarch) 20210208 (noarch) whence lm_sensors-libs 3.6.0 lmdb-libs logrotate lsof lua-libs 0.9.29 3.20.1 4.94.0 5.4.4 lua-srpm-macros 1 lz4-libs man-db man-pages 1.9.4 2.9.3 5.10 3.20.1 5.4.4 5.4.4 1.9.4 2.9.3 1.9.4 microcode_ctl 2.1 (x86_64) 2.1 (x86_64) mpfr nano ncurses ncurses-base ncurses-libs nettle net-tools 4.1.0 4.1.0 4.1.0 5.8 6.2 6.2 6.2 3.8 2.0 6.2 6.2 6.2 3.8 2.0 6.2 6.2 newt 0.52.21 Comparing AL2023 standard (default) and minimal AMIs 230 Minimal AMI Container User Guide 1.6 1.6 Amazon Linux 2023 Package nfs-utils npth nspr nss nss-softokn nss-softokn- freebl nss-sysinit nss-util ntsysv AMI 2.5.4 1.6 4.35.0 3.90.0 3.90.0 3.90.0 3.90.0 3.90.0 1.15 numactl-libs 2.0.14 2.0.14 ocaml-srpm- 6 macros oniguruma 6.9.7.1 6.9.7.1 openblas-srpm- 2 macros openldap openssh 2.4.57 8.7p1 openssh-clients 8.7p1 openssh-server 8.7p1 openssl 3.0.8 2.4.57 8.7p1 8.7p1 8.7p1 3.0.8 Comparing AL2023 standard (default) and minimal AMIs 231 Minimal AMI Container User Guide 3.0.8 0.4.12 1.77 0.24.1 0.24.1 1.5.1 0.80 3.7.0 3.7.0 10.40 10.40 3.0.8 0.24.1 0.24.1 10.40 10.40 Amazon Linux 2023 Package openssl-libs AMI 3.0.8 openssl-pkcs11 0.4.12 os-prober p11-kit 1.77 0.24.1 p11-kit-trust 0.24.1 package-notes- 0.4 srpm-macros pam parted passwd pciutils pciutils-libs pcre2 pcre2-syntax perl-Carp perl-Class- Struct 1.5.1 3.4 0.80 3.7.0 3.7.0 10.40 10.40 1.50 0.66 perl-constant 1.33 perl-DynaLoader 1.47 perl-Encode perl-Errno 3.15 1.30 Comparing AL2023 standard (default) and minimal AMIs 232 Minimal AMI Container User Guide Amazon Linux 2023 Package perl-Exporter perl-Fcntl perl-File- Basename perl-File-Path perl-File-stat AMI 5.74 1.13 2.85 2.18 1.09 perl-File-Temp 0.231.100 perl-Getopt- 2.52 Long perl-Getopt-Std 1.12 perl-HTTP-Tiny 0.078 perl-if perl-inte rpreter perl-IO perl-IPC-Open3 perl-libs perl-MIME- Base64 perl-mro perl-overload 0.60.800 5.32.1 1.43 1.21 5.32.1 3.16 1.23 1.31 Comparing AL2023 standard (default) and minimal AMIs 233 Minimal AMI Container User Guide Amazon Linux 2023 Package perl-over loading AMI 0.02 perl-parent 0.238 perl-PathTools perl-Pod- Escapes 3.78 1.07 perl-podlators 4.14 perl-Pod- Perldoc 3.28.01 perl-Pod-Simple 3.42 perl-Pod-Usage perl-POSIX perl-Scalar- List-Utils perl-Sele ctSaver 2.01 1.94 1.56 1.02 perl-Socket 2.032 perl-srpm- macros perl-Storable perl-subs perl-Symbol 1 3.21 1.03 1.08 Comparing AL2023 standard (default) and minimal AMIs 234 Amazon Linux 2023 Package perl-Term- ANSIColor perl-Term-Cap perl-Text- ParseWords AMI 5.01 1.17 3.30 perl-Text-Tabs 2021.0726 +Wrap perl-Time-Local 1.300 perl-vars pkgconf pkgconf-m4 pkgconf-pkg- config policycoreutils policycor eutils-python- utils popt procps-ng protobuf-c psacct psmisc 1.05 1.8.0 1.8.0 1.8.0 3.4 3.4 1.18 3.3.17 1.4.1 6.6.4 23.4 Minimal AMI Container User Guide 3.4 1.18 3.3.17 23.4 1.18 Comparing AL2023 standard (default) and minimal AMIs 235 Amazon Linux 2023 User Guide Package AMI Minimal AMI Container publicsuffix- 20240212 20240212 20240212 list-dafsa python3 3.9.16 python3-attrs 20.3.0 python3-audit 3.0.6 3.9.16 3.9.16 20.3.0 3.0.6 python3-awscrt 0.19.19 0.19.19 python3-babel 2.9.1 python3-cffi 1.14.5 python3-chardet 4.0.0 0.4.4 5.0.6 python3-c olorama python3-c onfigobj python3-c ryptography 2.9.1 1.14.5 4.0.0 0.4.4 5.0.6 36.0.1 36.0.1 python3-daemon 2.3.0 python3-d ateutil 2.8.1 2.8.1 python3-dbus 1.2.18 python3-distro 1.5.0 python3-dnf python3-dnf- plugins-core 4.14.0 4.3.0 1.2.18 1.5.0 4.14.0 4.3.0 4.14.0 Comparing AL2023 standard (default) and minimal AMIs 236 Amazon Linux 2023 Package python3-d ocutils AMI 0.16 python3-gpg 1.15.1 python3-hawkey 0.69.0 python3-idna 2.10 python3-jinja2 2.11.3 0.10.0 1.21 2.0 3.2.0 python3-j mespath python3-j sonpatch python3-j sonpointer python3-j sonschema python3-l ibcomps Minimal AMI Container User Guide 1.15.1 0.69.0 0.16 1.15.1 0.69.0 2.10 2.11.3 0.10.0 1.21 2.0 3.2.0 0.1.20 0.1.20 0.1.20 python3-libdnf 0.69.0 python3-libs 3.9.16 python3-l ibselinux python3-l ibsemanage 3.4 3.4 python3-l 1.9.4 ibstoragemgmt 0.69.0 3.9.16 0.69.0 3.9.16 3.4 3.4 Comparing AL2023 standard (default) and minimal AMIs 237 Amazon Linux 2023 Package python3-l ockfile python3-m arkupsafe python3-n etifaces python3-o authlib Minimal AMI Container User Guide AMI 0.12.2 1.1.1 1.1.1 0.10.6
al2023-ug-047
al2023-ug.pdf
47
AMIs 236 Amazon Linux 2023 Package python3-d ocutils AMI 0.16 python3-gpg 1.15.1 python3-hawkey 0.69.0 python3-idna 2.10 python3-jinja2 2.11.3 0.10.0 1.21 2.0 3.2.0 python3-j mespath python3-j sonpatch python3-j sonpointer python3-j sonschema python3-l ibcomps Minimal AMI Container User Guide 1.15.1 0.69.0 0.16 1.15.1 0.69.0 2.10 2.11.3 0.10.0 1.21 2.0 3.2.0 0.1.20 0.1.20 0.1.20 python3-libdnf 0.69.0 python3-libs 3.9.16 python3-l ibselinux python3-l ibsemanage 3.4 3.4 python3-l 1.9.4 ibstoragemgmt 0.69.0 3.9.16 0.69.0 3.9.16 3.4 3.4 Comparing AL2023 standard (default) and minimal AMIs 237 Amazon Linux 2023 Package python3-l ockfile python3-m arkupsafe python3-n etifaces python3-o authlib Minimal AMI Container User Guide AMI 0.12.2 1.1.1 1.1.1 0.10.6 0.10.6 3.0.2 3.0.2 python3-pip- 21.3.1 21.3.1 21.3.1 wheel python3-ply python3-p olicycoreutils python3-p rettytable 3.11 3.4 0.7.2 3.11 3.4 0.7.2 python3-prompt- 3.0.24 3.0.24 toolkit python3-p ycparser python3-p yrsistent python3-p yserial 2.20 2.20 0.17.3 0.17.3 3.4 python3-pysocks 1.7.1 3.4 1.7.1 python3-pytz 2022.7.1 2022.7.1 Comparing AL2023 standard (default) and minimal AMIs 238 Amazon Linux 2023 User Guide Package AMI Minimal AMI Container python3-pyyaml 5.4.1 python3-r equests 2.25.1 python3-rpm 4.16.1.3 python3-ruamel- 0.16.6 yaml python3-ruamel- 0.1.2 yaml-clib python3-setools 4.4.1 59.6.0 python3-s etuptools python3-s etuptools- wheel 4.16.1.3 5.4.1 2.25.1 4.16.1.3 0.16.6 0.1.2 4.4.1 59.6.0 59.6.0 59.6.0 59.6.0 1.15.0 235 1.25.10 0.2.5 python3-six 1.15.0 python3-systemd 235 python3-urllib3 1.25.10 python3-wcwidth 0.2.5 python-chevron 0.13.1 python-srpm- 3.9 macros quota quota-nls 4.06 4.06 Comparing AL2023 standard (default) and minimal AMIs 239 Amazon Linux 2023 Package readline rng-tools rootfiles rpcbind rpm AMI 8.1 6.14 8.1 1.2.6 4.16.1.3 rpm-build-libs 4.16.1.3 rpm-libs 4.16.1.3 rpm-plugin- 4.16.1.3 selinux Minimal AMI Container User Guide 8.1 6.14 8.1 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 8.1 4.16.1.3 4.16.1.3 4.16.1.3 rpm-plugin- 4.16.1.3 4.16.1.3 systemd-inhibit rpm-sign-libs 4.16.1.3 4.16.1.3 4.16.1.3 rsync rust-srpm- macros sbsigntools screen sed 3.2.6 21 0.9.4 4.8.0 4.8 selinux-policy 38.1.45 selinux-policy- 38.1.45 0.9.4 4.8 38.1.45 38.1.45 4.8 targeted setup 2.13.7 2.13.7 2.13.7 Comparing AL2023 standard (default) and minimal AMIs 240 Amazon Linux 2023 Package shadow-utils slang AMI 4.9 2.3.2 User Guide Minimal AMI Container 4.9 sqlite-libs 3.40.0 3.40.0 3.40.0 sssd-client sssd-common sssd-kcm 2.9.4 2.9.4 2.9.4 sssd-nfs-idmap 2.9.4 strace sudo 6.8 1.9.15 sysctl-defaults 1.0 sysstat systemd 12.5.6 252.23 systemd-libs 252.23 systemd-n etworkd systemd-pam systemd-r esolved 252.23 252.23 252.23 1.9.15 1.0 252.23 252.23 252.23 252.23 252.23 systemd-udev 252.23 252.23 system-release 2023.6.20241031 2023.6.20241031 2023.6.20241031 Comparing AL2023 standard (default) and minimal AMIs 241 Amazon Linux 2023 Package systemtap- runtime tar tbb tcpdump tcsh time traceroute tzdata unzip update-motd AMI 4.8 1.34 2020.3 4.99.1 6.24.07 1.9 2.1.3 2024a 6.0 2.2 userspace-rcu 0.12.1 util-linux 2.37.4 util-linux-core 2.37.4 vim-common 9.0.2153 Minimal AMI Container User Guide 1.34 2024a 2024a 2.2 0.12.1 2.37.4 2.37.4 vim-data 9.0.2153 9.0.2153 vim-enhanced 9.0.2153 vim-filesystem 9.0.2153 vim-minimal 9.0.2153 9.0.2153 wget which 1.21.3 2.21 2.21 Comparing AL2023 standard (default) and minimal AMIs 242 Amazon Linux 2023 Package words xfsdump xfsprogs AMI 3.0 3.1.11 5.18.0 xxd 9.0.2153 xxhash-libs xz xz-libs yum zip zlib 0.8.0 5.2.5 5.2.5 4.14.0 3.0 1.2.11 zram-generator 1.1.2 zram-generator- 1.1.2 defaults Minimal AMI Container User Guide 5.18.0 5.2.5 5.2.5 4.14.0 1.2.11 1.1.2 1.1.2 5.2.5 4.14.0 1.2.11 zstd 1.5.5 1.5.5 Using AL2023 in containers Note For more information about how to use AL2023 to host containerized workloads on Amazon ECS, see AL2023 for Amazon ECS container hosts. AL2023 in containers 243 Amazon Linux 2023 User Guide There are several ways that AL2023 can be used inside containers depending on the use case. The AL2023 Base Container Image is most similar to an Amazon Linux 2 container image and the AL2023 minimal AMI. For advanced users, we offer a minimal container image, introduced in the AL2023.2 release, along with documentation that describes how to build bare-bones containers. AL2023 can also be used to host containerized workloads, either of AL2023 based container images, or containers based on other Linux distributions. You can use AL2023 for Amazon ECS container hosts, or use the provided container runtime packages directly. The docker, containerd, and nerdctl packages are available to be installed and used on AL2023. Topics • Using the AL2023 base container image • AL2023 Minimal container image • Building bare-bones AL2023 container images • Comparing packages installed on Amazon Linux 2023 Container Images • Comparing packages installed on Amazon Linux 2023 Minimal AMI and Container Images Using the AL2023 base container image The AL2023 container image is built from the same software components that are included in the AL2023 AMI. It's available for use in any environment as a base image for Docker workloads. If you're using the Amazon Linux AMI for applications in Amazon Elastic Compute Cloud (Amazon EC2), you can containerize your applications with the Amazon Linux container image. Use the Amazon Linux container image in your local development environment and then push your application to AWS using Amazon Elastic Container Service (Amazon ECS). For more information, see Using Amazon ECR images with Amazon ECS in the Amazon Elastic Container Registry User Guide. The Amazon Linux container image is available on Amazon ECR Public. You can provide
al2023-ug-048
al2023-ug.pdf
48
AMI. It's available for use in any environment as a base image for Docker workloads. If you're using the Amazon Linux AMI for applications in Amazon Elastic Compute Cloud (Amazon EC2), you can containerize your applications with the Amazon Linux container image. Use the Amazon Linux container image in your local development environment and then push your application to AWS using Amazon Elastic Container Service (Amazon ECS). For more information, see Using Amazon ECR images with Amazon ECS in the Amazon Elastic Container Registry User Guide. The Amazon Linux container image is available on Amazon ECR Public. You can provide feedback for AL2023 through your designated AWS representative or by filing an issue in the amazon- linux-2023 repo on GitHub. AL2023 Base Container Image 244 Amazon Linux 2023 User Guide To pull the Amazon Linux container image from Amazon ECR Public 1. Authenticate your Docker client to the Amazon Linux Public registry. Authentication tokens are valid for 12 hours. For more information, see Private registry authentication in the Amazon Elastic Container Registry User Guide. Note The get-login-password command is supported using the latest version of AWS CLI version 2. For more information, see Installing the AWS Command Line Interface in the AWS Command Line Interface User Guide. $ aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws The output is as follows. Login succeeded 2. Pull the Amazon Linux container image by running the docker pull command. To view the Amazon Linux container image on the Amazon ECR Public Gallery, see Amazon ECR Public Gallery - amazonlinux. Note When you pull the AL2023 Docker container image, you can use the tags in one of the following formats: • To get the latest version of the AL2023 container image, use the :2023 tag. • To get a specific version of AL2023, you can use the following format: • :2023.[0-7 release quarter].[release date].[build number] The following examples use the tag :2023 and pull the most recent available container image of AL2023. AL2023 Base Container Image 245 Amazon Linux 2023 User Guide $ docker pull public.ecr.aws/amazonlinux/amazonlinux:2023 3. (Optional) Run the container locally. $ docker run -it --security-opt seccomp=unconfined public.ecr.aws/amazonlinux/ amazonlinux:2023 /bin/bash To pull the AL2023 container image from Docker Hub 1. Pull the AL2023 container image using the docker pull command. $ docker pull amazonlinux:2023 2. (Optional) Run the container locally. $ docker run -it amazonlinux:2023 /bin/bash Note The container image of AL2023 uses only the dnf package manager to install software packages. This means that there's no amazon-linux-extras or equivalent command to use for additional software. AL2023 Minimal container image Note The standard AL2023 container images are suitable for most use cases, and adapting to the minimal container image is likely to be more work than adapting to the AL2023 base container image. The AL2023 minimal container image, introduced in AL2023.2, differs from the base container image because it contains only the bare minimum packages needed to install other packages. AL2023 Minimal container image 246 Amazon Linux 2023 User Guide The minimal container image is designed to be a minimal set of packages, not a convenient set of packages . The AL2023 minimal container image is built from software components already available in AL2023. The key difference in the minimal container image is using microdnf to provide the dnf package manager rather than the fully featured Python based dnf. This enables the minimal container image to be smaller with the trade-off of not having the full feature set of the dnf package manager which is included in the AL2023 AMIs and base container image. The AL2023 minimal container image forms the base of the provided.al2023 AWS Lambda runtime environment. For a detailed list of packages included in the minimal container image, see Comparing packages installed on Amazon Linux 2023 Container Images. Minimal Container image size Because the AL2023 minimal container image contains fewer packages than the AL2023 base container image, it is also significantly smaller. The following table compares the container image options of current and past releases of Amazon Linux. Note Image Size is as-shown on Amazon Linux on Amazon ECR Public Gallery. Image Version Image Size Note Amazon Linux 1 (AL1) 2018.03.0.20230918 .0 62.3MB x86-64 only Amazon Linux 2 2.0.20230926.0 64.2MB aarch64 is 1.6MB larger than x86-64 Amazon Linux 2023 base container image 2023.2.20231002.0 52.4MB AL2023 Minimal container image 247 Amazon Linux 2023 User Guide Image Version Image Size Note Amazon Linux 2023 minimal container 2023.2.20231002.0- minimal 35.2MB image Using the AL2023 Minimal Container image The AL2023 minimal container image is available on ECR and the 2023-minimal tag will always point to the latest AL2023 based minimal container image, while the minimal tag may be updated to a newer version of Amazon Linux than AL2023. You can pull these tags using docker with the following example: $
al2023-ug-049
al2023-ug.pdf
49
Linux 2 2.0.20230926.0 64.2MB aarch64 is 1.6MB larger than x86-64 Amazon Linux 2023 base container image 2023.2.20231002.0 52.4MB AL2023 Minimal container image 247 Amazon Linux 2023 User Guide Image Version Image Size Note Amazon Linux 2023 minimal container 2023.2.20231002.0- minimal 35.2MB image Using the AL2023 Minimal Container image The AL2023 minimal container image is available on ECR and the 2023-minimal tag will always point to the latest AL2023 based minimal container image, while the minimal tag may be updated to a newer version of Amazon Linux than AL2023. You can pull these tags using docker with the following example: $ docker pull public.ecr.aws/amazonlinux/amazonlinux:minimal $ docker pull public.ecr.aws/amazonlinux/amazonlinux:2023-minimal The following example shows a Dockerfile that takes the minimal container image and installs GCC on top of it : FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal RUN dnf install -y gcc && dnf clean all Building bare-bones AL2023 container images The AL2023 container image is built from the same software components that are included in the AL2023 AMI. It includes a software that enables the base container layer to behave similarly to running on an Amazon EC2 instance, such as the package manager dnf. This section explains how you can construct a container from scratch that includes only the bare minimum dependencies needed for an application. Building bare-bones AL2023 container images 248 Amazon Linux 2023 Note User Guide The standard AL2023 container images are suitable for most use cases. Using the standard container image makes it easy to build on top of your image. A bare-bones container image makes it more difficult to build on top of your image. To create a container with bare minimum dependencies for an application 1. Determine your runtime dependencies. This will vary based on your application. 2. Construct a Dockerfile / Containerfile that builds FROM scratch. The following example of a Dockerfile can be used to build a container that contains only the bash shell and its dependencies. FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as build RUN mkdir /sysroot RUN dnf --releasever=$(rpm -q system-release --qf '%{VERSION}') \ --installroot /sysroot \ -y \ --setopt=install_weak_deps=False \ install bash FROM scratch COPY --from=build /sysroot / WORKDIR / ENTRYPOINT ["/bin/bash"] • This Dockerfile works by: 1. Starting a AL2023 container named build. This container will be used to bootstrap the barebones container, this container is not deployed itself, but generates the container to be deployed. 2. Creating the /sysroot directory. This directory will be where the build container will install the dependencies needed for the barebones container. In a subsequent step, the /sysroot path will be packaged up to be the root directory of our barebones image. Building bare-bones AL2023 container images 249 Amazon Linux 2023 User Guide Using the --installroot option to dnf in this manner is how we create the other AL2023 images. It's a feature of dnf that allows installers and image creation tooling to work. 3. Invoking dnf to install packages into /sysroot. The rpm -q system-release --qf '%{VERSION}' command queries (-q) the system-release package, setting the query format (--qf) to print out the version of the package being queried (the %{VERSION} variable is the rpm variable for the version of the RPM). By setting the --releasever argument of dnf to the version of system-release in the build container, this Dockerfile can be used to rebuild the barebones container whenever an updated container base image of Amazon Linux is released. It is possible to set the --releasever to any Amazon Linux 2023 version, such as 2023.7.20250331. Doing this would mean that the build container would run as the latest AL2023 version, but build the barebones container from 2023.7.20250331 regardless of what was the current AL2023 release. The --setopt=install_weak_deps=False configuration option tells dnf to only install dependencies that are required rather than recommended or suggested. 4. Copying the installed system into the root of a blank (FROM scratch) container. 5. Setting the ENTRYPOINT to be the desired binary, in this case /bin/bash. 3. Create an empty directory and add the content of the example in Step 2 to a file named Dockerfile. $ mkdir al2023-barebones-bash-example $ cd al2023-barebones-bash-example $ cat > Dockerfile <<EOF FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as build RUN mkdir /sysroot RUN dnf --releasever=$(rpm -q system-release --qf '%{VERSION}') \ --installroot /sysroot \ -y \ --setopt=install_weak_deps=False \ install bash && dnf --installroot /sysroot clean all FROM scratch Building bare-bones AL2023 container images 250 Amazon Linux 2023 User Guide COPY --from=build /sysroot / WORKDIR / ENTRYPOINT ["/bin/bash"] EOF 4. Build the container by running the following command. $ docker build -t al2023-barebones-bash-example 5. Run the container using the following command to see how minimal a bash-only container is. $ docker run -it --rm al2023-barebones-bash-example bash-5.2# rpm bash: rpm: command not found bash-5.2# du -sh /usr/ bash: du: command not found bash-5.2# ls bash: ls: command not found bash-5.2# echo /bin/* /bin/alias /bin/bash /bin/bashbug /bin/bashbug-64 /bin/bg /bin/catchsegv /bin/cd / bin/command
al2023-ug-050
al2023-ug.pdf
50
bash && dnf --installroot /sysroot clean all FROM scratch Building bare-bones AL2023 container images 250 Amazon Linux 2023 User Guide COPY --from=build /sysroot / WORKDIR / ENTRYPOINT ["/bin/bash"] EOF 4. Build the container by running the following command. $ docker build -t al2023-barebones-bash-example 5. Run the container using the following command to see how minimal a bash-only container is. $ docker run -it --rm al2023-barebones-bash-example bash-5.2# rpm bash: rpm: command not found bash-5.2# du -sh /usr/ bash: du: command not found bash-5.2# ls bash: ls: command not found bash-5.2# echo /bin/* /bin/alias /bin/bash /bin/bashbug /bin/bashbug-64 /bin/bg /bin/catchsegv /bin/cd / bin/command /bin/fc /bin/fg /bin/gencat /bin/getconf /bin/getent /bin/getopts / bin/hash /bin/iconv /bin/jobs /bin/ld.so /bin/ldd /bin/locale /bin/localedef / bin/pldd /bin/read /bin/sh /bin/sotruss /bin/sprof /bin/type /bin/tzselect /bin/ ulimit /bin/umask /bin/unalias /bin/wait /bin/zdump For a more practical example, the following procedure builds a container for a C application that displays Hello World!. 1. Create an empty directory and add the C source code and Dockerfile. $ mkdir al2023-barebones-c-hello-world-example $ cd al2023-barebones-c-hello-world-example $ cat > hello-world.c <<EOF #include <stdio.h> int main(void) { printf("Hello World!\n"); return 0; } EOF Building bare-bones AL2023 container images 251 Amazon Linux 2023 User Guide $ cat > Dockerfile <<EOF FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as build COPY hello-world.c / RUN dnf -y install gcc RUN gcc -o hello-world hello-world.c RUN mkdir /sysroot RUN mv hello-world /sysroot/ RUN dnf --releasever=$(rpm -q system-release --qf '%{VERSION}') \ --installroot /sysroot \ -y \ --setopt=install_weak_deps=False \ install glibc && dnf --installroot /sysroot clean all FROM scratch COPY --from=build /sysroot / WORKDIR / ENTRYPOINT ["/hello-world"] EOF 2. Build the container using the following command. $ docker build -t al2023-barebones-c-hello-world-example . 3. Run the container using the following command. $ docker run -it --rm al2023-barebones-c-hello-world-example Hello World! Comparing packages installed on Amazon Linux 2023 Container Images A comparison of the RPMs present on the AL2023 base container image compared with the RPMs present on the AL2023 minimal container image. Package Container Minimal Container alternatives 1.15 1.15 AL2023 container image package list comparison 252 Amazon Linux 2023 User Guide Package Container Minimal Container amazon-linux-repo- 2023.6.20241031 2023.6.20241031 cdn audit-libs basesystem bash bzip2-libs 3.0.6 11 5.2.15 1.0.8 ca-certificates 2023.2.68 coreutils-single 8.32 crypto-policies 20220428 curl-minimal dnf dnf-data 8.5.0 4.14.0 4.14.0 elfutils-default-y 0.188 ama-scope elfutils-libelf elfutils-libs expat file-libs filesystem gawk gdbm-libs 0.188 0.188 2.5.0 5.39 3.14 5.1.0 1.19 3.0.6 11 5.2.15 1.0.8 2023.2.68 8.32 20220428 8.5.0 4.14.0 5.39 3.14 5.1.0 AL2023 container image package list comparison 253 Amazon Linux 2023 Package glib2 glibc glibc-common glibc-minimal-lang pack gmp gnupg2-minimal gobject-introspect ion gpgme grep json-c keyutils-libs krb5-libs libacl libarchive libassuan libattr libblkid libcap libcap-ng Container 2.74.7 2.34 2.34 2.34 6.2.1 2.3.7 1.15.1 3.8 0.14 1.6.3 1.21.3 2.3.1 3.7.4 2.5.5 2.5.1 2.37.4 2.48 0.8.2 User Guide Minimal Container 2.74.7 2.34 2.34 2.34 6.2.1 2.3.7 1.73.0 1.15.1 3.8 0.14 1.6.3 1.21.3 2.3.1 3.7.4 2.5.5 2.5.1 2.37.4 2.48 0.8.2 AL2023 container image package list comparison 254 Amazon Linux 2023 User Guide Package Container Minimal Container libcom_err libcomps libcurl-minimal libdnf libffi libgcc libgcrypt libgomp libgpg-error libidn2 libmodulemd libmount libnghttp2 libpeas libpsl librepo 1.46.5 0.1.20 8.5.0 0.69.0 3.4.4 11.4.1 1.10.2 11.4.1 1.42 2.3.2 2.13.0 2.37.4 1.59.0 0.21.1 1.14.5 libreport-filesystem 2.15.2 libselinux libsepol libsigsegv 3.4 3.4 2.13 1.46.5 8.5.0 0.69.0 3.4.4 11.4.1 1.10.2 1.42 2.3.2 2.13.0 2.37.4 1.59.0 1.32.0 0.21.1 1.14.5 2.15.2 3.4 3.4 2.13 AL2023 container image package list comparison 255 Amazon Linux 2023 User Guide Package Container Minimal Container libsmartcols libsolv libstdc++ libtasn1 libunistring libuuid libverto libxcrypt libxml2 libyaml libzstd lua-libs lz4-libs microdnf microdnf-dnf mpfr ncurses-base ncurses-libs npth 2.37.4 0.7.22 11.4.1 4.19.0 0.9.10 2.37.4 0.3.2 4.4.33 2.10.4 0.2.5 1.5.5 5.4.4 1.9.4 4.1.0 6.2 6.2 1.6 openssl-libs 3.0.8 2.37.4 0.7.22 11.4.1 4.19.0 0.9.10 2.37.4 0.3.2 2.10.4 0.2.5 1.5.5 5.4.4 1.9.4 3.10.0 3.10.0 4.1.0 6.2 6.2 1.6 3.0.8 AL2023 container image package list comparison 256 Amazon Linux 2023 Package p11-kit p11-kit-trust pcre2 pcre2-syntax popt Container Minimal Container User Guide 0.24.1 0.24.1 10.40 10.40 1.18 0.24.1 0.24.1 10.40 10.40 1.18 publicsuffix-list- 20240212 20240212 dafsa python3 python3-dnf python3-gpg python3-hawkey python3-libcomps python3-libdnf python3-libs python3-pip-wheel 3.9.16 4.14.0 1.15.1 0.69.0 0.1.20 0.69.0 3.9.16 21.3.1 python3-rpm 4.16.1.3 python3-setuptools- 59.6.0 wheel readline rpm rpm-build-libs 8.1 4.16.1.3 4.16.1.3 8.1 4.16.1.3 AL2023 container image package list comparison 257 Amazon Linux 2023 Package rpm-libs rpm-sign-libs sed setup sqlite-libs Container Minimal Container User Guide 4.16.1.3 4.16.1.3 4.8 2.13.7 3.40.0 4.16.1.3 4.8 2.13.7 3.40.0 system-release 2023.6.20241031 2023.6.20241031 tzdata xz-libs yum zlib 2024a 5.2.5 4.14.0 1.2.11 5.2.5 1.2.11 Comparing packages installed on Amazon Linux 2023 Minimal AMI and Container Images A comparison of the RPMs present on the AL2023 Minimial AMI to the RPMs present on the AL2023 base and minimal container images. Package Minimal AMI Container Minimal Container alternatives 1.15 1.15 1.15 amazon-chrony- 4.3 config amazon-ec2-net- 2.5.1 utils AL2023 Minimal AMI compared to container images 258 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container amazon-linux- repo-cdn amazon-linux- 2023.6.20241031 repo-s3 amazon-linux- 2023.1 sb-keys amd-ucode-
al2023-ug-051
al2023-ug.pdf
51
4.16.1.3 4.8 2.13.7 3.40.0 4.16.1.3 4.8 2.13.7 3.40.0 system-release 2023.6.20241031 2023.6.20241031 tzdata xz-libs yum zlib 2024a 5.2.5 4.14.0 1.2.11 5.2.5 1.2.11 Comparing packages installed on Amazon Linux 2023 Minimal AMI and Container Images A comparison of the RPMs present on the AL2023 Minimial AMI to the RPMs present on the AL2023 base and minimal container images. Package Minimal AMI Container Minimal Container alternatives 1.15 1.15 1.15 amazon-chrony- 4.3 config amazon-ec2-net- 2.5.1 utils AL2023 Minimal AMI compared to container images 258 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container amazon-linux- repo-cdn amazon-linux- 2023.6.20241031 repo-s3 amazon-linux- 2023.1 sb-keys amd-ucode- firmware audit audit-libs 20210208 (noarch) 3.0.6 3.0.6 awscli-2 2.15.30 basesystem 11 bash bzip2-libs 5.2.15 1.0.8 2023.6.20241031 2023.6.20241031 3.0.6 3.0.6 11 5.2.15 1.0.8 11 5.2.15 1.0.8 ca-certificates 2023.2.68 2023.2.68 2023.2.68 checkpolicy chrony 3.4 4.3 cloud-init 22.2.2 cloud-init-cfg- 22.2.2 ec2 cloud-utils- 0.31 growpart coreutils 8.32 AL2023 Minimal AMI compared to container images 259 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container coreutils- common coreutils- single cpio cracklib 8.32 2.13 2.9.6 cracklib-dicts 2.9.6 8.32 8.32 crypto-policies 20220428 20220428 20220428 cryptsetup-libs 2.6.1 curl-minimal 8.5.0 8.5.0 8.5.0 cyrus-sasl-lib 2.1.27 dbus 1.12.28 dbus-broker 32 dbus-common 1.12.28 dbus-libs 1.12.28 device-mapper 1.02.185 device-mapper- 1.02.185 libs diffutils dnf dnf-data 3.8 4.14.0 4.14.0 4.14.0 4.14.0 4.14.0 AL2023 Minimal AMI compared to container images 260 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container dnf-plugi n-release- notification 1.2 dnf-plugins- 4.3.0 core dnf-plugin- support-info dracut dracut-config- ec2 1.2 055 3.0 dracut-config- 055 generic e2fsprogs 1.46.5 e2fsprogs-libs 1.46.5 ec2-utils 2.2.0 efi-filesystem efivar efivar-libs 5 38 38 elfutils- 0.188 0.188 default-yama- scope elfutils-libelf 0.188 elfutils-libs 0.188 0.188 0.188 AL2023 Minimal AMI compared to container images 261 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container 2.5.0 5.39 5.39 3.14 4.8.0 2.9.9 5.1.0 1.19 1.0.8 0.21 0.21 2.74.7 2.34 2.34 2.34 2.34 expat file file-libs filesystem findutils fuse-libs gawk gdbm-libs gdisk gettext gettext-libs glib2 glibc glibc-all- langpacks glibc-common glibc-locale- source glibc-minimal- langpack gmp 6.2.1 2.5.0 5.39 3.14 5.1.0 1.19 5.39 3.14 5.1.0 2.74.7 2.34 2.74.7 2.34 2.34 2.34 2.34 6.2.1 2.34 6.2.1 AL2023 Minimal AMI compared to container images 262 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container gnupg2-minimal 2.3.7 2.3.7 2.3.7 gnutls 3.8.0 gobject-i ntrospection gpgme grep 1.15.1 3.8 1.15.1 3.8 1.73.0 1.15.1 3.8 groff-base 1.22.4 grub2-common 2.06 grub2-efi-aa64- 2.06 (aarch64) ec2 grub2-efi-x64- 2.06 (x86_64) ec2 grub2-pc- modules grub2-tools grub2-tools- minimal grubby gzip hostname hwdata inih 2.06 2.06 2.06 8.40 1.12 3.23 0.384 49 AL2023 Minimal AMI compared to container images 263 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container initscripts iproute iputils irqbalance jansson jitterentropy jq json-c kbd kbd-misc 10.09 6.10.0 20210202 1.9.0 2.14 3.4.1 1.7.1 0.14 2.4.0 2.4.0 kernel 6.1.112 kernel-libbpf 6.1.112 kernel-li vepatch-repo- s3 2023.6.20241031 0.14 0.14 keyutils-libs 1.6.3 1.6.3 1.6.3 kmod kmod-libs 29 29 krb5-libs 1.21.3 1.21.3 1.21.3 less libacl 608 2.3.1 2.3.1 2.3.1 AL2023 Minimal AMI compared to container images 264 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container libarchive 3.7.4 3.7.4 3.7.4 libargon2 20171227 libassuan libattr libblkid libcap libcap-ng libcbor libcom_err libcomps 2.5.5 2.5.1 2.37.4 2.48 0.8.2 0.7.0 1.46.5 0.1.20 libcurl-minimal 8.5.0 libdb libdnf libeconf libedit libfdisk libffi libfido2 libgcc libgcrypt 5.3.28 0.69.0 0.4.0 3.1 2.37.4 3.4.4 1.10.0 11.4.1 1.10.2 2.5.5 2.5.1 2.37.4 2.48 0.8.2 1.46.5 0.1.20 8.5.0 2.5.5 2.5.1 2.37.4 2.48 0.8.2 1.46.5 8.5.0 0.69.0 0.69.0 3.4.4 3.4.4 11.4.1 1.10.2 11.4.1 1.10.2 AL2023 Minimal AMI compared to container images 265 Amazon Linux 2023 Package libgomp libgpg-error libidn2 libkcapi libkcapi- hmaccalc libmnl libmodulemd libmount libnghttp2 libpeas libpipeline libpsl Minimal AMI Container Minimal Container User Guide 11.4.1 1.42 2.3.2 1.4.0 1.4.0 1.0.4 2.13.0 2.37.4 1.59.0 1.5.3 0.21.1 11.4.1 1.42 2.3.2 2.13.0 2.37.4 1.59.0 1.42 2.3.2 2.13.0 2.37.4 1.59.0 1.32.0 0.21.1 0.21.1 libpwquality 1.4.4 librepo libreport- filesystem 1.14.5 2.15.2 1.14.5 2.15.2 1.14.5 2.15.2 libseccomp 2.5.3 libselinux libselinux- utils 3.4 3.4 3.4 3.4 AL2023 Minimal AMI compared to container images 266 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container libsemanage libsepol libsigsegv libsmartcols libsolv libss libstdc++ libtasn1 3.4 3.4 2.13 2.37.4 0.7.22 1.46.5 11.4.1 4.19.0 libtextstyle 0.21 3.4 2.13 2.37.4 0.7.22 11.4.1 4.19.0 3.4 2.13 2.37.4 0.7.22 11.4.1 4.19.0 libunistring 0.9.10 0.9.10 0.9.10 libuser libutempter libuuid libverto libxcrypt libxml2 libyaml libzstd 0.63 1.2.1 2.37.4 0.3.2 4.4.33 2.10.4 0.2.5 1.5.5 linux-firmware- 20210208 (noarch) whence logrotate 3.20.1 2.37.4 0.3.2 4.4.33 2.10.4 0.2.5 1.5.5 2.37.4 0.3.2 2.10.4 0.2.5 1.5.5 AL2023 Minimal AMI compared to container images 267 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container 5.4.4 1.9.4 3.10.0 3.10.0 4.1.0 6.2 6.2 1.6 lua-libs lz4-libs man-db 5.4.4 1.9.4 2.9.3 microcode_ctl 2.1 (x86_64) 5.4.4 1.9.4 microdnf microdnf-dnf mpfr ncurses ncurses-base ncurses-libs nettle net-tools npth 4.1.0 4.1.0 6.2 6.2 6.2 3.8 2.0 1.6 6.2 6.2 1.6 numactl-libs 2.0.14 oniguruma openldap openssh 6.9.7.1 2.4.57 8.7p1 openssh-clients 8.7p1 openssh-server 8.7p1 openssl 3.0.8 AL2023 Minimal AMI compared
al2023-ug-052
al2023-ug.pdf
52
1.2.1 2.37.4 0.3.2 4.4.33 2.10.4 0.2.5 1.5.5 linux-firmware- 20210208 (noarch) whence logrotate 3.20.1 2.37.4 0.3.2 4.4.33 2.10.4 0.2.5 1.5.5 2.37.4 0.3.2 2.10.4 0.2.5 1.5.5 AL2023 Minimal AMI compared to container images 267 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container 5.4.4 1.9.4 3.10.0 3.10.0 4.1.0 6.2 6.2 1.6 lua-libs lz4-libs man-db 5.4.4 1.9.4 2.9.3 microcode_ctl 2.1 (x86_64) 5.4.4 1.9.4 microdnf microdnf-dnf mpfr ncurses ncurses-base ncurses-libs nettle net-tools npth 4.1.0 4.1.0 6.2 6.2 6.2 3.8 2.0 1.6 6.2 6.2 1.6 numactl-libs 2.0.14 oniguruma openldap openssh 6.9.7.1 2.4.57 8.7p1 openssh-clients 8.7p1 openssh-server 8.7p1 openssl 3.0.8 AL2023 Minimal AMI compared to container images 268 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container openssl-libs 3.0.8 3.0.8 3.0.8 openssl-pkcs11 0.4.12 os-prober p11-kit 1.77 0.24.1 p11-kit-trust 0.24.1 pam passwd pciutils pciutils-libs pcre2 pcre2-syntax 1.5.1 0.80 3.7.0 3.7.0 10.40 10.40 policycoreutils 3.4 popt procps-ng psmisc 1.18 3.3.17 23.4 0.24.1 0.24.1 0.24.1 0.24.1 10.40 10.40 10.40 10.40 1.18 1.18 publicsuffix- 20240212 20240212 20240212 list-dafsa python3 3.9.16 3.9.16 python3-attrs 20.3.0 python3-audit 3.0.6 python3-awscrt 0.19.19 AL2023 Minimal AMI compared to container images 269 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container python3-babel 2.9.1 python3-cffi 1.14.5 python3-chardet 4.0.0 python3-c olorama python3-c onfigobj python3-c ryptography python3-d ateutil 0.4.4 5.0.6 36.0.1 2.8.1 python3-dbus 1.2.18 python3-distro 1.5.0 python3-dnf python3-dnf- plugins-core python3-d ocutils 4.14.0 4.3.0 0.16 python3-gpg 1.15.1 python3-hawkey 0.69.0 python3-idna 2.10 python3-jinja2 2.11.3 4.14.0 1.15.1 0.69.0 AL2023 Minimal AMI compared to container images 270 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container python3-j mespath python3-j sonpatch python3-j sonpointer python3-j sonschema python3-l ibcomps 0.10.0 1.21 2.0 3.2.0 0.1.20 0.1.20 python3-libdnf 0.69.0 python3-libs 3.9.16 0.69.0 3.9.16 python3-l ibselinux python3-l ibsemanage python3-m arkupsafe python3-n etifaces python3-o authlib 3.4 3.4 1.1.1 0.10.6 3.0.2 python3-pip- 21.3.1 21.3.1 wheel python3-ply 3.11 AL2023 Minimal AMI compared to container images 271 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container python3-p 3.4 olicycoreutils python3-p rettytable 0.7.2 python3-prompt- 3.0.24 toolkit python3-p ycparser python3-p yrsistent python3-p yserial 2.20 0.17.3 3.4 python3-pysocks 1.7.1 python3-pytz 2022.7.1 python3-pyyaml 5.4.1 python3-r equests 2.25.1 python3-rpm 4.16.1.3 4.16.1.3 python3-ruamel- 0.16.6 yaml python3-ruamel- 0.1.2 yaml-clib python3-setools 4.4.1 AL2023 Minimal AMI compared to container images 272 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container python3-s etuptools python3-s etuptools- wheel 59.6.0 59.6.0 59.6.0 python3-six 1.15.0 python3-systemd 235 python3-urllib3 1.25.10 python3-wcwidth 0.2.5 readline rng-tools rootfiles 8.1 6.14 8.1 rpm 4.16.1.3 rpm-build-libs 4.16.1.3 rpm-libs 4.16.1.3 rpm-plugin- 4.16.1.3 selinux rpm-plugin- 4.16.1.3 systemd-inhibit 8.1 8.1 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 4.16.1.3 rpm-sign-libs 4.16.1.3 4.16.1.3 sbsigntools sed 0.9.4 4.8 4.8 4.8 AL2023 Minimal AMI compared to container images 273 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container selinux-policy 38.1.45 selinux-policy- 38.1.45 targeted setup 2.13.7 2.13.7 2.13.7 3.40.0 3.40.0 shadow-utils 4.9 sqlite-libs sudo 3.40.0 1.9.15 sysctl-defaults 1.0 systemd 252.23 systemd-libs 252.23 systemd-n etworkd systemd-pam systemd-r esolved 252.23 252.23 252.23 systemd-udev 252.23 system-release 2023.6.20241031 2023.6.20241031 2023.6.20241031 tar tzdata 1.34 2024a update-motd 2.2 userspace-rcu 0.12.1 2024a AL2023 Minimal AMI compared to container images 274 Amazon Linux 2023 User Guide Package Minimal AMI Container Minimal Container util-linux 2.37.4 util-linux-core 2.37.4 vim-data 9.0.2153 vim-minimal 9.0.2153 which xfsprogs xz xz-libs yum zlib 2.21 5.18.0 5.2.5 5.2.5 4.14.0 1.2.11 zram-generator 1.1.2 zram-generator- 1.1.2 defaults zstd 1.5.5 5.2.5 4.14.0 1.2.11 5.2.5 1.2.11 AL2023 on AWS Elastic Beanstalk AWS Elastic Beanstalk is a service for deploying and scaling web applications and services. Upload your code and Elastic Beanstalk automatically handles the deployment — from capacity provisioning, load balancing, and auto scaling to application health monitoring. For more information, see AWS Elastic Beanstalk. To use Elastic Beanstalk, you create an application, upload an application version in the form of an application source bundle (for example, a Java .war file) to Elastic Beanstalk, and then provide some information about the application. Elastic Beanstalk automatically launches an environment AL2023 on Elastic Beanstalk 275 Amazon Linux 2023 User Guide and creates and configures the AWS resources needed to run your code. For more information, see the AWS Elastic Beanstalk Developer Guide. Elastic Beanstalk Linux platforms use Amazon EC2 instances, and these instances run Amazon Linux. As of August 4, 2023, Elastic Beanstalk offers the following platform branches based on Amazon Linux 2023: Docker, Tomcat, Java SE, Node.js, PHP, and Python. Elastic Beanstalk is working on releasing support for AL2023 to more Elastic Beanstalk platforms. The full list of Elastic Beanstalk platform support and current platforms built on top of AL2023 can be found in the Elastic Beanstalk Linux platforms section of the Elastic Beanstalk Developer Guide. You can find the Release Notes for new Elastic Beanstalk platforms and versions of existing platforms in the Elastic Beanstalk Release Notes. Using AL2023 in AWS CloudShell AWS CloudShell is a browser-based, pre-authenticated shell that you can launch directly from the AWS Management Console. You can navigate to CloudShell from the AWS Management Console a few
al2023-ug-053
al2023-ug.pdf
53
is working on releasing support for AL2023 to more Elastic Beanstalk platforms. The full list of Elastic Beanstalk platform support and current platforms built on top of AL2023 can be found in the Elastic Beanstalk Linux platforms section of the Elastic Beanstalk Developer Guide. You can find the Release Notes for new Elastic Beanstalk platforms and versions of existing platforms in the Elastic Beanstalk Release Notes. Using AL2023 in AWS CloudShell AWS CloudShell is a browser-based, pre-authenticated shell that you can launch directly from the AWS Management Console. You can navigate to CloudShell from the AWS Management Console a few different ways. For more information, see How to get started with AWS CloudShell? AWS CloudShell, which is currently based on Amazon Linux 2, will migrate to AL2023. The migration to AL2023 will begin to roll out in all AWS Regions starting on December 4, 2023. For more information about CloudShell migrating to AL2023, see AWS CloudShell migrating from Amazon Linux 2 to Amazon Linux 2023. Using AL2023 based Amazon ECS AMIs to host containerized workloads Note For more information on how to use AL2023 inside a container, see AL2023 in containers. Amazon Elastic Container Service (Amazon ECS) is a fully managed container orchestration service that helps you easily deploy, manage, and scale containerized applications. As a fully managed service, Amazon ECS comes with AWS configuration and operational best practices built-in. It's integrated with both AWS and third-party tools, such as Amazon Elastic Container Registry AL2023 CloudShell 276 Amazon Linux 2023 User Guide (Amazon ECR) and Docker. This integration makes it easier for teams to focus on building the applications, not the environment. You can run and scale your container workloads across AWS Regions in the cloud, without the complexity of managing a control plane. You can host containerized workloads on AL2023 using the AL2023 based Amazon ECS‐optimized AMI. For more information, see the Amazon ECS-optimized AMI Changes in AL2023 for Amazon ECS compared to AL2 As with AL2, AL2023 provides the base packages required to run as an Amazon ECS Linux instance. In AL2 the containerd, docker, and ecs-init packages were available through amazon- linux-extras, whereas AL2023 includes these packages in the core repositories. With the deterministic upgrades through versioned repositories feature, every AL2023 AMI by default is locked to a specific repository version. This is also true for the AL2023 Amazon ECS optimized AMI. All updates to your environment can be carefully managed and tested prior to deployment, as well as providing an easy way to revert to the content of a prior AMI in the event of an issue. For more information on this AL2023 feature, see Deterministic upgrades through versioned repositories on AL2023. AL2023 switches to cgroup v2 over the cgroup v1 interface supported in AL2. For more information, see Unified Control Group hierarchy (cgroup v2). Note AL2023 versions prior to 2023.2.20230920 (the first AL2023.2 release) contained a bug in systemd for Out-of-Memory (OOM) handling inside a cgroup. All processes in the cgroup were always killed instead of the OOM-Killer choosing one process at a time, which is the intended behavior. This was a regression when compared to AL2 behavior, and is fixed as of the 2023.2.20230920 release of AL2023. The code to build the Amazon ECS-optimized AMI is available on the amazon-ecs-ami GitHub project. The release notes describe which AL2023 version maps to which Amazon ECS AMI version. Amazon ECS relevant changes since AL2 277 Amazon Linux 2023 User Guide Customizing the AL2023 based Amazon ECS-optimized AMI Important We recommend that you use the Amazon ECS optimized AL2023 AMI. For more information, see Amazon ECS-optimized AMI in the Amazon Elastic Container Service Developer Guide. You can use the same build scripts that Amazon ECS uses to create custom AMIs. For more information, see Amazon ECS-optimized Linux AMI build script. Using Amazon Elastic File System on AL2023 Amazon Elastic File System (Amazon EFS) provides serverless, fully elastic file storage so that you can share file data without provisioning or managing storage capacity and performance. Amazon EFS is built to scale on demand to petabytes without disrupting applications, growing and shrinking automatically as you add and remove files. Because Amazon EFS has a simple web services interface, you can create and configure file systems quickly and easily. The service manages all the file storage infrastructure for you, meaning that you can avoid the complexity of deploying, patching, and maintaining complex file system configurations. Amazon EFS supports the Network File System version 4 (NFSv4.1 and NFSv4.0) protocol, so the applications and tools that you use today work seamlessly with Amazon EFS. Multiple compute instances, including Amazon EC2, Amazon ECS, and AWS Lambda, can access an Amazon EFS file system at the same time. Therefore, an EFS file system can provide a common data source for workloads and applications that