Using Python & WinSCP to load files to Amazon EC2



Using Python & WinSCP to load files to Amazon EC2

I am writing a Python 2.7 code to perform tasks with files on AWS ec2 instances, such as:

- load file from local windows PC to ec2 folder
- open new directories on ec2
- copy files from ec2 folder to another ec2 folder

I already have WinSCP installed and I set up saved connections to all of the ec2 servers I intend to work with. Currently I am manually loading the files from my PC to ec2, and running linux commands via PuTTY. So i just want to automate the process.

I am new to Python, WinSCP and coding in general, but from what I gather WinSCP can be accessed grammatically, via Python, and do some or maybe even all of the tasks listed above (btw i use boto to load to s3 but with ec2 boto have no such options).

Important to mention that I use ppk instead of password when connecting to ec2.

I saw the guids in this site ( and googled around quite a bit, but couldn't get it work right.

Would much appreciate if someone could point me to the right path.
Cheers :)[/list]

Reply with quote


You can post new topics in this forum