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


I know in amazon's documentation it says S3 is not really made for server side scripting but to rather use EC2 instead. I don't need and will not use a operating system that EC2 provides to handle my server calls, it just seems pricey and seems to be an overkill. Basically, I have a couple php files that handle writing data to a RDS database and uploading videos to S3. Is it wrong for me to have my php files in S3 and allow static web hosting so that my iphone api can call the php scripts?


<em>Static web hosting</em> means just that... no server-side script execution.

You cannot run PHP scripts on S3.


You can host a <strong>static website</strong> on Amazon S3. On a static website, individual web pages include static content. They may also contain client-side scripts. <strong>By contrast</strong>, a dynamic website relies on server-side processing, including server-side scripts such as PHP, JSP, or ASP.NET. Amazon S3 does not support server-side scripting.


<a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html" rel="nofollow">http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html</a>

Check out the EC2 <a href="http://aws.amazon.com/ec2/pricing/" rel="nofollow">free tier</a>.


S3 has no way of actually executing your PHP files. It is just file storage that just happens to also be able to also serve up files in response to basic HTTP requests. But it can only serve up static content in this manner.

There is however nothing that says you need to use EC2 for your web application. You can use whatever you want for that, though you will likely see bandwidth cost penalties around S3 that you may be able to avoid using EC2.


  • ASP.NET - Get website's URL without HttpContext.Current (running in background thread)
  • Cloudflare and Firebase
  • “Movie Format Not Supported” on iPhone with YouTube player in a WebView
  • File upload php, get only file name
  • Shortest route between multiple points in mapkit for iphone app
  • GData Youtube : obtaining thumbnails
  • how to create a downloadable csv file in appengine
  • Youtube upload API and cordova / phonegap
  • Unable to hide youtube iframes in safari?
  • Laravel Impossible to Create Root Directory
  • Why does Sencha 2 only work in Webkit browsers?
  • retrieving data from url in iphone
  • Upload file that is in the cpan database
  • Access user's phone number on iOS 7
  • custom UITableViewCell with image for highlighting
  • How to attach a node.js readable stream to a Sendgrid email?
  • Meteor: Do Something On Email Verification Confirmation
  • Reading JSON from a file using C++ REST SDK (Casablanca)
  • Exchange data b/w iOS devices using Bluetooth 4.0
  • FB SDK and cURL: Unknown SSL protocol error in connection to graph.facebook.com:443
  • swift auto completion not working in Xcode6-Beta
  • How to extract text from Word files using C#?
  • How to check if every primary key value is being referenced as foreign key in another table
  • Sending data from AppleScript to FileMaker records
  • Where to put my custom functions in Wordpress?
  • sending/ receiving email in Java
  • Hazelcast - OperationTimeoutException
  • RestKit - RKRequestDelegate does not exist
  • Is there a mandatory requirement to switch app.yaml?
  • How to delete a row from a dynamic generate table using jquery?
  • Revoking OAuth Access Token Results in 404 Not Found
  • WPF Applying a trigger on binding failure
  • Proper way to use connect-multiparty with express.js?
  • Change div Background jquery
  • How does Linux kernel interrupt the application?
  • Checking variable from a different class in C#
  • Busy indicator not showing up in wpf window [duplicate]
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • UserPrincipal.Current returns apppool on IIS
  • Why do underscore prefixed variables exist?