How to use Amazon S3 with a Wowza media server

This article describes how to use Amazon Simple Storage Service (Amazon S3) with a Wowza media server for Amazon Elastic Compute Cloud (Amazon EC2) instance to stream on-demand video. Amazon S3 provides a repository for storage of your media files that can be accessed by multiple Wowza media server for EC2 instances. The persistent nature of Amazon S3 storage means that the content is always available to an instance after you launch it.


About Amazon S3
Configuring Amazon S3
Streaming on-demand from Amazon S3 (vods3) Mounting an Amazon S3 bucket on your Amazon Machine Image
Troubleshooting Amazon S3

About Amazon S3

Amazon S3 is a persistent storage system that's available for EC2 instances. While EC2 instances lose their data when they're shut down, Amazon S3 is an external data source that multiple EC2 instances can readily access. You can store an unlimited number of objects (media files) containing from 1 byte to 5 terabytes (TB) of data in a user-defined bucket in a specific Amazon Region, and secure the data from unauthorized access.

Pricing for Amazon S3 is managed by Amazon. For more information, see Amazon S3 Pricing. The data that's streamed from Amazon S3 via your Wowza media server for Amazon EC2 instance to your customers is charged at regular Wowza rates. For more information about Wowza media server for EC2 pricing, see Media Streaming on Amazon Web Services (AWS).

Configuring Amazon S3

You can use the AWS Management Console to create buckets, store and retrieve your media objects, and manage permissions to the resources. For more information, see the Amazon S3 Console User Guide. The media objects that are stored in your Amazon S3 repository are available for use with other AWS services, including Amazon EC2.

Streaming on-demand from Amazon S3 (vods3)

Due to the latency associated with streaming video files from an Amazon S3 bucket, Wowza media server AMIs include the built-in vods3 application, which is used to improve performance when streaming content stored on Amazon S3. Any content stored on Amazon S3 should be streamed via the vods3 application.

The vods3 application uses Wowza Media Cache technology to cache the content in the Amazon EC2 AMI instance store. The caching system works in the following manner:
  • The files are cached on the local instance store the first time a stream is accessed. The system caches block-by-block to minimize startup times on first view.
  • Items are removed from the cache based on a caching algorithm:
    • If the cache isn't full, an item will live in the cache as long as it's being viewed.
    • If an item isn't being viewed, a time-to-live timer starts. The item is flushed from the cache if it isn't viewed for MaxTimeToLive milliseconds.
    • If the cache is full and a new item must be cached, the cached items that haven't been viewed for more than MinTimeToLive milliseconds are flushed from the cache to make room. Items are flushed from the cache in reverse order from the last time they were viewed.
The vods3 application is included in the default startup package, which is used automatically when you launch a Wowza Media Server for EC2 instance.
Note: If you load your own startup package when launching an instance, the default startup package won't be used. Your startup package must provide all of the applications that are required for streaming, including the vods3 application. For more information about how to configure startup packages, see the Wowza Streaming Engine for Amazon EC2 User's Guide.


To stream video from Amazon S3, upload a media file to your Amazon S3 bucket and then set your stream name in the following form:
The amazons3/ part of the stream name identifies that the stream is sourced from Amazon S3.

Using the above example, you can play the mycoolvideo.m4v file that's stored in the Amazon S3 bucket mybucket at the path videos/coolvideos by using the URLs below.
Note: Replace [instance-public-dns] with the public domain name of the Wowza media server for EC2 instance.

Adobe Flash Player (RTMP)

Server: rtmp://[instance-public-dns]/vods3
Stream: mp4:amazons3/mybucket/videos/coolvideos/mycoolvideo.m4v

Adobe Flash Player (RTMP single URL)


Adobe Flash Player (Flash HDS)


Apple iOS device (Apple HLS)


Microsoft Silverlight (Smooth Streaming)


RTSP/RTP player or device

  • When streaming using a stream name that includes path elements (for example, mp4:amazons3/mybucket/videos/coolvideos/mycoolvideo.m4v), you must supply both the application name and applicationInstance name as part of the URL. The example URLs above use the default applicationInstance name _definst_.
  • By default, the vods3 application is configured with S3 authorization turned off. This means that all content must be publicly available. For more information about how to stream non-publicly available content, see the Wowza Streaming Engine for Amazon EC2 User's Guide.

Re-streaming using case-sensitive bucket names

There are two ways to address in asset in Amazon S3. One method includes the bucket name as part of the domain name and the other includes the bucket name as part of the URL path. For example, if you have a video file in the following location:
Bucket: wowzamediacache
Path: sample/Extremists.m4v
The URL to address this file using the domain method is:
The URL to address this file using the path method is:
The domain method is used by default when using the vods3 application to re-stream assets from Amazon S3. This method works in all regions with all bucket types. However, there may be an issue with case-sensitive bucket names. In this case, the domain method won't work and you must instruct the Wowza media server to use the path method. To do this, add the following property to the server-level <Properties> container in [install-dir]/conf/Server.xml:

Mounting an Amazon S3 bucket on your Amazon Machine Image

After you create an Amazon S3 bucket, you can mount it as a local file system with read/write capabilities by using the open source FUSE-based file system s3fs. This enables interaction between the AMI Host operating system and your Amazon S3 bucket. For more information, see How to use the FUSE-based file system backed by Amazon S3.

Troubleshooting Amazon S3

Because environments can change over time, go to the Wowza Streaming Engine in the Cloud forum if you have trouble.
Originally Published: 10-01-2010.
Updated: 05-12-2011.

If you're having problems or want to discuss this article, post in our forum.