Last active
August 29, 2015 14:08
-
-
Save rmmeans/30e5334d54149baa61ee to your computer and use it in GitHub Desktop.
TypeSafe Config AWS Credentials provider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.amazonaws.auth.{AWSCredentials, AWSCredentialsProvider} | |
import com.typesafe.config.Config | |
class TypeSafeConfigAWSCredentialsProvider(config: Config) extends AWSCredentialsProvider { | |
override def getCredentials: AWSCredentials = { | |
new AWSCredentials { | |
override def getAWSAccessKeyId: String = config.getString("aws.accessKey") | |
override def getAWSSecretKey: String = config.getString("aws.secretKey") | |
} | |
} | |
override def refresh(): Unit = () //nothing to do here. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment