invokeAsync method
Submits an invocation request to AWS Lambda. Upon receiving the request, Lambda executes the specified function asynchronously. To see the logs generated by the Lambda function execution, see the CloudWatch logs console.
This operation requires permission for the lambda:InvokeAsync
action.
May throw ServiceException. May throw ResourceNotFoundException. May throw InvalidRequestContentException.
Parameter functionName
:
The Lambda function name.
Parameter invokeArgs
:
JSON that you want to provide to your Lambda function as input.
Implementation
Future<InvokeAsyncResponse> invokeAsync({
required String functionName,
required Uint8List invokeArgs,
}) async {
ArgumentError.checkNotNull(functionName, 'functionName');
_s.validateStringLength(
'functionName',
functionName,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(invokeArgs, 'invokeArgs');
final response = await _protocol.send(
payload: invokeArgs,
method: 'POST',
requestUri:
'/2014-11-13/functions/${Uri.encodeComponent(functionName)}/invoke-async/',
exceptionFnMap: _exceptionFns,
);
return InvokeAsyncResponse.fromJson(response);
}