Create Lambda Stack
    • Dark
      Light

    Create Lambda Stack

    • Dark
      Light

    Article summary

    There are two ways to create a Lambda Stack:

    • Using existing VPC on AWS account.

    • Campaign Manager creates a new VPC on AWS account.

    Prerequisites

    The following resources must be available to execute the terraform scripts:

    • VPC to deploy lambda functions with internet access.

    • Private Subnet to deploy lambda functions.

    • Public Subnet for connecting application Endpoint.

    • Lambda Endpoint to invoke lambda from another lambda with in VPC only for tethered deployment.

    • S3 bucket Endpoint to invoke S3 bucket from lambda with in VPC only for tethered deployment.

    • Secret Manager Endpoint to invoke Secret Manager from lambda.

    • Amazon Connect Call Recording S3 bucket which is used for storing  Amazon Connect call recording only for tethered deployment.

    • Kinesis Streams for Customer  Amazon Connect Agent, CTR, video streams only for tethered deployment.

    • Security Group to connect application Endpoint from lambda functions.

    Create Lambda Stack Using Customer Existing VPC

    Lambda Stack Creation

    To download the terraform scripts, click here.

    Inputs to Terraform Scripts

    Open the terraforminput.tfvars to enter the input variables and enter the following details:

    Variable Name

    Description

    StackName

    AWS Stack name

    VPC_CIDR

    This is the CIDR for your Virtual Private Cloud (VPC) on AWS.

    Private_SubnetA_CIDR

    The private subnet CIDR for the primary availability zone.

    Private_SubnetB_CIDR

    The private subnet CIDR for the secondary availability zone.

    SecurityGroupID

    The security group ID that has to be attached to the lambda functions.

    Amazon Connect_InstanceARN

    Amazon Connect ARN used for the Campaign Manager  application.

    CFDomainName

    This is the CF domain name that Campaign Manager  has shared with you.

    AcqueonEC2RoleARN

    This is the EC2 Role ARN of Campaign Manager .

    Call_Recording_S3bucket_ARN

    This is the Amazon Connect S3 bucket ARN where the call recordings are stored. This is required for the Lambda execution policy.

    KinesisAgentStreamARN

    The existing Agent Kinesis Data Streams.

    Note:

    Users must configure separate enhanced fan-out feature and include the required permissions for this feature.

    KinesisCTRStreamARN

    The existing CTR Kinesis Data Streams.

    KinesisVideoStreamARN

    Enter the existing Video Kinesis Data Streams.

    IsTethered

    If this is a tethered model, enter true; if non-tethered model, enter false.

    AWS Resources Created by Stack

    The following is a list of AWS resources created by the stack:

    Resource Name

    Number of resources

    Description

    IAM Role

    2

    Lambda Execution Role and  Amazon Connect Role.

    Secret Manager

    1

    To store credentials for invoking Campaign Manager  APIs

    Lambda Functions

    6

    • AECAgentStream Lambda - This lambda helps Campaign Manager  to update the current agent state in Amazon Connect. The lambda subscribes to the Agent State Kinesis Stream and sends the agent state through API requests.

    • AECTetheredAgentStateUpdate - This lambda helps move the routable state if Agent State to Initiate Tethered Call is configured in the Campaign Manager  Dialer configuration.

    • AECCTRStream Lambda - This lambda helps in updating the telephonic outcome for Progressive IVR calls. The lambda subscribes to the CTR Kinesis Stream and sends the CTR details through the API Request. This lambda initiates the S3RecordingSplitter.

    • Get Customer Data - This lambda helps route the tethered call to the agent and retrieves the IVR Contact Flow details for the Progressive IVR (Native Amazon).

    • S3RecordingSplitter - This lambda helps slice the Tethered Agent call recording file into separate recordings for the agent-handled customer calls.

    • KVSCPA Lambda - This lambda helps to detect the CPA.

    Note:

    If you are using non-tethered model, only AECAgentStream and AECCTRStream Lambdas are created from the scripts.

    Lambda Permissions

    2

    Lambda Permissions to invoke Lambda functions.

    Lambda Event source Mapping

    2

    Agent Stream Lambda must be mapped to the Agent Kinesis and CTR Stream Lambda must be mapped to the CTR Stream.

    Create Lambda Stack Using Campaign Manager  New VPC

    To download the Campaign Manager  terraform scripts, click here.

    Inputs to Terraform Scripts

    Variable Name

    Description

    StackName

    AWS Stack name.

    VPC_CIDR

    This is the CIDR for your Virtual Private Cloud (VPC) on AWS.

    Private_SubnetA_CIDR

    Private subnet CIDR for the primary availability zone.

    Private_SubnetB_CIDR

    Private subnet CIDR for the secondary availability zone.

    Public_SubnetA_CIDR

    Public subnet CIDR for the primary availability zone.

    Public_SubnetB_CIDR

    Public subnet CIDR for the secondary availability zone.

    Amazon Connect_InstanceARN

    Amazon Connect ARN used for the Campaign Manager  application.

    Acqueon_Endpoint

    This is the CF domain name that Campaign Manager  has shared with you.

    AcqueonEC2RoleARN

    This is the EC2 role ARN of Campaign Manager.

    Call_Recording_S3bucket_ARN

    This is the  Amazon Connect  S3 bucket ARN where the call recordings are stored. This is required for the Lambda execution policy.

    KinesisAgentStreamARN

    The existing Agent Kinesis Data Streams.

    KinesisCTRStreamARN

    The existing CTR Kinesis Data Streams.

    KinesisVideoStreamARN

    Enter the existing Video Kinesis Data Streams.

    IsTethered

    If this is a tethered model, enter true; if non-tethered model, enter false.

    AWS Resources Created by Stack

    The following is a list of AWS resources created by the stack:

    Resource Name

    Number of resources

    Description

    VPC

    1

    VPC to deploy Lambda functions.

    Subnet

    4

    Public and private subnets.

    Route table Association

    3

    Route table association with private and public subnet.

    NAT

    2

    NAT Gateway in Public subnet.

    Security Group

    1

    Security group to map with lambda functions.

    VPC Endpoint

    3

    Secret Manager, Lambda and S3 Endpoints.

    IAM Role

    2

    Lambda Execution Role and Amazon Connect Role.

    Lambda Functions

    6

    • AECAgentStream Lambda - This lambda helps Campaign Manager  to update the current agent state in Amazon Connect. The lambda subscribes to the Agent State Kinesis Stream and sends the agent state through API requests.

    • AECTetheredAgentStateUpdate - This lambda helps move the routable state if "Agent State to Initiate Tethered Call" is configured in the Campaign Manager  Dialer configuration.

    • AECCTRStream Lambda - This lambda helps in updating the telephonic outcome for Progressive IVR calls. The lambda subscribes to the CTR Kinesis Stream and sends the CTR details through the API Request. This lambda initiates the S3RecordingSplitter.

    • Get Customer Data - This lambda helps route the tethered call to the agent and retrieves the IVR contact flow details for the Progressive IVR (Native Amazon).

    • S3RecordingSplitter - This lambda helps slice the Tethered Agent call recording file into separate recordings for the agent-handled customer calls.

    • KVSCPA Lambda - This lambda helps to detect the CPA.

    Note:

    If you are using non-tethered model, only AECAgentStream and AECCTRStream Lambdas are created from the scripts.

    Lambda Permissions

    2

    Lambda Permissions to invoke Lambda functions.

    Lambda Event source Mapping

    2

    Agent Stream Lambda should be mapped to the Agent Kinesis and CTR Stream Lambda should be mapped to the CTR Stream.

    Secret Manager

    1

    To store credentials for invoking APIs.

    Getting Secret Manager Password

    Perform the following steps to get the Secret Manager Password for Amazon Connect instance:

    1. Go to Secret Manager > Secrets > Select secret > SecretForLambda which is created by VPC stack.

    2. Enter the AEC_PASSWORD value to Campaign Manager for adding in Database.


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence