Use scp to copy files over ssh:
scp -i key-pair-file file-to-upload ec2-user@instance-public-DNS:
Notice the colon at the end!
With plain EC2 instances, you also need to install some sort of Web server software to power your Web service, and open the HTTP port in the firewall.
Just in case you plan to write your Web service in Java, I have put together a series of articles (Part I, Part II, Part III) guiding through the basics of installing Apache Tomcat on an Amazon Linux EC2 instance.
Dmitry Leskov is actually the better one. You should use his approach.
Answer from 2012
You first have to setup a LAMP (Linux, Apache, mySQL, PHP) stack on your EC2 instance to run any kind of web service.
This means you have to go trough the following steps:
- Create an EC2 instance
- Setup EBS Storage for mySQL data
- Install mySQL
- Configure mySQL
- Install Apache
- Configure Apache
- Install PHP
- Configure PHP
If you need a detailed instruction, I’d recommend you to take a look at this: Building EC2 with LAMP.
To transfer files to your EC2 instance you can use any FTP client, which supports SFTP and key pairs (you can also enable
PasswordAuthentication for SSH to login with credentials). I’m using Transmit with no problems.