AWS CLI not working with cron


I have this script:

It works perfectly if I run it from the shell, but does nothing with Cron. Why? I am using IAM roles, is it important?


Ok, after several hours I found the solution:

The user root was running the script but AWS was not configured for this user. I only needed to configure AWS for the user root:

Leave a Reply