Uploading file to AWS from local machine

there are number of ways to achieve what you want

  1. use s3cmd http://s3tools.org/s3cmd

  2. or use cyberduck http://cyberduck.ch/

  3. or write a tool using amazon Java API


Diego's answer works.. However, if you're unaware of your elastic IP, then you can simply scp using following command (check the order of arguments)

scp -i path-to-your-identifier.pem file-to-be-copied ubuntu@public-IP:/required-path

just for reference, here ubuntu is your AWS user and public-IP is somewhat like 54.2xx.xxx.xxx e.g. 54.200.100.100 or such (If order is messed up: filename before identifier, then you'll get a Permission denied (publickey).lost connection error)

Also, keep in mind the permissions of .pem file.. Should be 400 or 600. Not public to all. Hope it helps!


You can use plain scp:

scp -i ~/Downloads/file.pem local_image_file user@ec2_elastic_ip:/home/user/images/

You need to put an Elastic IP to the EC2 instance, open port 22 to your local machine IP in the EC2 instance security group, and use the right user (it can be ec2-user, admin or ubuntu (look at the AMI documentation)).