aws crontab not working using subprocess
Question: Crontab is working but not executing aws cli command. I am using python and
Subprocess.Popen

    
    
    import subprocess
    does not work...
    proc = subprocess.Popen("aws rds describe-db-instances > /tmp/testoutput.txt", stdout=subprocess.PIPE, shell=True)
    
    does work...
    proc = subprocess.Popen("echo $(date) > /tmp/testoutput.txt", stdout=subprocess.PIPE, shell=True)
    

same user and same permissions also same permission on aws credentials. aws
rds describe-db-instances works from command line


Answer: You can add credentials in your env variables or create a confirgratin file.
Aws click will automatically locate the credentials

