getInvocation

Use this data source to invoke custom lambda functions as data source. The lambda function is invoked with RequestResponse invocation type.

NOTE: The aws.lambda.Invocation data source invokes the function during the first apply and every subsequent plan when the function is known. NOTE: If you get a KMSAccessDeniedException: Lambda was unable to decrypt the environment variables because KMS access was denied error when invoking an aws.lambda.Function with environment variables, the IAM role associated with the function may have been deleted and recreated after the function was created. You can fix the problem two ways: 1) updating the function's role to another role and then updating it back again to the recreated role, or 2) by using Pulumi to taint the function and apply your configuration again to recreate the function. (When you create a function, Lambda grants permissions on the KMS key to the function's IAM role. If the IAM role is recreated, the grant is no longer valid. Changing the function's role or recreating the function causes Lambda to update the grant.)

Return

A collection of values returned by getInvocation.

Parameters

argument

A collection of arguments for invoking getInvocation.


suspend fun getInvocation(functionName: String, input: String, qualifier: String? = null): GetInvocationResult

Return

A collection of values returned by getInvocation.

Parameters

functionName

Name of the lambda function.

input

String in JSON format that is passed as payload to the lambda function.

qualifier

Qualifier (a.k.a version) of the lambda function. Defaults to $LATEST.

See also


Return

A collection of values returned by getInvocation.

Parameters

argument

Builder for com.pulumi.aws.lambda.kotlin.inputs.GetInvocationPlainArgs.

See also