Slide 15
Slide 15 text
package io.github.hkusu.githubrepositoryreport
import com.amazonaws.services.lambda.runtime.Context
import com.amazonaws.services.lambda.runtime.RequestHandler
class Handler : RequestHandler {
override fun handleRequest(input: Input, context: Context): Output {
// do something ...
return Output(statusCode = 200, body = "OK")
}
}
// API Gateway ͷ Lambda ϓϩΩγ౷߹ͷ߹
data class Input(var body: String? = null) // varͰσϑΥϧτ͕ඞཁ
data class Output(val statusCode: Int, val body: String)