Note: An s3fs mount shouldn't be recorded to directly (See this Wowza Media Server forum post). It also shouldn't be streamed from directly. Instead, use the vods3 application to stream from Amazon S3 storage. For more information, see Streaming video on demand from Amazon S3 (vods3).
Note: For more information about how to create a FUSE-based filesystem backed by Amazon S3, see FuseOverAmazon.
To mount an Amazon S3 bucket using s3fs
- Open a secure Telnet session to your Wowza Media Server for Amazon EC2 instance using Secure Shell (SSH) and then create a new directory in the Telnet window:
For more information about how to use Telnet, see the Wowza Media Server for Amazon EC2 User's Guide.Code:mkdir /mnt/s3
- Specify your security credentials (access key ID and secret access key) in a .passwd-s3fs file in your home directory:
- Create the s3fs password file:
Code:vi /etc/passwd-s3fs
- In the s3fs password file, insert the security credentials (access key ID and secret access key) using the following format:
Code:[accessKeyId]:[secretAccessKey]
- Save the file and then run the following command:
Code:chmod 640 /etc/passwd-s3fs
- Create the s3fs password file:
- Mount the Amazon S3 bucket:
Note: Earlier amis had the s3fs command located at /usr/bin/s3fs.Code:/usr/local/bin/s3fs your.S3.Bucket -o default_acl=public-read /mnt/s3
Note: To ensure that the bucket is remounted when the instance is rebooted, add the above command to your /etc/rc.local file.
- Add the ModuleMediaWriterFileMover module definition to the configuration file for your application that records video ([install-dir]/conf/[application]/Application.xml). This module enables files that have been written/recorded to disk to be copied or moved.
Code:<Module> <Name>ModuleMediaWriterFileMover</Name> <Description>ModuleMediaWriterFileMover</Description> <Class>com.wowza.wms.module.ModuleMediaWriterFileMover</Class> </Module>
- Add the following application level properties to the <Properties> container at the bottom of [install-dir]/conf/[application]/Application.xml to control where to copy the file after recording is complete:
For property details, see How to move recordings from live streams (ModuleMediaWriterFileMover)Code:<Property> <Name>fileMoverDestinationPath</Name> <Value>/mnt/s3</Value> </Property> <Property> <Name>fileMoverDeleteOriginal</Name> <Value>false</Value> <Type>Boolean</Type> </Property> <Property> <Name>fileMoverVersionFile</Name> <Value>true</Value> <Type>Boolean</Type> </Property>
Note: If you need finer control of the move, you can use the IMediaWriterActionNotify interface.
- Click here, if you are having problems or would like to discuss this article.
- Leave a comment below, if there is some aspect of this article you would like to see changed or improved.


Article List
Categories
Wowza Media