Call recording storage life cycles for specific calls

0

Hi there,

I'm looking to understand the best/most efficient way to facilitate lifecycle rules for specific calls within an AWS Connect instance. The organisation has 20+ individual teams. Calls need to be accessible for some teams for years and others need no storage beyond 1 month. Managing call storage using life cycle rules and tagging seems like a good option. However, facilitating the tagging of specific calls is where we're getting some friction.
Ideally, if an interaction tag, added in the call flow, could be converted to an S3 object tag that would be nice and simple. This isn't available directly though. So, looking to assess options on the most efficient method of managing removal of a specific set of calls, handled by a specific team within 1 month of storage. Identification of the recording objects (potentially the interaction tag could still play a part) and the removal after a set period.

Any ideas would be gratefully received

2 Answers
0
Accepted Answer

Hello,

To manage lifecycle rules for specific call recordings in AWS Connect, you can use a combination of AWS Lambda, S3 event notifications, and S3 object tagging. Here’s a short outline of the approach:

  1. Tagging Calls: Use AWS Connect to add metadata (such as interaction tags) during the call flow.
  2. S3 Event Notifications: Set up S3 event notifications to trigger an AWS Lambda function whenever a new recording is uploaded.
  3. AWS Lambda Function: In the Lambda function, read the metadata and tag the S3 object with the appropriate tags (e.g., team identifier, retention period).
  4. S3 Lifecycle Policies: Apply S3 lifecycle policies based on the tags to manage the retention period and automatic deletion.

To manage call recording storage lifecycles efficiently in AWS Connect, you can use Amazon S3 lifecycle policies combined with tagging. Since interaction tags from AWS Connect can't be directly converted to S3 object tags, a solution is to use AWS Lambda to tag the S3 objects based on the interaction tags.

  1. Capture Interaction Tags: Use AWS Lambda to trigger upon call recording upload to S3.
  2. Tagging S3 Objects: In the Lambda function, read the interaction tag and apply the corresponding S3 object tag.
  3. Lifecycle Policies: Create S3 lifecycle policies to delete objects based on these tags.
profile picture
EXPERT
answered 3 months ago
profile picture
EXPERT
Sandeep
reviewed 3 months ago
profile pictureAWS
EXPERT
reviewed 3 months ago
profile picture
EXPERT
reviewed 3 months ago
  • Thank you very much for the answer, and taking time out.

0

Hi HLKennyL,

Please Go through the below steps I hope it will help you to resolve your issue.

Tagging Calls During Call Flow:

While AWS Connect doesn’t directly support converting interaction tags to S3 object tags, you can use AWS Lambda to bridge this gap. In your AWS Connect flow, you can set up an AWS Lambda function to be triggered at the end of a call. This function can retrieve the interaction details, including any custom tags, and then add appropriate S3 object tags to the corresponding call recording.

Identifying Call Recordings:

Use AWS Connect Contact Flow logs or AWS Connect Contact Lens to capture call metadata, including team identifiers. Store this metadata in a DynamoDB table or an S3 bucket.

Tagging S3 Objects via Lambda:

  • The Lambda function can:

  • Retrieve call metadata.

  • Identify the S3 object (call recording).

  • Tag the S3 object based on the metadata (e.g., team-specific tags).

Applying Lifecycle Rules:

  • Once the S3 objects are tagged appropriately, you can apply S3 lifecycle rules to manage their retention.
  • For example, set up a lifecycle rule to delete objects tagged with Team=ShortTerm after 1 month and another rule to retain Team=LongTerm objects for years.

Example Lambda Function for Tagging S3 Objects:

Here's a simplified example of a Lambda function that could tag S3 objects:

import boto3

def lambda_handler(event, context):
    s3_client = boto3.client('s3')
    # Example: Assume event contains S3 object key and team information
    s3_bucket = 'your-connect-recordings-bucket'
    s3_key = event['s3_key']
    team_tag = event['team_tag']
    
    # Add tags to the S3 object
    response = s3_client.put_object_tagging(
        Bucket=s3_bucket,
        Key=s3_key,
        Tagging={
            'TagSet': [
                {
                    'Key': 'Team',
                    'Value': team_tag
                }
            ]
        }
    )
    return response

Setting Up Lifecycle Rules in S3:

  1. Go to the S3 bucket in the AWS Management Console.

  2. Select the “Management” tab.

  3. Add lifecycle rules based on the tags:

  • Rule for Team=ShortTerm: Transition to Glacier or delete after 1 month.
  • Rule for Team=LongTerm: Retain for the required number of years.

Automation and Monitoring:

  • Use AWS CloudWatch and AWS Lambda to monitor the tagging process and ensure that lifecycle policies are applied correctly.
  • Regularly review and audit the lifecycle rules to ensure compliance with organizational policies.
EXPERT
answered 3 months ago
  • Thank you very much! Helpful

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions