The ModuleS3Upload module for Wowza Streaming Engine™ media server software automatically uploads finished recordings to an Amazon S3 bucket. It uses the Amazon Web Services (AWS) SDK for Java to upload the recorded files.
Video tutorial: Upload recorded media to an Amazon S3 bucket
See how upload recorded media to an Amazon S3 bucket with the ModuleS3Upload module for Wowza Streaming Engine.
Prerequisites
Wowza Streaming Engine 4.7.2.02 or later is required.
The Amazon Web Services (AWS) Java SDK is required to provide the upload functionality.
Installation
- Download wse-plugin-s3upload.zip.
- Extract the contents from the downloaded (zipped) package, and then copy the lib/wse-plugin-s3upload.jar file from the package to the lib folder in your Wowza Streaming Engine installation ([install-dir]/lib).
- Download AWS Java SDK (aws-java-sdk-x.xx.xxx.zip).
- Extract the contents from the downloaded (zipped) package, and then copy the lib/aws-java-sdk-x.xx.xxx.jar file from the package to the lib folder in your Wowza Streaming Engine installation ([install-dir]/lib).
- Restart Wowza Streaming Engine.
Configuration
To enable this module, add the following module definition to your application configuration. See Configure modules for details.
Name
|
Description
|
Fully Qualified Class Name
|
ModuleS3Upload | Uploads recordings to Amazon S3. | com.wowza.wms.plugin.s3upload.ModuleS3Upload |
Properties
After enabling the module, you can adjust the default settings by adding the following properties to your application. See Configure properties for details.
Path
|
Name
|
Type
|
Description
|
/Root/Application | s3UploadAccessKey | String | The AWS access key ID. There isn't a default value. |
/Root/Application | s3UploadSecretKey | String | The AWS secret key. There isn't a default value. |
/Root/Application | s3UploadBucketName | String | The S3 bucket to which you upload files. There isn't a default value. |
/Root/Application | s3UploadProfile | String | The AWS username to use for authentication. There isn't a default value. |
/Root/Application | s3UploadProfilePath | String | An alternative path to the AWS credentials. There isn't a default value. |
/Root/Application | s3UploadRegion | String | The S3 region for bucket location. For a list of region names for each location, see AWS Regions and Endpoints. There isn't a default value. |
/Root/Application | s3UploadUseDefaultRegion | Boolean | Enables the uploader to use the same region as the EC2 instance or the AWS SDK default region. The default value is true. Set to false to prevent the uploader from automatically using those regions. |
/Root/Application | s3UploadAllowBucketRegionOverride | Boolean | Enables global access to buckets. This is used to prevent region mismatches from causing uploads to fail.The default value is true. Set to false to disable global access to buckets. |
/Root/Application |
s3UploadCannedAcl | String | A predefined grant (list of grantees and permissions) known as a canned access control list (ACL). See Amazon's list of supported canned ACLs. There isn't a default value. |
/Root/Application | s3UploadFilePrefix | String | The name of the folder to which files are uploaded. There isn't a default value. |
/Root/Application | s3UploadResumeUploads | Boolean | Specifies that uploads should resume if interrupted. The default value is true. Set to false to prevent interrupted uploads from resuming. |
/Root/Application | s3UploadDelay | Integer | Delays the uploading of files by the value in case a stream is republished. The default value, 0 milliseconds, results in no delay. Increase the value to delay the upload. |
/Root/Application | s3UploadRestartFailedUploads | Boolean | Restarts failed uploads after a timeout without restarting the application. The default value is true. |
/Root/Application | s3UploadRestartFailedUploadTimeout | Integer | Specifies the time, in milliseconds, to wait to restart a failed upload. The default value is 60000 milliseconds. |
/Root/Application | s3UploadDeleteOriginalFiles | Boolean | Specifies whether to delete the original files after uploading. The default value is false. Set to true to delete files after uploading.(default: false) |
/Root/Application | s3UploadVersionFile | Boolean | Enables automatic incremented versioning of uploaded files. The default value is false. Set to true to enable versioning. |
/Root/Application | s3UploadACLGroupGranteeUri | String | The URI representation of the Group Grantee from the Amazon S3 Predefined Groups. There isn't a default value. |
/Root/Application | s3UploadACLPermissionRule | String | The level of permissions granted to the Group Grantee to access the uploaded file. For a list of valid values, see What permissions can I grant? There isn't a default value. |
/Root/Application | s3UploadDebugLog | Boolean | Enables verbose debug logging. The default value is false. Set to true to turn on verbose logging. |
Usage
Note the following details about using the ModuleS3Upload module:
- If you don't provide credentials, the default AWS methods are used to authenticate with S3. For more information, see Using the default credential provider chain.
- When a recording is finished, a temporary file named [recording-name].upload is created to track the recording and sort any data that may be needed to resume the file upload later if it's interrupted. AWS TransferManager uploads the recorded file, splitting it into a multipart upload if required. After the recorded file is uploaded, the temporary [recording-name].upload file is deleted.
- When the Wowza Streaming Engine application starts or restarts, the module checks to see if any interrupted uploads must be completed. Interrupted single part uploads are restarted from the beginning while interrupted multipart uploads are resumed from the last complete part. If the module is set to not resume uploads after interruptions (s3UploadResumeUploads = false), incomplete multipart uploads are deleted from the S3 bucket.
For developers
- Get the source code on GitHub