A collection of GStreamer elements to interact with the Amazon Simple Storage Service (S3).
Amazon S3 Gst Plugin is no longer being developed.
For your future development needs, we recommend utilising the officially maintained AWS plugins for GStreamer. These can be found in the GStreamer Rust-based plugins repository at:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/tree/main/net/aws
These plugins are actively maintained and offer robust support for AWS integration with GStreamer.
Following dependencies are required to build the project:
- GStreamer: core, base plugins
see the GStreamer's documentation for installation instructions - Meson build system
- AWS SDK for C++
$ meson build
$ cd build
$ ninja
$ sudo ninja installAfter executing commands above, the plugin (libgsts3elements.so) should be installed in the default GStreamer's plugin path. It can also be found in the build directory, and used by specifying the plugin path:
$ GST_PLUGIN_PATH=src gst-inspect-1.0 s3sink- s3sink - streams the multimedia to a specified bucket.
By default all the elements use the default credentials provider chain, which means, that credentials are read from the following sources:
- Environment variables:
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY - AWS credentials file. Usually located at ~/.aws/credentials.
- For EC2 instance, IAM instance profile.
Some of the elements have credentials property of GstAWSCredentials type, which is a wrapper for an Aws::Auth::AWSCredentialsProvider class.
The GstAWSCredentials object can be deserialized from a string, which makes using the property in gst-launch command possible. The string must be specified in the following format
property1=value1[|property2=value2[|property3=value3[|...]]]
Currently the deserializer accepts following properties:
access-key-id, e.g.AKIAIOSFODNN7EXAMPLEsecret-access-key, e.g.wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYsession-tokeniam-role, e.g.arn:aws:iam::123456789012:role/s3access
All the properties are optional, however, be aware of the rules:
access-key-idcannot exist withoutsecret-access-key(and vice versa)- if
session-tokenspecified, bothaccess-key-idandsecret-access-keymust be present - if
iam-roleis specified, it will use default credentials provider to assume the role, unlessaccess-key-idandsecret-access-keyare present - in that case, these credentials are used to assume the role.
This code is made available under the LGPLv2.1 license. (See LICENSE file)
- Streaming camera capture to an S3 bucket:
$ gst-launch-1.0 -e v4l2src num-buffers=300 device=/dev/video0 ! x264enc ! matroskamux ! s3sink bucket=my-personal-videos key=recording.mkv
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.