Copying files from S3 buckets in Ansible

ansible

Solution

There is s3 for this task:

Excerpt from examples:

# Simple GET operation
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get

But this requires `boto` and AWS credentials on target host.

You may want to make download url with `mode=geturl` with local action and then fetch it on your target box.

Problem

I was wondering whether the copy module can be used to deploy my installation tarball from an AWS S3 bucket to an EC2 instance?

Original source