title: Amazon S3 - Bucket Policies for POST Request?
body: <p>I'm using the Ionic Framework and would like to upload a file to an S3 bucket using the Cordova File Transfer Plugin. All examples are utilizing a POST method...</p>
  
  <p><a href="https://forum.ionicframework.com/t/cordova-filetransfer-upload-image-to-aws-s3/20051/2" rel="nofollow">https://forum.ionicframework.com/t/cordova-filetransfer-upload-image-to-aws-s3/20051/2</a>
  <a href="http://coenraets.org/blog/2013/09/how-to-upload-pictures-from-a-phonegap-app-to-amazon-s3/" rel="nofollow">http://coenraets.org/blog/2013/09/how-to-upload-pictures-from-a-phonegap-app-to-amazon-s3/</a></p>
  
  <ol>
  <li>I noticed that Amazon S3 only has PUT and GET object permissions for the bucket policies which can be applied directly into the bucket as per below:
  <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html" rel="nofollow">http://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html</a></li>
  </ol>
  
  <p>The examples in the above link can be found through the Amazon S3 policy generator's dropdown located in the console; From that dropdown, I noticed there was no equivalent "action" (action as defined in Bucket Policy context) for PostObject.</p>
  
  <p>Is there something I'm missing here? Wouldn't I need to create a <em>bucket policy</em> which allows for POST methods <strong>AND/OR</strong> create a user policy which allows for this.</p>
  
  <ol start="2">
  <li>I could also use some clarity on the AND/OR part seen above; As in, being a noob programmer, I was going to apply it both to the bucket and user policy to be extra safe.</li>
  <li>I understand there is a POST policy sent with a POST request (as per link <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-authentication-HTTPPOST.html" rel="nofollow">http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-authentication-HTTPPOST.html</a>). This appears to be different than the Bucket Policies for GET, and PUT as the policy is sent with the request, different than being simply defined in the bucket policy section. The policy sent in the POST (as per link) also has a different format than the bucket policies. Hence the confusion.</li>
  </ol>
  
  <p>I haven't tried sending a POST request yet, but I figure that's a task for another day. If someone could help clear this up that'd be great! </p>