- DarkLight
Create Lambda Stack
- DarkLight
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.
|
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 |
|
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 |
|
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:
Go to Secret Manager > Secrets > Select secret > SecretForLambda which is created by VPC stack.
Enter the AEC_PASSWORD value to Campaign Manager for adding in Database.