threejeez
threejeez

Reputation: 2324

Issue Creating Kinesis Stream with Scalazon

I'm following the Scalazon example at here to create a Kinesis stream. The following piece of code:

val streamListFuture = for {
  s <- Kinesis.streams.list
} yield s

gives the following error:

[error] KinesisStatsWriter.scala:51: value map is not a member of object io.github.cloudify.scala.aws.kinesis.Requests.ListStreams
[error]       s <- Kinesis.streams.list

If I don't use a for comprehension and call val createStream = Kinesis.streams.list, there's no error. Can't seem to figure out why.

Similarly, the following bit of code:

val createStream = for {
  s <- Kinesis.streams.create(name)
} yield s

produces a similar error:

[error] KinesisStatsWriter.scala:64: value map is not a member of io.github.cloudify.scala.aws.kinesis.Requests.CreateStream
[error]       s <- Kinesis.streams.create(name)

Appreciate the help!

Upvotes: 0

Views: 202

Answers (1)

Federico
Federico

Reputation: 83

Author here, the for-comprehension works only if you include the module that implicitly converts requests to Futures (it's called ImplicitExecution). Try adding the following import statement (looks at the sample code in the library README).

import io.github.cloudify.scala.aws.kinesis.Client.ImplicitExecution._

Upvotes: 1

Related Questions