Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

Using S3 storage with Vonage Video API archiving

Use the TokBox Account to specify your S3-compliant endpoint or Windows Azure container for completed archives to be uploaded to. (For more information on Windows Azure see Using a Windows Azure container with Vonage Video API archiving.)

You can create an Amazon S3 account at http://aws.amazon.com/s3/.

Note: You can also use an S3-compliant storage provider other than Amazon S3. We support Cloudian as an S3-compatible storage solution. Other S3-compatible services may have feature limitations.

You will provide the following information to the TokBox Account:

You can create an Amazon S3 bucket (or find names of existing buckets) at the Amazon S3 console.

Note: OpenTok archiving does not support S3 buckets in the China (Beijing) region.

To obtain an Amazon S3 access key ID and secret access key:

  1. Go to the Amazon Web Services Management Console and sign in.
  2. Go to the Amazon Web Services security credentials page.
  3. Under Access Keys (Access Key ID and Secret Access Key), click the Create New Access Key button.
  4. In the Create Access Key window displayed, Click Show Access Key.
  5. Make a record of the Access Key ID and Secret Access Key values. Or click the Download Key File button to download the rootkey.csv file that contains the access key ID and Secret Access Key values.

If you want to use an IAM user, assign it the following user policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1427497452000",
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::*"
            ],
            "Action": [
                "s3:ListAllMyBuckets"
            ]
        },
        {
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::<bucketName>"
            ],
            "Action": [
                "s3:ListBucket"
            ]
        },
        {
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::<bucketName>/*"
            ],
            "Action": [
                "s3:PutObject"
            ]
        }
    ]
}

(Replace <bucketName> with your bucket name.)

Now, go to the TokBox Account and complete the following steps:

  1. Click on a Project in the left nav that will contain sessions that you are archiving.
  2. In the Archiving section, click the Set up your cloud storage now button, and then click on Amazon S3.
  3. Enter the S3 Access Key ID, the Secret Access Key, and the Bucket Name for the bucket that you want archives uploaded to.
  4. If you are using a S3-compliant storage provider other than Amazon, enter the endpoint base URL, including the protocol (http or https), such as https://s3.cloudianhyperstore.com.
  5. Click the Connect to cloud storage button.

Note: You can also set an archive upload target using the OpenTok REST API.

Recorded archives are uploaded to the Amazon S3 bucket you specify.

All archives are saved to a subdirectory of your S3 bucket that has your OpenTok API key as its name, and each archive is saved to a subdirectory that has the archive ID as its name. The name of the archive file is archive.mp4 (for a composed archive) or archive.zip (for an individual stream archive). (See Individual stream and composed archives.)

For example, consider an archive with the following API key and ID:

The file for this archive is uploaded to the following directory your S3 bucket.

123456/ab0baa3d-2539-43a6-be42-b41ff1488af3/archive.mp4

At the Amazon S3 console you can make an uploaded archive file public. Navigate to the archive file in the console, right-click it, and select the Make public command. You can obtain the public URL for the file in the Properties panel for the file in the Amazon S3 console.