30

I want to be able to transfer a number of files (html, php, jpg, etc...) to my Amazon EC2 instance that I'm hosting my web server on. What is the easiest or most effective way to do this?

cfrederich
  • 1,790
  • 6
  • 26
  • 35
  • You could install a FTP client like filezilla on your local machine. This provides a UI interface to easily navigate within your source and destination directories. [filezilla-project.org](https://filezilla-project.org/) – Kermit_ice_tea Nov 15 '16 at 23:47

8 Answers8

17

The simplest way is to install an FTP service on your EC2 host, open port 21 in the firewall and Security Group, and use your FTP client of choice on Win7 to push the data up.

For bonus points, use SFTP instead over port 22. You don't mention the EC2 host OS, but if it's Windows you can use msftpsvr on the host and FileZilla on Win7.

Eight-Bit Guru
  • 9,756
  • 2
  • 48
  • 62
  • the host OS is just the basic 32-bit Linux distro they use – cfrederich Jun 13 '11 at 14:50
  • SSH is probably the way to go then - if there's no SSH daemon on the host (unlikely but possible) just grab OpenSSH. Setup info here: http://www.brennan.id.au/16-Secure_Shell.html – Eight-Bit Guru Jun 13 '11 at 15:02
15

Simplest way.

  1. Launch putty. Linux users can simply launch the terminal.
  2. scp -i /path/to/PEM_File /path/to/file username@host_address.amazonaws.com:/path/to/copy

If you're looking for something UI based, I'd go with Filezilla.

Sankalp
  • 1,182
  • 2
  • 17
  • 22
  • Isn't that a Linux command? The OP asked about uploading from a Windows machine. – falsePockets Jan 30 '18 at 03:22
  • I guess they'll have to use Putty – Sankalp Jan 31 '18 at 05:49
  • 1
    How do you do scp with Putty? I didn't think it had scp functionality – falsePockets Feb 10 '18 at 05:34
  • FYI : The `host_address` is what you find in the EC2 Dashboard for your Instance of the AMI (Amazon Machine Image). the username is the one inside the AMI, for me it was `root`. and the `path/to/copy` is the path inside the AMI where you wish your files/Directory to be transfered. One last note : add `-r` to copy a directory – Imad Jul 07 '18 at 22:47
7

Windows remote desktop allows you to make certain drive on your local computer available on to the cloude instance.

John Lin
  • 71
  • 1
  • 1
5

You can also install Dropbox on your EC2 instance and selectively sync files (assuming you use Dropbox). It's a pretty painless way to set things up, though you do add some overhead to your EC2 instance because you're always running Dropbox.

Jim
  • 11,229
  • 20
  • 79
  • 114
  • 2
    Alternatively, you can use the web UI on the EC2 instance to download files. That way you don't have to install the Dropbox client. – goertzenator May 09 '12 at 19:22
  • 1
    Unfortunately Dropbox doesn't work very well on EC2: every time you restart the instance, Dropbox will re-prompt for credentials. – Sam Rueby Aug 22 '14 at 02:05
2
wget -O ./filename <URL TO FILE>
Robbie Guilfoyle
  • 3,363
  • 1
  • 18
  • 18
  • If the filename requires credentials to download (for example, a file on bitbucket), probably you can add these params at the end: --user= --ask-password – shasi kanth Jul 08 '19 at 12:45
2

These are all valid ways but not by far the simplest. For small files, once you are connected to your E2C remotely it's as simple as copy/paste or drag/drop from your pc to your remotely connected E2C to copy your files over. For larger files that may not copy this way you can easily add the volume your files exist on as an available local resource then you will simply copy the files from drive to drive on the E2C directly.

  1. After launching remote desktop before connecting - click 'show options'
  2. On the Local Resources tab under 'Local devices and resources' click 'More...'
  3. Put a check in the resource you want to be available and click 'OK'
  4. Connect as usual and your resource will now be available on the E2C to copy from.
pbaldridge
  • 47
  • 1
  • 8
1

The best way to do is through WinScp you can also use some similar software, for winscp use the pem that you got and convert it into ppk file and utilize the same to login to winscp.

But if you have a linux instance you have the access to add files in only two folders either in home/ubuntu or temp.

Vibin Guevara
  • 778
  • 10
  • 27
0

If your remote EC2 instance is a remote desktop you can simply transfer files first by connecting with it via an elastic IP and then using simple copy and paste to transfer files between your local computer and remote desktop.

Bilal Mahmood
  • 169
  • 1
  • 3