By default, call recordings are stored in an AWS S3 bucket managed by Stream, located in the same region as your application.
Recording files are retained for two weeks before being automatically deleted.
If you need to keep recordings longer or prefer not to store this data with Stream, you can opt to use your own storage solution.
If you need support for a different storage provider, you can participate in the conversation here.
To use your own storage you need to:
Configure a new external storage for your Stream application. Stream supports up to 10 storage configurations per application.
(Optional) Check storage configuration for correctness.
Calling check endpoint will create a test markdown file in the storage to verify the configuration. It will return an error if the file is not created.
In case of success, the file withstream-<uuid>.md will be uploaded to the storage. Every time you call this endpoint, a new file will be created.
Configure your call type(s) to use the new storage
Once the setup is complete, call recordings and transcription files will be automatically stored in your own storage.
// 1. create a new storage with all the required parametersawait client.createExternalStorage({ bucket: "my-bucket", name: "my-s3", storage_type: "s3", path: "directory_name/", aws_s3: { s3_region: "us-east-1", s3_api_key: "my-access-key", s3_secret: "my-secret", },});// 2. (Optional) Check storage configuration for correctness// In case of any errors, this will throw a ResponseError.await client.checkExternalStorage({ name: "my-s3",});// 3. update the call type to use the new storageawait client.video.updateCallType({ name: "my-call-type", external_storage: "my-s3",});
# 1. create a new storage with all the required parametersfrom getstream.models.s_3_request import S3Requestclient.create_external_storage( name='my-s3', storage_type='s3', bucket='my-bucket', path='directory_name/', aws_s3=S3Request( s3_region='us-east-1', s3_api_key='my-access-key', s3_secret='my-secret', ),)# 2. (Optional) Check storage configuration for correctness# In case of any errors, this will throw a StreamAPIException.response = client.check_external_storage(name='my-s3')# 3. update the call type to use the new storageclient.video.update_call_type(name='allhands', external_storage='my-s3')
// 1. create a new storage with all the required parametersclient.CreateExternalStorage(ctx, &getstream.CreateExternalStorageRequest{ Name: "my-s3", StorageType: "s3", Bucket: "my-bucket", Path: getstream.PtrTo("directory_name/"), AwsS3: &getstream.S3Request{ S3Region: "us-east-1", S3APIKey: getstream.PtrTo("my-access"), S3Secret: getstream.PtrTo("my-secret"), },})// 2. (Optional) Check storage configuration for correctness// In case of any errors, this will throw a StreamAPIException.response, err := client.CheckExternalStorage(ctx, "my-s3", &getstream.CheckExternalStorageRequest{})// 3. update the call type to use the new storageclient.Video().UpdateCallType(ctx, "allhands", &getstream.UpdateCallTypeRequest{ ExternalStorage: getstream.PtrTo("my-s3"),})
# 1. create a new storage with all the required parameterscurl -X POST https://video.stream-io-api.com/video/external_storage?api_key=${API_KEY} \ -H "Authorization: ${TOKEN}" \ -H "Content-Type: application/json" \ -H "stream-auth-type: jwt" \ -d '{ "name": "my-storage", "storage_type": "s3", "bucket": "my-bucket", "path": "my-folder", "aws_s3": { "s3_region": "us-east-1", "s3_api_key": "my-api-key", "s3_secret": "my-secret" } }' # 2. (Optional) Check storage configuration for correctnesscurl -X GET https://video.stream-io-api.com/video/external_storage/check?api_key=${API_KEY} \ -H "Authorization: ${TOKEN}" \ -H "stream-auth-type: jwt"# 3. update the call type to use the new storagecurl -X PUT https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE}?api_key=${API_KEY} \ -H "Authorization: ${TOKEN}" \ -H "Content-Type: application/json" \ -H "stream-auth-type: jwt" \ -d '{ "external_storage": "my-storage" }'
You can configure multiple storage providers for your application. Maximum of 10 storage providers can be configured.
When starting a transcription or recording, you can specify which storage provider to use for that particular call. If none is specified, the default storage provider will be used.
When transcribing or recording a call, the storage provider is selected in this order:
If specified at the call level, the storage provider chosen for that particular call will be used.
If specified at the call type level, the storage provider designated for that call type will be used.
If neither applies, Stream S3 storage will be used.
Note: All Stream applications have Stream S3 storage enabled by default, which you can refer to as "stream-s3" in the configuration.
// update the call type to use Stream S3 storage for recordingsawait client.video.updateCallType({ name: "my-call-type", external_storage: "stream-s3",});// specify my-storage storage when starting call transcribingawait call.startTranscription({ transcription_external_storage: "my-storage",});// specify my-storage storage for recordingawait call.startRecording({ recording_external_storage: "my-storage" });
# update the call type to use Stream S3 storage for recordingsclient.video.update_call_type('my-call-type', external_storage="stream-s3")# specify my-storage storage when starting call transcribingcall.start_transcription(transcription_external_storage="my-storage")# specify my-storage storage for recordingcall.start_recording(recording_external_storage="my-storage")
// update the call type to use Stream S3 storage for recordingsclient.Video().UpdateCallType(ctx, "my-call-type", &getstream.UpdateCallTypeRequest{ ExternalStorage: getstream.PtrTo("stream-s3"),})// specify my-storage storage when starting call transcribingcall.StartTranscription(ctx, &getstream.StartTranscriptionRequest{ TranscriptionExternalStorage: getstream.PtrTo("my-storage"),})// specify my-storage storage for recordingcall.StartRecording(ctx, &getstream.StartRecordingRequest{ RecordingExternalStorage: PtrTo("my-storage"),})
# update the call type to use Stream S3 storage for recordingscurl -X PUT https://video.stream-io-api.com/api/v2/video/calltypes/${CALL_TYPE}?api_key=${API_KEY} \ -H "Authorization: ${TOKEN}" \ -H "stream-auth-type: jwt" \ -H 'Content-Type: application/json' \-d '{ "external_storage": "my-first-storage"}'# specify Stream S3 storage when starting call transcribingcurl -X POST "https://video.stream-io-api.com/api/v2/video/call/${CALL_TYPE}/${CALL_ID}/start_transcription?api_key=${API_KEY}" \ -H "Authorization: ${TOKEN}" \ -H "stream-auth-type: jwt" \ -H 'Content-Type: application/json' \-d '{ "transcription_external_storage": "my-second-storage"}'
All storage providers have 4 shared parameters, other parameters are dependant on what kind of storage you want to create (below you can find examples for all supported storage types):
With this option you omit the key and secret, but instead you set up a resource-based policy to grant Stream SendMessage permission on your S3 bucket.
The following policy needs to be attached to your queue (replace the value of Resource with the fully qualified ARN of you S3 bucket):
To use Google Cloud Storage as your storage provider, you need to send your service account credentials as they are stored in your JSON file.
Stream only needs permission to write new files, it is not necessary to grant any other permission.
Note: We recommend reading the credentials from the file to avoid issues with copying and pasting errors.