-3

I wanna host a php file that retrieve data from a mysql DB how ever aws is not authorizing POST method. I need to know how can I add the code in PHP knowing I already configured the Bucket policy and CORS

  • What's the exact problem here? Hosting any PHP file is not related to the ability to accept POST requests, and CORS is once more something completely different – Nico Haase Feb 14 '20 at 16:13
  • so what would be the solution then – Hass Apr 09 '20 at 15:58

2 Answers2

2

You can only serve static content from an S3 - PHP will not be processed.

If you want to set up a dynamic PHP website on AWS have a look at LightSail and its LAMP stack.

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119
0

You should try Amazon API Gateway.

Hass
  • 68
  • 1
  • 10