3 ms·
Judging from five minutes of browsing the go runtime sources, they poll some lambda API: https://github.com/aws/aws-lambda-go/blob/159d1c69878562cd5409719d4fc4
by ben0x539 5y ago
Judging from five minutes of browsing the go runtime sources, they poll some lambda API:
https://github.com/aws/aws-lambda-go/blob/159d1c69878562cd5409719d4fc4cfa298e2c4bf/lambda/runtime_api_client.go#L71 https://github.com/aws/aws-lambda-go/blob/159d1c69878562cd54...
The response is apparently posted to another API endpoint.
Googling for the environment variable actually specifying the API endpoint, I found https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom... which seems to spell out some of the details.
Of course that just moves the question to "where does the runtime API get the event from?" but at that point they could be doing all kinds of things, I guess.
Now I'm curious to see what happens if you ask for more events before returning a response for the first event you got. Can you actually process events in parallel?