1. Packages
  2. AWS Classic
  3. API Docs
  4. lambda
  5. getInvocation

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.lambda.getInvocation

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

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

    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.)

    Using getInvocation

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getInvocation(args: GetInvocationArgs, opts?: InvokeOptions): Promise<GetInvocationResult>
    function getInvocationOutput(args: GetInvocationOutputArgs, opts?: InvokeOptions): Output<GetInvocationResult>
    def get_invocation(function_name: Optional[str] = None,
                       input: Optional[str] = None,
                       qualifier: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetInvocationResult
    def get_invocation_output(function_name: Optional[pulumi.Input[str]] = None,
                       input: Optional[pulumi.Input[str]] = None,
                       qualifier: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetInvocationResult]
    func LookupInvocation(ctx *Context, args *LookupInvocationArgs, opts ...InvokeOption) (*LookupInvocationResult, error)
    func LookupInvocationOutput(ctx *Context, args *LookupInvocationOutputArgs, opts ...InvokeOption) LookupInvocationResultOutput

    > Note: This function is named LookupInvocation in the Go SDK.

    public static class GetInvocation 
    {
        public static Task<GetInvocationResult> InvokeAsync(GetInvocationArgs args, InvokeOptions? opts = null)
        public static Output<GetInvocationResult> Invoke(GetInvocationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInvocationResult> getInvocation(GetInvocationArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:lambda/getInvocation:getInvocation
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FunctionName string
    Name of the lambda function.
    Input string
    String in JSON format that is passed as payload to the lambda function.
    Qualifier string
    Qualifier (a.k.a version) of the lambda function. Defaults to $LATEST.
    FunctionName string
    Name of the lambda function.
    Input string
    String in JSON format that is passed as payload to the lambda function.
    Qualifier string
    Qualifier (a.k.a version) of the lambda function. Defaults to $LATEST.
    functionName String
    Name of the lambda function.
    input String
    String in JSON format that is passed as payload to the lambda function.
    qualifier String
    Qualifier (a.k.a version) of the lambda function. Defaults to $LATEST.
    functionName string
    Name of the lambda function.
    input string
    String in JSON format that is passed as payload to the lambda function.
    qualifier string
    Qualifier (a.k.a version) of the lambda function. Defaults to $LATEST.
    function_name str
    Name of the lambda function.
    input str
    String in JSON format that is passed as payload to the lambda function.
    qualifier str
    Qualifier (a.k.a version) of the lambda function. Defaults to $LATEST.
    functionName String
    Name of the lambda function.
    input String
    String in JSON format that is passed as payload to the lambda function.
    qualifier String
    Qualifier (a.k.a version) of the lambda function. Defaults to $LATEST.

    getInvocation Result

    The following output properties are available:

    FunctionName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Input string
    Result string
    String result of the lambda function invocation.
    Qualifier string
    FunctionName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Input string
    Result string
    String result of the lambda function invocation.
    Qualifier string
    functionName String
    id String
    The provider-assigned unique ID for this managed resource.
    input String
    result String
    String result of the lambda function invocation.
    qualifier String
    functionName string
    id string
    The provider-assigned unique ID for this managed resource.
    input string
    result string
    String result of the lambda function invocation.
    qualifier string
    function_name str
    id str
    The provider-assigned unique ID for this managed resource.
    input str
    result str
    String result of the lambda function invocation.
    qualifier str
    functionName String
    id String
    The provider-assigned unique ID for this managed resource.
    input String
    result String
    String result of the lambda function invocation.
    qualifier String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi