Crontab missing from most recent AWS Linux AMI


I have installed al2022-ami-2022.0.20220419.0-kernel-5.15-x86_64 on a m5.2x. I went to install a user cron and the crontab binary is missing. This is a default linux binary. The system cron seems to be fine (though I haven't tested it) but user crons are not working.

ec2-user $ crontab -l
 -bash: crontab: command not found
 ec2-user $ which crontab
 /usr/bin/which: no crontab in ...
 ec2-user $ ls /usr/bin/crontab
 ls: cannot access '/usr/bin/crontab': No such file or directory

This is fine in previous versions with the default install. Here it is with a default version of amzn2-ami-kernel-5.10-hvm-2.0.20220406.1-x86_64-gp2 also installed on an m5.2x

ec2-user $ which crontab
asked 2 years ago7815 views
1 Answer


Thank you for your post. I launched a test instance using the al2022-ami-2022.0.20220419.0-kernel-5.15-x86_64 AMI and verified your report. The cronie package, which provides the crontab command, is not included in this AMI.

# rpm -qa |grep -i cron

I also checked the previous version of the AL2022 AMI and confirmed that the cronie package was not present there either. I would suggest you manually install the cronie and cronie-anacron packages that are both available from the amazonlinux repository.

yum install cronie cronie-anacron

Note, you can also make use of user data scripts[1] to install these packages at the time of launching instances.

In the meantime, I have opened an internal ticket with the Amazon Linux team to report that these packages are not included in the AL2022 images.


answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions