Skip to content

Instantly share code, notes, and snippets.

@MarounMaroun
Last active July 13, 2016 15:52
Show Gist options
  • Select an option

  • Save MarounMaroun/97601480b3fe3a21076602224974dad3 to your computer and use it in GitHub Desktop.

Select an option

Save MarounMaroun/97601480b3fe3a21076602224974dad3 to your computer and use it in GitHub Desktop.
def fromS3(bucket: String, path: String): MyObject = {
val AWSCredentials = new BasicAWSCredentials(ACCESS_KEY, SECRET_KEY)
val amazonS3Client = new AmazonS3Client(AWSCredentials)
def readFile(fn: String) = {scala.io.Source.fromInputStream(amazonS3Client.getObject(bucket, path + fn).getObjectContent).getLines}.toList
getMyObject(readFile)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment