I am trying to run a very basic AWS CLI command from python, instead of using boto3
So I found one answer from stack overflow I tried that but it didn't do any better, I don't want to use boto3, below is my code which I have tried
import subprocess
cmd='aws s3 ls'
push=subprocess.Popen(cmd, shell=True, stdout = subprocess.PIPE)
print push.returncode
If I run these commands into bash scripts it works perfectly fine. But I have a restriction that it has to be done using python scripts only.