Transfer files between laptop and AWS server

By | January 26, 2018

Transfer files between laptop and Amazon web server is an essential function one must learn. I needed to learn this for the purpose of transferring my Jupyter Notebooks from my machine to AWS server and vice versa.

Deep learning has become popular and it is evolving each day. Training deep learning models with large data on local machines/laptops is time consuming and takes considerable amount of computation. In long term, such heavy training may damage laptop hardware. Companies like Amazon, Google and others provide cloud based facilities for performing such computation. Amazon Web Services has advantage of simplicity in implementation.

transfer files aws server

In deep learning and data science, many people prefer working with Jupyter Notebooks. We often need to transfer these notebooks from our local machine to AWS server. This can be done by simple command in Mac Terminal:

Similarly, to download a file from the server, write the following command in Terminal:

After ‘ec2-user@’ write the public DNS of your instance on AWS server. Also, make sure that you run this command from mac terminal as Mac user and not as AWS user. If might come across following error in that case:

Permission denied (publickey).