import subprocess
cmd = (
    """aws deploy push --application-name SomeApp --s3-location  s3://bucket/Deploy/db_schema.zip --ignore-hidden-files"""
    )
push = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
print(push.returncode)
Как использовать awscli внутри скрипта Python?