The reason you need to specify the full path to the aws command is because cron works by default with a very limited environment. I ran into this problem and debugged it by adding it to the cron script:
set | sort > /tmp/environment.txt
Then I ran the script through cron and through the command line (renamed the environment file between starts) and compared them. This led me to need to set the PATH and AWS_DEFAULT_REGION environment variables. After that, the script worked fine.
source
share