By using AWS re:Post, you agree to the Terms of Use
/Crontab missing from most recent AWS Linux AMI/

Crontab missing from most recent AWS Linux AMI

0

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
/usr/bin/crontab
1 Answers
0

Hello,

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
crontabs-1.11-24.20190603git.amzn2022.noarch

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.

References:
[1] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html

answered 2 months 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