My recipe (/etc/cron.daily/dnf-updates):

#!/bin/bash
readonly V=$(/usr/bin/dnf check-release-update --latest-only --version-only 2>&1)
[ -n "$V" ] && /usr/bin/dnf upgrade --security --assumeyes --releasever=$V

Shortcut:

/usr/bin/dnf upgrade --security --assumeyes --releasever=latest
Answer from ggrandes on serverfault.com
🌐
AWS re:Post
repost.aws › questions › QUC8zcUlyNRY-yeuv480HVBQ › how-do-you-install-dnf-on-amazon-linux-2
How do you install dnf on Amazon Linux 2? | AWS re:Post
September 22, 2019 - Right now Amazon Linux 2 does not support dnf. If you require support for rpm and yum in ansible, you will need to run ansible with python 2.7. ... How do I install the Certbot package in my Lightsail instance for Let's Encrypt certificate ...
🌐
Reddit
reddit.com › r/aws › dnf in amazon linux instances
r/aws on Reddit: dnf in Amazon Linux Instances
September 26, 2023 - I am working in a fully private network with a S3 gateway added along with some additional endpoints to allow me to connect to EC2 (Amazon Linux) using sessions manager. I needed to install some dependencies on my EC2 and used dnf to search and subsequently install.
Discussions

amazon ec2 - Why is asking for DNF when YUM is specified? - Stack Overflow
I am running a GHA workflow that uses an Ubuntu 22.04 runner to run an Ansible playbook on an Amazon Linux 2 EC2 instance on every step that uses the ansible.builtin.yum module, for example: - name: ' More on stackoverflow.com
🌐 stackoverflow.com
Can't install yum package on Amazon Linux 2 when ansible is installed using python 3
Note that dnf is not available natively on Amazon Linux 2. $ sudo yum -y install dnf Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 2.4 kB 00:00:00 191 packages excluded due to repository priority protections No package dnf available. More on github.com
🌐 github.com
12
September 22, 2019
packaging - How do I get a package (or a package version) that is available on modern Fedora (or other RH-oids) for Amazon Linux 2023? - Unix & Linux Stack Exchange
Luckily, that's a one-time: sudo dnf install mock fedpkg, done. ... # 1. fedpkg clone $pkgname cd $pkgname # 2. fedpkg mockbuild --root /etc/mock/amazonlinux-2023-x86_64.cfg # 3. # Create a tar # if in bash (you probably are): enable recursive globs shopt -s globstar tar cvf packages-$pkgname.tar results*/**/*.rpm · Now, you can just copy over your freshly created .tar file, and on your amazon linux ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
July 4, 2024
Is there a way to install microdnf or dnf on amazonlinux:2 ?
Is there a way to install microdnf (or dnf) for amazonlinux:2 ? More on repost.aws
🌐 repost.aws
1
1
June 27, 2023
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › what is amazon linux 2023? › package management tool
Package management tool - Amazon Linux 2023
May 22, 2026 - Use the new default package management commands. DNF in AL2023 replaces AL2's YUM command.
🌐
GitHub
github.com › amazonlinux › dnf-plugin-support-info
GitHub - amazonlinux/dnf-plugin-support-info: A DNF plugin to check Support Information for Amazon Linux 2023 packages. · GitHub
$ dnf supportinfo --show installed kernel 6.1.66-93.164.amzn2023 installed supported 2028-03-15 Kernel has security support until March 2028 kernel-livepatch-repo-s3 2023.3.20240108-0.amzn2023 installed supported 2028-03-15 Kernel has security support until March 2028 acl 2.3.1-2.amzn2023.0.2 installed supported 2028-03-15 Amazon Linux 2023 end-of-life acpid 2.0.32-4.amzn2023.0.2 installed supported 2028-03-15 Amazon Linux 2023 end-of-life alternatives 1.15-2.amzn2023.0.2 installed supported 2028-03-15 Amazon Linux 2023 end-of-life amazon-chrony-config 4.3-1.amzn2023.0.4 installed supported 20
Starred by 6 users
Forked by 4 users
Languages   Python
🌐
GitHub
github.com › ansible › ansible › issues › 62722
Can't install yum package on Amazon Linux 2 when ansible is installed using python 3 · Issue #62722 · ansible/ansible
September 22, 2019 - Note that dnf is not available natively on Amazon Linux 2. $ sudo yum -y install dnf Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 2.4 kB 00:00:00 191 packages excluded due to repository priority protections ...
Author   ansible
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › updating al2023 › manage package and operating system updates in al2023
Manage package and operating system updates in AL2023 - Amazon Linux 2023
To provide you with Amazon Linux specific information about these different packages, the DNF supportinfo plugin provides metadata about a package. In the following example, the dnf supportinfo command returns metadata for the glibc package. $ sudo dnf supportinfo --pkg glibc Last metadata expiration check: 0:07:56 ago on Wed Mar 1 23:21:49 2023. Name : glibc Version : 2.34-52.amzn2023.0.2 State : installed ...
Find elsewhere
Top answer
1 of 1
1

First of all, you need to figure out the source package name of the package you want to install. That's often very easy – on your Fedora (or fedora-alike platform, not on your amazon linux machine) you figure out the package (for example, by asking rpm -qf /usr/bin/programname for the package name), then you ask dnf info {package name} | grep '^Source' to get the source package name. It's the part before the -X.XX-X.fcXX.src.rpm.

Then, armed with knowledge of the source package name, which we'll replace with $srcpkg in the following, you can run a target build. You need to set up the tools first. Luckily, that's a one-time: sudo dnf install mock fedpkg, done.

From there on, it's just

  1. cloning the package source repo
  2. doing a build for the target machine
  3. copying over the resulting packages to your amazon linux machine and
  4. installing them there
# 1.
fedpkg clone $pkgname
cd $pkgname

# 2.
fedpkg mockbuild --root /etc/mock/amazonlinux-2023-x86_64.cfg 

# 3. 
# Create a tar
# if in bash (you probably are): enable recursive globs
shopt -s globstar
tar cvf packages-$pkgname.tar results*/**/*.rpm

Now, you can just copy over your freshly created .tar file, and on your amazon linux machine:

cd /tmp/
mkdir packages
cd packages
tar xf /path/to/copied/over/packages-$pkgname.tar
shopt -s globstar
sudo dnf install **/*.rpm
# optionally: clean up packages
cd /tmp && rm -rf packages && rm /path/to/copied/over/packages-$pkgname.tar

Using this method for other RedHat-oid Linuxes

This works the same for Alma, Rocky Linux, RHEL and CentOS; you need to use a different mock root config in step 2. Note that when you look into /etc/mock, you will find pre-existing ones with +epel in their names – these might contain dependencies you need, but beware that you might have to enable EPEL on your target platform as well.

For instructions on how to build packages "the hard way" without mock, see I need a package for my version of RHEL/EPEL/CentOS/Fedora, but it's only packaged for other versions of Redhatoids

Because Amazon Linux is not RedHat, or CentOS, there's no EPEL for it, so you might need to first port things that are available in EPEL to amazon linux, install that in your own container config (i.e., a modified copy of amazonlinux-2023-….cfg), and then can proceed. You're essentially porting parts of another distro to Amazon Linux then. This might be the time to consider using a podman container to run the respective software in a non-Amazon Linux distro.

🌐
Slideruleearth
slideruleearth.io › web › rtd › developer_guide › how_tos › amazon_linux_arm_setup.html
Setting Up Amazon Linux Development Environment — sliderule v5.0.7 documentation
January 28, 2026 - sudo dnf install 'dnf-command(config-manager)' sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo sudo dnf install gh ... mv ~/.hidden_aws ~/.aws || true unset AWS_PROFILE aws sso login --profile <profile> --use-device-code aws ecr get-login-password --region ...
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › al2 on amazon ec2 › configure al2 instances › manage software on your al2 instance › find and install software packages on an al2 instance
Find and install software packages on an AL2 instance - Amazon Linux 2
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 management tool is DNF.
🌐
AWS re:Post
repost.aws › questions › QUN75E5kmMSlORzTduHwPeDQ › is-there-a-way-to-install-microdnf-or-dnf-on-amazonlinux-2
Is there a way to install microdnf or dnf on amazonlinux:2 ? | AWS re:Post
June 27, 2023 - FROM maven:3.9.3-amazoncorretto-17 ARG CHROME_VERSION=113.0.5672.63-1 ADD google-chrome.repo /etc/yum.repos.d/google-chrome.repo RUN microdnf install -y google-chrome-stable-$CHROME_VERSION \ && sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome
🌐
Reddit
reddit.com › r/fedora › amazon ec2? lightsail? rhel install? results...
r/Fedora on Reddit: Amazon EC2? Lightsail? RHEL Install? <dnf search amazon> results...
February 9, 2021 -

Hi everyone,

I'm pretty new to Fedora 33 and it's been rough so far. I'm unclear on a few things which are all seemingly interconnected.

1.) How to use difft. distro editions (can they be used on the same desktop environment?) because I'd like to use Fedora Workstation, Fedora Server, Fedora Cloud and Fedora IoT - do i basically need to install, enable all of these and just use them all on my main Fedora 33 Workstation desktop environment OR do I need to login to those instances with a difft. settings page? Same goes with the "Fedora Spins" -> I don't understand why I have to select the gear icon and choose "Cinnamon" for example.

2.) Which Amazon Web Services image I should download OR do I just install and enable from the Command line?I'm aiming to host and build a WordPress site on Amazon and have the Linux Fedora 33 distro. I'm going through a Udemy course on how to do this and the guy is using Ubuntu, of which Amazon has an EC2 Image already pre-built.

I'm seeing here that Fedora 33 actually may have an image already, but it looks like it's for the cloud. Again, I'm quite confused on how to use Fedora Cloud, Fedora Server and Fedora IoT operate together - given I'm mainly using Fedora 33 Workspace. Are those literally different desktop environments and everything? Do I basically have to install those things and then login to EITHER 1.) Workstation 2.) Cloud 3.) WorkStation 4.) IoT?

This is where I suppose I'm getting a bit hung up on Amazon. ALSO, I have a couple of virtual machines (VM's) that i'm playing with by way of Gnome Boxes. Since RHEL is one of them (just wanted to see if there were any differences at all b/w Fedora and RHEL), should I be using the RHEL image for my Amazon EC2 instance or just simply use Amazon Linux?

Fedora 33 Cloud Based Image (Is this for Fedora Cloud?): https://aws.amazon.com/marketplace/pp/prodview-ve75fkf6cqdxw?ref_=unifiedsearch

Can I use the RHEL image that's evidently already installed or will that not work for Fedora?

Do I use the Fedora 33 EFS tool? https://docs.aws.amazon.com/efs/latest/ug/using-amazon-efs-utils.html

Should I be using the conversion tool? https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Welcome.html

Below you'll find the results for when I run a <dnf search amazon> command. I have no idea which one of these to install - or should I be installing all of them?

[root@localhost ~]# dnf search amazon

Last metadata expiration check: 2:19:33 ago on Mon 08 Feb 2021 10:43:36 PM EST.

======================== Name & Summary Matched: amazon ========================

flight-of-the-amazon-queen.noarch : Flight of the Amazon Queen - Adventure Game

flight-of-the-amazon-queen-cd.noarch : Flight of the Amazon Queen - Adventure

: Game - CD version

perl-Net-Amazon.noarch : Framework for accessing amazon.com via REST

perl-Net-Amazon-EC2.noarch : Perl interface to the Amazon Elastic Compute Cloud

: (EC2)

perl-Net-Amazon-S3.noarch : Use the Amazon Simple Storage Service (S3)

perl-Shared-Examples-Net-Amazon-S3.noarch : Example modules for Net::Amazon::S3

: Perl tool kit

============================= Name Matched: amazon =============================

perl-Net-Amazon-EC2-Metadata.noarch : Retrieves data from EC2 Metadata service

=========================== Summary Matched: amazon ============================

clamz.x86_64 : Amazon Downloader

ec2-hibinit-agent.noarch : Hibernation setup utility for Amazon EC2

evolution-chime.x86_64 : Evolution plugin for Amazon Chime

fence-agents-aws.noarch : Fence agent for Amazon AWS

ghc-aws.x86_64 : Amazon Web Services (AWS) for Haskell

golang-github-mitchellh-goamz-devel.noarch : Golang Amazon Library

golang-github-ncw-acd-devel.noarch : Go library for accessing Amazon Cloud Drive

golang-github-smartystreets-aws-auth-devel.noarch : Signs requests to Amazon Web

: Services

libs3.i686 : C Library and Tools for Amazon S3 Access

libs3.x86_64 : C Library and Tools for Amazon S3 Access

nbdkit-S3-plugin.x86_64 : Amazon S3 and Ceph plugin for nbdkit

perl-AWS-Signature4.noarch : Create a version4 signature for Amazon Web Services

perl-VM-EC2.noarch : Perl interface to Amazon EC2

php-aws-php-sns-message-validator.noarch : Amazon SNS message validation

php-aws-sdk3.noarch : Amazon Web Services framework for PHP

pidgin-chime.x86_64 : Pidgin/libpurple protocol plugin for Amazon Chime

purple-chime.i686 : Libpurple protocol plugin for Amazon Chime

purple-chime.x86_64 : Libpurple protocol plugin for Amazon Chime

python3-boto.noarch : A simple, lightweight interface to Amazon Web Services

python3-s3transfer.noarch : Amazon S3 Transfer Manager

rubygem-fog-aws.noarch : Module for the 'fog' gem to support Amazon Web Services

s3cmd.noarch : Tool for accessing Amazon Simple Storage Service

s3fs-fuse.x86_64 : FUSE-based file system backed by Amazon S3

sendKindle.noarch : CLI tool for sending files via email to your Amazon Kindle

: device

[root@localhost ~]#

Fedora 33 is definitely not ready for the everyday average user - so I'm just trying to continuously bang my head against the wall and figure this shit out. Any help would be much appreciated!

Top answer
1 of 3
5
1: Many of the different editions build on the same base. Fedora Server is a traditional Linux system with no graphical desktop, designed for systems that may not even have a monitor or keyboard most of the time. Fedora Workstation already "has" Fedora Server running in it, when you open the terminal you're there. Fedora IoT and Fedora Cloud are different. Fedora Cloud is a specialized image made to be run immediately in a VM, it's not really installed so much as provisioned (Fedora 33 Cloud Based Image on AWS should be Fedora Cloud). Fedora IoT would also have to be installed on a VM to use it in an existing system, or you could use Fedora Silverblue which is like a Workstation edition of Fedora IoT. Both IoT and Silverblue are immutable systems, when you boot you're essentially booting into the exact system build that is delivered and updated by Fedora. It is designed for containerized workloads that run on top of that stable base. A comparison could be Android or iOS, where the system is shipped by the vendor, and apps keep to themselves. A system can have multiple desktop environments installed. GNOME, KDE, Cinnamon, Xfce, etc. can all be installed on the same computer. You select which one you want to use with the gear icon, because they are a full environment and you cannot run both simultaneously. 2: You don't download or enable an Amazon AWS image from the command line. Amazon is "the cloud" so the Cloud image runs there. You would need to start it and then log in to it and make changes there, it would not be running on your local system at all. You're running RHEL in Gnome Boxes, it's local. It's not running on the Amazon cloud. 3: You don't need to use the EFS tool or the Conversion tool. You don't need to install those packages. You run an instance and then connect to it . Keep in mind AWS instance storage is not necessarily persistent , AWS can get complicated fast which is why it has its own training above and beyond OS-level tasks. Something like DigitalOcean or Linode is going to provide a much more traditional cloud-VM "start, login, do stuff" experience in comparison (Lightsail does too, but does not support Fedora). Fedora is plenty ready for the average user, but what you are attempting is not average-user tasks. AWS is a professional tool.
2 of 3
3
u/SirLandoCardassian gave you some great answers, I'll add my two cents You sound like you are trying to to learn too many things at the same time and confusing yourself greatly in the process. What you are trying to understand takes months or years of learning (and failing). Its great you are following a course, and have a goal that you want to accomplish, but remember to take some time to actually understand what you are doing and why you are doing it. For now just ignore all RHEL/Ubunut/Fedora/... and focus on what to do with it. Find some good resources to teach you the basics, study them thoroughly, and don't loose heart when thinks don't work. I have been using Linux for 25+ years, and there is a lot to wrap your head around. It gets even worse when you add subjects like networking and the cloud to the mix. Good luck on your journey :-)
🌐
Reddit
reddit.com › r/aws › a case for a better package manager for amazon linux
r/aws on Reddit: A case for a better package manager for Amazon Linux
November 29, 2019 -

Hi, I'm new to AWS and love how Lambda works. But building a few projects, I discovered the shenanigans of deploying native binaries on Lambda.

The testing cycle is long, build > deploy layer> test > repeat. But what's poking me is this Yum package manager. Most packages on Yum are old, unlike apt-get on Ubuntu. Also many times Yum breaks and makes me hunt for package dependencies. This generally forces me to build most packages from source (./configure, make, make install cycle).

Don't get me wrong, I really like the Serverless paradigm. But I feel that this entire cycle of spinning up EC2/docker and then building most packages from scratch is overwhelming for a beginner. While EC2 users can chose to deploy a Ubuntu server instead, Lambda doesn't offer such a choice. Bottom line, I feel Amazon Linux is big enough to stand on it's own right. A package manager like APT/YUM/DNF with latest trustworthy packages for Amazon Linux would go a long way.

🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › al2 on amazon ec2 › configure al2 instances › manage software on your al2 instance
Manage software on your AL2 instance - Amazon Linux 2
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: ... While there are many packages available in these repositories that are updated by AWS, there might be a package that you want to install ...