4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS Lambda+Scala+POJO

Posted at

LambdaではPOJOで入出力値の型を定義できるが、Scalaではどうやるかわからなかったので調べら、まさに出てきた。

import com.amazonaws.services.lambda.runtime.{Context, RequestHandler}

class Handler extends RequestHandler[Request,Response]{
  override def handleRequest(input: Request, context: Context): Response = {
    return new Response("hello there: " + input.messageID )
  }
}
import scala.beans.BeanProperty

case class Request(@BeanProperty var messageID: String){

    def this() = this(messageID = "")

}
import scala.beans.BeanProperty

case class Response(@BeanProperty var details: String){

    def this() = this(details = "")

}
4
5
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
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?