LoginSignup
0
0

More than 3 years have passed since last update.

Scala で AWS の SECRET_KEY とかじゃない Credential を使う方法

Posted at

com.amazonaws.auth.DefaultAWSCredentialsProviderChain を使うと良いかなと。

import com.amazonaws.auth.{AWSCredentialsProvider, DefaultAWSCredentialsProviderChain}
import com.amazonaws.services.kinesis.clientlibrary.lib.worker.{InitialPositionInStream, KinesisClientLibConfiguration, Worker}

val awsCredentialsProvider: AWSCredentialsProvider = new DefaultAWSCredentialsProviderChain()
val kclConf = new KinesisClientLibConfiguration(appName, streamName, credentialsProvider, workerId)
scalaVersion := "2.11.12"

libraryDependencies ++= Seq(
  "com.amazonaws" % "amazon-kinesis-client" % "1.6.5"
)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0