getNextInvocation method
Get the next invocation from the AWS Lambda Runtime Interface (see https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html).
Implementation
Future<NextInvocation> getNextInvocation() async {
final response = await _client.get(Uri.parse(
'http://$runtimeApi/$runtimeApiVersion/runtime/invocation/next'));
return NextInvocation.fromResponse(response);
}