How to apply security updates on Amazon Linux 2 AMI

Security updates are important and should be applied regularly, even automated if that’s an option (it is on Debian, as part of unattended upgrades). Amazon Web Services (AWS) offers their own Linux distribution, that is, and I quote “largely binary compatible” with Red Hat Enterprise Linux.

Something I’ve learned about AWS is that there are varying degrees of what
“compatible” actually means.

Fortunately, for things like installing software and applying security upgrades,
Amazon Linux 2 AMI works just like any other system that uses yum would work.

To apply just security updates, simply run:

% yum update --security
Zsh

Keep in mind this command does require super user level privileges.

And if you are interested in automating upgrades, there is a package called
yum-cron that can be installed easily with the yum command.

Josh Sherman - The Man, The Myth, The Avatar

About Josh

Husband. Father. Pug dad. Musician. Founder of Holiday API, Head of Engineering and Emoji Specialist at Mailshake, and author of the best damn Lorem Ipsum Library for PHP.


If you found this article helpful, please consider buying me a coffee.