External S3 Recordings
Overview
The Twilio Recording Settings REST API lets you configure Twilio to store your recordings in an external AWS S3 bucket. Recording Settings work per-account (i.e. project). If you activate external S3 storage all Video Recordings in your account (or project) will be stored in the specified external bucket.
This document contains reference information about the Recording Settings REST API for external S3 storage. For a step-by-step guide you can also read the Storing into AWS S3 developer guide
Contents
URI Schemes
These are the URI schemes for the Recording Settings REST API and the supported methods:
/v1/RecordingSettings/Default
GET
: Retrieves current Recording Settings.POST
: Updates the Recording Settings.
Recording Settings instance resource
The Default
RecordingSettings
resource holds the default recording settings for the given Twilio account (or project). Its configuration will be applied to all Recordings created in such account (or project).
Base URL
The Recording Settings default resource is located at the following Base URL:
https://video.twilio.com/v1/RecordingSettings/Default
Resource Properties
A RecordingSettings resource has the following properties:
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the RecordingSettings resource. |
friendly_name
|
The string that you assigned to describe the resource and show the user in the console |
aws_credentials_sid
|
The SID of the stored Credential resource. |
aws_s3_url
|
The URL of the AWS S3 bucket where the recordings are stored. We only support DNS-compliant URLs like |
aws_storage_enabled
|
Whether all recordings are written to the |
encryption_key_sid
|
The SID of the Public Key resource used for encryption. |
encryption_enabled
|
Whether all recordings are stored in an encrypted form. The default is |
url
|
The absolute URL of the resource. |
In the table above, the following properties are reserved for the feature called Encrypted Recordings:
encryption_key_sid
encryption_enabled
If you have an interest in activating Encrypted Recordings in you account, please contact the Twilio Support Service.
HTTP GET: Get Settings
Retrieves your account's default Recording Settings.
For example:
HTTP POST: Set Settings
Sets your account's default Recording Settings. POST requests support the following parameters:
Parameters in REST API format | |
---|---|
friendly_name
Required
|
A descriptive string that you create to describe the resource and be shown to users in the console |
aws_credentials_sid
Optional
|
The SID of the stored Credential resource. |
encryption_key_sid
Optional
|
The SID of the Public Key resource to use for encryption. |
aws_s3_url
Optional
|
The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like |
aws_storage_enabled
Optional
|
Whether all recordings should be written to the |
encryption_enabled
Optional
|
Whether all recordings should be stored in an encrypted form. The default is |
In the table above, the following parameters are reserved for the feature called Encrypted Recordings:
EncryptionKeySid
EncryptionEnabled
If you have an interest in activating Encrypted Recordings and enable the use of these parameters in you account, please contact the Twilio Support Service.
Enabling external S3 storage for Recordings
The following code snippet illustrates how you can set your Recordings to be stored in an external S3 bucket:
Disabling external S3 storage for Recordings
To stop storing recordings in an AWS S3 Bucket by default, you can create a new default configuration with AWS storage disabled. If you disable external AWS S3 storage, recordings will be stored in the Twilio cloud.
Known limitations
- If you activate External S3 Storage in your account, you will not be able to use Compositions in such account given that Compositions require the source recordings to be stored in Twilio's cloud.
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.