s3cmd execute in python script
#method 1 -----------
from os import popen
eString = 's3cmd sync -r upload_folder_path s3://bucket_name'
popen(eString)
#not working --------
#method 2 -----------
import subprocess
eString = 's3cmd sync -r upload_folder_path s3://bucket_name'
p = subprocess.Popen(eString, shell=True, stdout=subprocess.PIPE)
p.wait()
#working :) ----------
'클라우드&도커 > AWS,아마존' 카테고리의 다른 글
AWS Route53 ---- CloudFront ---- S3 (0) | 2016.07.26 |
---|---|
AWS S3 Bucket Create (0) | 2016.07.26 |
AWS Route53 ---- Domain service (0) | 2016.07.26 |
s3cmd execute in python script (0) | 2016.07.26 |
WinSCP -- AWS EC2 Access (0) | 2016.05.24 |
AWS - Access Port Add (접속 포트 추가) (0) | 2016.05.05 |
Bios Setting - Virtualization Technology (0) | 2015.02.01 |
Compute Node CPU (0) | 2015.01.11 |