title: Amazon S3 - 405 Method Not allowed using POST (Although I allowed POST on the bucket)
body: <p>I am facing a problem that my graph (Using AJAX - POST - PHP) is not appearing on Amazon </p>
  
  <p><a href="http://cdpmotest.s3-website.eu-central-1.amazonaws.com/" rel="noreferrer">http://cdpmotest.s3-website.eu-central-1.amazonaws.com/</a></p>
  
  <p>its says (Wrong Method 405 Error)</p>
  
  <p>This is my CORS Config :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"&gt;
  &lt;CORSRule&gt;
  &lt;AllowedOrigin&gt;*&lt;/AllowedOrigin&gt;
  &lt;AllowedMethod&gt;HEAD&lt;/AllowedMethod&gt;
  &lt;AllowedMethod&gt;GET&lt;/AllowedMethod&gt;
  &lt;AllowedMethod&gt;POST&lt;/AllowedMethod&gt;
  &lt;AllowedMethod&gt;DELETE&lt;/AllowedMethod&gt;
  &lt;AllowedMethod&gt;PUT&lt;/AllowedMethod&gt;
  &lt;MaxAgeSeconds&gt;3000&lt;/MaxAgeSeconds&gt;
  &lt;AllowedHeader&gt;*&lt;/AllowedHeader&gt;
  &lt;/CORSRule&gt;
  &lt;/CORSConfiguration&gt;
  </code></pre>
  
  <p>And this is my Script:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
       var randomScalingFactor = function(){ return Math.round(Math.random()*100)};
       $.ajax({
           url: 'graph-data.php',
           type: 'POST',
           dataType: 'json',
           success: function(data) {
                var array1 = data.map(function(item) {
                    return parseInt(item[1], 10);
                });
                var array2 = data.map(function(item) {
                    return parseInt(item[2], 10);
                });
  
                createGraph(array1, array2);
           }
       });//end AJAX request
  
  function createGraph(array1, array2) {
       var ctx = document.getElementById("chart-area1").getContext("2d");
       var barChartData = {
       labels : ["Land Acquisition","Design Concept","Permits and  Licensing","Tendering","Elec.+Water Requests","Construction Start","Construction Finish","Site Handover"],
       datasets : [
       {
            fillColor : "rgba(0,154,166,0.5)",
            strokeColor : "rgba(0,154,166,0.8)",
            highlightFill: "rgba(0,154,166,0.75)",
            highlightStroke: "rgba(0,154,166,1)",
            data : array1
       },
       {
            fillColor : "rgba(77,79,83,0.5)",
            strokeColor : "rgba(77,79,83,0.8)",
            highlightFill : "rgba(77,79,83,0.75)",
            highlightStroke : "rgba(77,79,83,1)",
            data : array2
      }
      ]
      }//end bar chart data
  
      window.myBar = new Chart(ctx).Bar(barChartData, {
          responsive : true
      });
      }//end createGraph
      });
      &lt;/script&gt;
  </code></pre>
  
  <p>Its working fine on localhost (WAMPServer)</p>
  
  <p>Can you help me please?</p>