Downloads an object from Amazon S3. This task requires the PEAR package Services_Amazon_S3
Table C.92: Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
key | String | Amazon S3 key | n/a | Yes (or defined before task call as: amazon.key) |
secret | String | Amazon S3 secret | n/a | Yes (or defined before task call as: amazon.secret) |
bucket | String | Bucket containing the object | n/a | Yes (or defined before task call as: amazon.bucket) |
object | String | Object name | n/a | Yes |
target | String | Where to store the object after download | n/a | Yes |
Downloading an object
<s3get object="file.txt" target="${project.basedir}" bucket="mybucket" key="AmazonKey" secret="AmazonSecret" />
You can also define "bucket, key, secret" outside of the task call:
<property name="amazon.key" value="my_key" /> <property name="amazon.secret" value="my_secret" /> <property name="amazon.bucket" value="mybucket" /> <s3get object="file.txt" target="${project.basedir}" />