S3 Bucket for CVI Recording Setup
1. Create an S3 Bucket
Create an S3 bucket and name it according to your own practices. If you’re new to S3 buckets, follow this guide.
The bucket can be in any AWS region.
Make note of the region and bucket name you chose. You will need them going forward.
2. Create an IAM Policy
In AWS, navigate to the IAM dashboard. Click on “Policies” in the left-hand menu. Next, click “Create” to paste the following policy into the JSON definition:
your-bucket-name
in the “Resource” property with the name of your designated S3 bucket.3. Create an IAM Role
You can find role creation in the same IAM service dashboard used to create the policy. Click on “Roles” in the left-hand menu, then click “Create Role”. Follow these steps to create your role:
- For “Trusted Entity Type”, select “AWS Account”
- Under “An AWS Account”, select “Another AWS account”
- Enter
291871421005
as the Account ID (this is Daily’s account) - Use the word
tavus
as the “Require External ID” value.
- Click “Next” and attach the policy you just created to the role:
-
Click “Next” again, give your role a name, and click “Create role”.
-
Once the role is created, find it in your IAM Roles list and click “Edit”. Set the “Maximum session duration” to “12 hours”:
- Finally, copy the ARN (Amazon Resource Name) of the role you just created on the role page in IAM:
4. Create a Conversation with Recording Enabled
You can now make an API call using the create-conversation endpoint. Here are the pertinent properties related to recording:
enable_recording
: Set this totrue
. This will allow the user to start the recording but will not automatically start it. If you want automatic recording, use frontend code.aws_assume_role_arn
: Copy this from the IAM role page. Example:arn:aws:iam::123456789012:role/YourRoleName
recording_s3_bucket_region
: The region you selected when creating the bucket. Example:us-east-1
recording_s3_bucket_name
: The bucket name you entered when creating the bucket. Example:recordings-cvi-daily
Here is a sample CURL request that properly specifies the recording properties:
daily-co-test-upload.txt
to your bucket to verify permissions. If the recording itself is never started (manually by a user or via frontend code), this will be the only file written to the bucket.