David Drollinger
David Drollinger

Reputation: 23

Can I use AWS S3 for hosting, and EC2 to process my form submits?

So I am thinking of migrating my website to Amazon S3 since it's super cheap and fast, however, I use PHP and AJAX to submit my contact forms. Would it be possible to host my site using AWS S3 and then send all HTTP POSTs to the EC2 instance?

Upvotes: 1

Views: 86

Answers (2)

Mohtisham Zubair
Mohtisham Zubair

Reputation: 723

It is not possible to host php site on AWS S3 only static content like images, css or js can be put their.

For dynamic content you have to make use of aws instance.

https://forums.aws.amazon.com/message.jspa?messageID=453142

Correct Usage of Amazon Web Services S3 for Server - Side Scripting

Upvotes: 0

Bram
Bram

Reputation: 4532

Yes, this is very well possible. However, if you're running an EC2 instance anyways and your traffic is not enormous, you might as well serve your static files from your EC2 instance.

Upvotes: 2

Related Questions