Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
James McClain authored and echeipesh committed Oct 11, 2017
1 parent 202a98f commit 3873503
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/guide/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,28 @@ that does that could look like this:
ContextRDD(layer.tileToLayout[SpatialKey](meta._2), meta._2)
}
Work with S3 using a custom S3Client configuration
==================================================

**Motivation:** You would like to work with assets on S3, but you want
to use an S3 client (or clients) with a configuration (various
configurations) different form the default client configuration.

That can be accomplished by sub-classing ``S3AttributeStore`` and/or
``S3ValueReader``, perhaps anonymously.

.. code:: scala
import geotrellis.spark.io.s3._
import com.amazonaws.services.s3.{AmazonS3Client=>AWSAmazonS3Client}
val aws: AWSAmazonS3Client = ???
val specialS3client = new AmazonS3Client(aws)
val attributeStore = new S3AttributeStore("my-bucket", "my-prefix") {
override def s3Client = specialS3Client
}
val valueReader = new S3ValueReader(attributeStore) {
override def s3Client = specialS3Client
}

0 comments on commit 3873503

Please sign in to comment.