How to disable Amazon EC2 instance yum automatic nightly check-update?

The purpose is to generate the message that's displayed every time you SSH to the host, something like:

~ $ ssh [email protected]


       __|  __|_  )
       _|  (     /   Amazon Linux AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-ami/2018.03-release-notes/
10 package(s) needed for security, out of 21 available          <<<=== This
Run "sudo yum update" to apply all updates.                     <<<=== and this
[ec2-user@ip-172-31-11-77 ~]$

It is run as part of the /etc/cron.d/update-motd cron job.

The command you want to disable is run from /etc/update-motd.d/70-available-updates - if you want to disable it edit this file and comment it out.

Do not simply remove the file because on the next patching it may be brought back.

Hope that helps :)