I am making script to download files form s3 bucket to local linux folder. To achieve that i have to use dynamic values for buckets and folders where we want to download stuff.
I know how to do with
aws s3 cp s3://bucket /linux/local/folder --recursive --p alusta
But how to accept bucket value at runtime
dwn_cmd = "aws s3 cp s3://bucket/name/" + str(year_name) + '/' + str(month_name)
folder_path = "/local/linux/folder/" + folder_name
#subprocess.call(['aws','s3','cp',dwn_cmd,folder_path,'--recursive','--p', 'alusta'])
This is showing error that subprocess needs s3 bucket path and local folder path. I think it is not picking up the path. If i hard code the path it is working but not with this. How could I achieve my result