Skip to content

An example of the cloud infrastructure to store Daily's recordings to an s3 bucket

Notifications You must be signed in to change notification settings

daily-co/daily-recordings-bucket

Repository files navigation

Daily s3 setup to store recordings

This project provides an example of the cloud infrastructure to store daily's recordings to an s3 bucket.

Setup

Instructions

  • npx cdk bootstrap --context dailySubdomain=[daily_subdomain] --context s3bucketName=[bucket_name] --context s3bucketRegion=[bucket_region]
  • npx cdk deploy --context dailySubdomain=[daily_subdomain] --context s3bucketName=[bucket_name] --context s3bucketRegion=[bucket_region]

The output of the cdk deploy command will include the names of the s3 bucket and the IAM role configured for Daily. You'll use these to configure your Daily domain and/or rooms for outputting recordings.

Connecting Daily to s3

This code accomplishes everything from the store daily call recordings in a custom Amazon S3 bucket article. The last step is to send a POST request to enable Daily to write to an s3 bucket.

You can find your bucket name and region by searching in the AWS S3 Console.

The role name is found in the AWS IAM Console.

curl --request POST \
  --url https://api.daily.co/v1/ \
  --header "Authorization: Bearer $DAILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "properties": {
      "recordings_bucket": {
        "bucket_name": "$AWS_BUCKET_NAME",
        "bucket_region": "us-west-2",
        "assume_role_arn": "arn:aws:iam::1234567890:role/$AWS_ROLE_NAME",
        "allow_api_access": true
      }
    }
  }'

Note

Bucket is created with basic configuration, you may want to configure differently, e.g.

  • adding versioning
  • encryption keys
  • public/private settings
  • cors settings

It can be done by modifying the aws_s3.Bucket in the libs.

About

An example of the cloud infrastructure to store Daily's recordings to an s3 bucket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •