ansible/ansible — pull request #8867 by acaire (2014-09-03 01:55:23+00:00)
Title: Add Headers param to s3 module

Our use case requires that we maintain all of our buckets in our production AWS account, and allow access to our testing AWS account via Cross Account Access: http://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html

To allow the production account full access to objects uploaded by the testing account, we are setting the "x-amz-grant-full-control" header, and this pull request allows us to do so.

As we have an IAM policy to explicitly deny uploads from the testing account that don't set the "x-amz-grant-full-control header" to an expected value, I've also opted to catch the S3ResponseError.