How to copy files from your computer to Amazon EC2?

By | June 30, 2021

To transfer files to AWS EC2 instance, one can use secure copy. The format can be seen below.

$scp -i <xxxxx.pem> <location of file> <AWS public DNS>: <folder>

Here is an example:

$scp -i ~/Desktop/amazon.pem ~/Desktop/text.txt

This will upload the file to the user’s home directory which is actually “home/ubuntu”

Leave a Reply

Your email address will not be published. Required fields are marked *