invokeAsync
inline suspend fun LambdaClient.invokeAsync(crossinline block: InvokeAsyncRequest.Builder.() -> Unit): InvokeAsyncResponse
Deprecated
No longer recommended for use. See AWS API documentation for more details.
For asynchronous function invocation, use Invoke.
Invokes a function asynchronously.
If you do use the InvokeAsync action, note that it doesn't support the use of X-Ray active tracing. Trace ID is not propagated to the function, even if X-Ray active tracing is turned on.
Samples
import aws.smithy.kotlin.runtime.content.ByteStream
fun main() {
//sampleStart
// The following example invokes a Lambda function asynchronously
val resp = lambdaClient.invokeAsync {
functionName = "my-function"
invokeArgs = ByteStream.fromString("{}")
}
//sampleEnd
}