Differences between Amazon S3 and EC2?

S3

  • It is a storage service where it can store any amount of data.
  • It consists of a REST interface and uses secure HMAC-SHA1 authentication keys.

EC2

  • It is a web service used for hosting an application.
  • It is a virtual machine which can run either Linux or Windows and can also run the applications such as PHP, Python, Apache or other databases.