Skip to content
This repository has been archived by the owner on Feb 12, 2020. It is now read-only.

Rhinofly/play-aws-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[this project is no longer maintained]

It has been integrated into Play S3

Amazon Web Services utils

This project contains utilities that are used in multiple Amazon services.

The Aws object

This object is mainly used to wrap Play's WS component and add signing to it. Usage is like this:

Aws
  .withSigner(...)
  .url(...)

  ...

The Signer
-----------

The current version supplies Aws version 4 signer.

AwsCredentials
--------------

The `AwsCredentials` object contains `apply` and `unapply` methods. Some usage examples:

``` scala
val c = AwsCredentials("key", "secret")

val AwsCredentials(key, secret) = c

The AwsCredentials object allows you to create an instance using information in the configuration:

# In the configuration
aws.accessKeyId=testKey
aws.secretKey=testSecret

//In Scala
val c = AwsCredentials.fromConfiguration

The AwsCredentials object also contains an implicit configuration (internally uses the fromConfiguration object.

def myMethod(arg1:Int)(implicit credentials:AwsCredentials) = {
  //...
}

Installation

  val appDependencies = Seq(
    "nl.rhinofly" %% "play-aws-utils" % "4.1.0"
  )

  val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
    resolvers += "Rhinofly Internal Release Repository" at "http://maven-repository.rhinofly.net:8081/artifactory/libs-release-local"
  )

Testing

In order to have the tests succeed you need to have a test/conf/application.conf file (note, it's in the test directory) containing:

aws.accessKeyId=testKey
aws.secretKey=testSecret

About

[✓] Amazon AWS utilities for Play based libraries

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages