C.63 S3GetTask
Prev | Appendix C. Optional tasks | Next

## C.63 S3GetTask

Downloads an object from Amazon S3. This task requires the PEAR package Services_Amazon_S3

Table C.89: 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

### C.63.1 Example

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}" />

Prev | Up | Next
C.62 S3PutTask | Home | C.64 ScpTask