Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading files on Amazon EC2

I have an Amazon EC2 instance running. When i access the url, I get the Apache Test page, and it says that i'll have to upload my files into /var/html/

My question is, how do i do it? I use Mac OS X 's terminal for accessing the instance.

FTP doesn't seem to work. Is there any other way?

like image 681
Krish Avatar asked Apr 28 '12 15:04

Krish


People also ask

How do I upload files to AWS?

Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/ . In the Buckets list, choose the name of the bucket that you want to upload your folders or files to. Choose Upload.

Can I store files on EC2?

Amazon EC2 provides you with flexible, cost effective, and easy-to-use data storage options for your instances. Each option has a unique combination of performance and durability. These storage options can be used independently or in combination to suit your requirements.


1 Answers

If you're using a Mac (or other *nix system), simply copy-paste this to terminal to upload a file via SSH

scp -i MyKeyFile.pem FileToUpload.pdf [email protected]:FileToUpload.pdf 

replace "ec2-123-123-123-123.compute-1.amazonaws.com" with your instance's public DNS name

like image 120
Serge Shultz Avatar answered Sep 19 '22 21:09

Serge Shultz