1. Packages
  2. AWS
  3. API Docs
  4. connect
  5. LambdaFunctionAssociation
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.connect.LambdaFunctionAssociation

Explore with Pulumi AI

Provides an Amazon Connect Lambda Function Association. For more information see Amazon Connect: Getting Started and Invoke AWS Lambda functions.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.connect.LambdaFunctionAssociation("example", {
    functionArn: exampleAwsLambdaFunction.arn,
    instanceId: exampleAwsConnectInstance.id,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.connect.LambdaFunctionAssociation("example",
    function_arn=example_aws_lambda_function["arn"],
    instance_id=example_aws_connect_instance["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := connect.NewLambdaFunctionAssociation(ctx, "example", &connect.LambdaFunctionAssociationArgs{
			FunctionArn: pulumi.Any(exampleAwsLambdaFunction.Arn),
			InstanceId:  pulumi.Any(exampleAwsConnectInstance.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Connect.LambdaFunctionAssociation("example", new()
    {
        FunctionArn = exampleAwsLambdaFunction.Arn,
        InstanceId = exampleAwsConnectInstance.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.LambdaFunctionAssociation;
import com.pulumi.aws.connect.LambdaFunctionAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new LambdaFunctionAssociation("example", LambdaFunctionAssociationArgs.builder()
            .functionArn(exampleAwsLambdaFunction.arn())
            .instanceId(exampleAwsConnectInstance.id())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:connect:LambdaFunctionAssociation
    properties:
      functionArn: ${exampleAwsLambdaFunction.arn}
      instanceId: ${exampleAwsConnectInstance.id}
Copy

Create LambdaFunctionAssociation Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new LambdaFunctionAssociation(name: string, args: LambdaFunctionAssociationArgs, opts?: CustomResourceOptions);
@overload
def LambdaFunctionAssociation(resource_name: str,
                              args: LambdaFunctionAssociationArgs,
                              opts: Optional[ResourceOptions] = None)

@overload
def LambdaFunctionAssociation(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              function_arn: Optional[str] = None,
                              instance_id: Optional[str] = None)
func NewLambdaFunctionAssociation(ctx *Context, name string, args LambdaFunctionAssociationArgs, opts ...ResourceOption) (*LambdaFunctionAssociation, error)
public LambdaFunctionAssociation(string name, LambdaFunctionAssociationArgs args, CustomResourceOptions? opts = null)
public LambdaFunctionAssociation(String name, LambdaFunctionAssociationArgs args)
public LambdaFunctionAssociation(String name, LambdaFunctionAssociationArgs args, CustomResourceOptions options)
type: aws:connect:LambdaFunctionAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. LambdaFunctionAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. LambdaFunctionAssociationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. LambdaFunctionAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LambdaFunctionAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LambdaFunctionAssociationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var lambdaFunctionAssociationResource = new Aws.Connect.LambdaFunctionAssociation("lambdaFunctionAssociationResource", new()
{
    FunctionArn = "string",
    InstanceId = "string",
});
Copy
example, err := connect.NewLambdaFunctionAssociation(ctx, "lambdaFunctionAssociationResource", &connect.LambdaFunctionAssociationArgs{
	FunctionArn: pulumi.String("string"),
	InstanceId:  pulumi.String("string"),
})
Copy
var lambdaFunctionAssociationResource = new LambdaFunctionAssociation("lambdaFunctionAssociationResource", LambdaFunctionAssociationArgs.builder()
    .functionArn("string")
    .instanceId("string")
    .build());
Copy
lambda_function_association_resource = aws.connect.LambdaFunctionAssociation("lambdaFunctionAssociationResource",
    function_arn="string",
    instance_id="string")
Copy
const lambdaFunctionAssociationResource = new aws.connect.LambdaFunctionAssociation("lambdaFunctionAssociationResource", {
    functionArn: "string",
    instanceId: "string",
});
Copy
type: aws:connect:LambdaFunctionAssociation
properties:
    functionArn: string
    instanceId: string
Copy

LambdaFunctionAssociation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LambdaFunctionAssociation resource accepts the following input properties:

FunctionArn
This property is required.
Changes to this property will trigger replacement.
string
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
FunctionArn
This property is required.
Changes to this property will trigger replacement.
string
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
functionArn
This property is required.
Changes to this property will trigger replacement.
String
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
functionArn
This property is required.
Changes to this property will trigger replacement.
string
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
function_arn
This property is required.
Changes to this property will trigger replacement.
str
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
functionArn
This property is required.
Changes to this property will trigger replacement.
String
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

Outputs

All input properties are implicitly available as output properties. Additionally, the LambdaFunctionAssociation resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing LambdaFunctionAssociation Resource

Get an existing LambdaFunctionAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LambdaFunctionAssociationState, opts?: CustomResourceOptions): LambdaFunctionAssociation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        function_arn: Optional[str] = None,
        instance_id: Optional[str] = None) -> LambdaFunctionAssociation
func GetLambdaFunctionAssociation(ctx *Context, name string, id IDInput, state *LambdaFunctionAssociationState, opts ...ResourceOption) (*LambdaFunctionAssociation, error)
public static LambdaFunctionAssociation Get(string name, Input<string> id, LambdaFunctionAssociationState? state, CustomResourceOptions? opts = null)
public static LambdaFunctionAssociation get(String name, Output<String> id, LambdaFunctionAssociationState state, CustomResourceOptions options)
resources:  _:    type: aws:connect:LambdaFunctionAssociation    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
FunctionArn Changes to this property will trigger replacement. string
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
InstanceId Changes to this property will trigger replacement. string
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
FunctionArn Changes to this property will trigger replacement. string
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
InstanceId Changes to this property will trigger replacement. string
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
functionArn Changes to this property will trigger replacement. String
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
instanceId Changes to this property will trigger replacement. String
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
functionArn Changes to this property will trigger replacement. string
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
instanceId Changes to this property will trigger replacement. string
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
function_arn Changes to this property will trigger replacement. str
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
instance_id Changes to this property will trigger replacement. str
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
functionArn Changes to this property will trigger replacement. String
Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias qualifier.
instanceId Changes to this property will trigger replacement. String
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

Import

Using pulumi import, import aws_connect_lambda_function_association using the instance_id and function_arn separated by a comma (,). For example:

$ pulumi import aws:connect/lambdaFunctionAssociation:LambdaFunctionAssociation example aaaaaaaa-bbbb-cccc-dddd-111111111111,arn:aws:lambda:us-west-2:123456789123:function:example
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

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