I am trying to move/copy the particular extension file(.xlsx) move to my s3 bucket.
I am using below command for this.
cmd= 'aws s3 cp myfolder/*.xlsx s3://mybucket/myfolder --recursive'
where:
**myfolder** is my local system directory where the file is present
**s3://mybucket/myfolder** : folder location where i am placing all the .xlsx file in s3.
But when I am running this command using python
os.system(cmd)
Getting Error : 255
can anyone suggest me any change or any other way to achieve the goal?
Note: I already configured my system cmd whit my s3 key and all commands are working fine also.
UPDATE:
cmd = '$aws s3 cp myfolder/*.xlsx s3://mybucket/myfolder --recursive'
getting error:1 on interactive python.
question from:
https://stackoverflow.com/questions/65841187/how-to-move-copy-all-files-directory-from-local-machine-to-s3-bucket 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…