Skip to content

Commit

Permalink
Merge pull request #142 from mdelillo/download-tags
Browse files Browse the repository at this point in the history
Optionally download tags when getting object
  • Loading branch information
xtremerui authored Jun 30, 2020
2 parents 2fa25b2 + 0405fcd commit 1c60008
Show file tree
Hide file tree
Showing 7 changed files with 743 additions and 183 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,16 @@ Places the following files in the destination:

* `version`: The version identified in the file name.

* `tags.json`: The object's tags represented as a JSON object. Only written if `download_tags` is set to true.

#### Parameters

* `skip_download`: *Optional.* Skip downloading object from S3. Same parameter as source configuration but used to define/override by get. Value need to be a true/false string.
* `skip_download`: *Optional.* Skip downloading object from S3. Same parameter as source configuration but used to define/override by get. Value needs to be a true/false string.

* `unpack`: *Optional.* If true and the file is an archive (tar, gzipped tar, other gzipped file, or zip), unpack the file. Gzipped tarballs will be both ungzipped and untarred. It is ignored when `get` is running on the initial version.

* `download_tags`: *Optional.* Write object tags to `tags.json`. Value needs to be a true/false string.

### `out`: Upload an object to the bucket.

Given a file specified by `file`, upload it to the S3 bucket. If `regexp` is
Expand Down Expand Up @@ -184,6 +188,7 @@ The objects in the bucket (e.g. `"arn:aws:s3:::your-bucket/*"`):
* `s3:PutObject`
* `s3:PutObjectAcl`
* `s3:GetObject`
* `s3:GetObjectTagging` (if using the `download_tags` option)

### Versioned Buckets

Expand All @@ -196,6 +201,7 @@ The bucket itself (e.g. `"arn:aws:s3:::your-bucket"`):
The objects in the bucket (e.g. `"arn:aws:s3:::your-bucket/*"`):
* `s3:GetObjectVersion`
* `s3:PutObjectVersionAcl`
* `s3:GetObjectVersionTagging` (if using the `download_tags` option)

## Developing on this resource

Expand Down Expand Up @@ -252,6 +258,10 @@ docker build . -t s3-resource -f dockerfiles/ubuntu/Dockerfile \
--build-arg S3_ENDPOINT="https://s3.amazonaws.com"
```

##### Required IAM permissions

In addition to the required permissions above, the `s3:PutObjectTagging` permission is required to run integration tests.

### Contributing

Please make all pull requests to the `master` branch and ensure tests pass
Expand Down
Loading

0 comments on commit 1c60008

Please sign in to comment.