Amazon Connect Integration - Cloudformation (with Firehose)

This is a guide for integrating your Amazon Connect Instance with eMite.

This involves the deployment of several additional components on your AWS Cloud, such as Kinesis streams, firehose and elasticsearch.

For easier deployment of these components - we can make use of a Cloudformation template to create a Cloudformation stack.

This guide assumes all components will be deployed in the same region as the Amazon Connect instance, and also all under the same AWS Account.

Oveview of Stack Components


  • EmiteDomain
    • AWS Elasticsearch Domain that will store data used by eMite such as the Contact Trace Records (CTRs) and Metrics, Observations
  • EmiteAgentEvents
    • AWS Kinesis Stream that gets Agent Events data from Amazon Connect
  • EmiteCtrFirehose
    • AWS Kinesis Firehose that will send CTR data from Amazon Connect to Elasticsearch
  • EmiteCtrFirehoseRole
    • IAM Role that Kinesis Firehose will use
  • EmiteCtrFirehosePolicy
    • IAM Policy with various permissions requird by Kinesis Firehose
  • EmiteRole
    • IAM Role that eMite will use to get data from Kinesis Streams and Amazon Connect.
  • EmiteKinesisPolicy
    • IAM Policy to allow read access to Kinesis Stream
  • EmiteAmazonConnectPolicy
    • IAM Policy to allow read access to AmazonConnect instance
  • EmiteCtrFailedRecordsBucket
    • AWS S3 Bucket that will store any CTR records that Firehose fails to send to Elasticsearch

Deploying the Stack


Load the eMite Cloudformation template on the console

  • On the eMite Onboarding page, under Step 1, click the Cloudformation URL Link
  • This will take you to your cloudformation console on the same region as your amazon connect instance.
    • This also automatically loads the eMite cloudformation template, as well as load some default parameters.

Define Stack Parameters

  • Stack Name
    • Input your preferred stack name
    • E.g. emite-amazonconnect-stack
  • Parameters
    • AgentEventsStreamName
      • Name of the Agent Events Kinesis stream. You can leave this as default
      • Default: connect-agentevents
    • AmazonConnectInstanceARN
      • Open a new console window and go to Amazon Connnect > select your Amazon Connect instance
      • On the overview tab, copy the Instance ARN
    • CtrFirehoseName
      • Name of the Firehose used for sending CTR data from Amazon Connect to Elasticsearch.
      • You can leave this as default
      • Default: connect-ctrfirehose
    • ESDomainName
      • Name of the elasticsearch domain. You can leave this as default
      • Default: emite-kinesis-connect
    • CustomerID
      • Autogenerated Unique Customer ID provided by eMite
      • Please don't change this value
    • EmiteAccountID
      • eMite AWS Account ID
      • Please don't change this value
    • EmiteIP
      • Autogenerated eMite Server IP
      • Please don't change this value
  • Click Next

Configure Stack Options

  • You can skip the other options here, and click Next

Review

  • Tick this box under Capabilities - since the Cloudformation stack will be creating IAM roles/policies
  • Click Create Stack

Check Status of Stack Creation


On the Cloudformation Console > Stacks, click the stack you created.

You should see the the current status on Stack Info tab, and more details under the Event tab

Wait for Status to change to CREATE_COMPLETE before proceeding to the next step below.

Enable Amazon Connect Data Streaming


Now that the Kinesis Stream and Firehose have been setup, we can now enable data streaming from Amazon Connect.

  • Go to Amazon Connnect > select your Amazon Connect instance
  • Go to Data Streaming
    • Tick Enable data streaming
    • Contact Trace Records
      • Select Kinesis Firehose
      • Select connect-ctrfirehose
    • Agent Events
      • Select Kinesis Stream
      • Select connect-agentevents

Complete Registration / Send data to eMite team


Data to be sent to eMite team can be found on the Outputs Tab of the created stack:

  • EmiteRole ARN
    • Copy the ARN returned for EmiteRoleARN
  • Amazon Connect Instance ARN
    • Copy the Value for AmazonConnectInstanceARN
  • Kinesis Stream ARN
    • Copy the Value returned for KinesisStreamARN
  • Elasticsearch Endpoint URL:
    • Copy the Value for ESDomainEndpointURL