are you going with the dummy AWS_LAMBDA_RUNTIME_AP...
# sst
t
are you going with the dummy AWS_LAMBDA_RUNTIME_API approach or doing it a different way?
f
After digging into the aws-lambda-go repo a bit more, your idea made a lot more sense. Unlike Node where the Lambda function simply takes an event object and return the response. In Go, polling from AWS_LAMBDA_RUNTIME_API is done in the Lambda function, ie.
Copy code
func main() {
  lambda.Start(Handler)  <-- polling
}
Right now, I got it working with docker, ie.
Copy code
docker run --rm -v /path/to/go/binary:/var/task:ro,delegated lambci/lambda:go1.x main PAYLOAD
So Lambci internally sets up the AWS_LAMBDA_RUNTIME_API and returns the PAYLOAD to the Go function.
I’m planning to go with your design so I can standardize the flow for all runtimes, and also get rid of the need to docker.
t
sweet! Excited about that let me know if you need any help