Scala client for Amazon Kinesis
Add a following dependency into your build.sbt
at first.
libraryDependencies += "jp.co.bizreach" %% "aws-kinesis-scala" % "0.0.1"
Then you can access Kinesis as following:
import jp.co.bizreach.kinesis._
import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider
val credentialsProvider = new ClasspathPropertiesFileCredentialsProvider()
val kinesisClient = AmazonKinesisClient(credentialsProvider)
val putRecordRequest = new PutRecordRequest(
streamName = "streamName",
partitionKey = "partitionKey",
data = "data".getBytes("UTF-8")
)
kinesisClient.putRecord(putRecordRequest)