joshtronic

in Servers / Serverless #AWS

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

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.