'Cronjob Script not working for Graviton based EC2 instance with encryption enabled on EBS volume

I have one Ubuntu 18.04.6 LTS EC2 Instance having Graviton2 arm64 Architecture. I have also enabled encryption on EBS volume.

I configured some cronjob bash script.

I was able to run those script manually by ./backup-script.sh command.

But when configured cron job below.

0 4 * * * /bin/sh /path/to/script/backup-script.sh

It is not able to execute.

I have other EC2 instances where cron job is running successfully but those are not graviton2 based instance neither EBS encryption enabled on them.



Solution 1:[1]

Have you checked logs grep CRON /var/log/syslog? It should have worked. Verified by running simple cron job on Grv2 instance Ubuntu 18.

Solution 2:[2]

I found the solution. Cronjob script is now working in graviton.

But any data from /var/ directory is not getting copy to s3.

It gives below error-

"The user-provided path /var/www/ does not exist."

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 tanveen bharaj
Solution 2 kgcwc09