s3
Last updated
Last updated
The out_s3
Output plugin writes records into the Amazon S3 cloud object storage service. By default, it creates files on an hourly basis. This means that when you first import records using the plugin, no file is created immediately.
The file will be created when the timekey
condition has been met. To change the output frequency, please modify the timekey
value in the buffer section. For more details, see time chunk keys.
This document doesn't describe all parameters. If you want to know full features, check the Further Reading section.
out_s3
is included in td-agent by default. Fluentd gem users will need to install the fluent-plugin-s3 gem. In order to install it, please refer to the Plugin Management article.
Please see the Store Apache Logs into Amazon S3 article for real-world use cases.
Please see the Config File article for the basic structure and syntax of the configuration file.
For <buffer>
section, see Buffer Section Configuration. By default, this plugin uses the file
buffer.
@type
(required)The value must be s3
.
aws_key_id
The AWS access key id. This parameter is required when your agent is not running on an EC2 instance with an IAM Instance Profile.
aws_sec_key
The AWS secret key. This parameter is required when your agent is not running on an EC2 instance with an IAM Instance Profile.
S3 plugin supports several credentials.
See README.
s3_bucket
The Amazon S3 bucket name.
buffer
The buffer of the S3 plugin. The default is the time-sliced buffer.
For more details, see buffer
.
s3_region
The Amazon S3 region name. Please select the appropriate region name and confirm that your bucket has been created in the correct region.
Here are some regions:
us-east-1
us-west-1
eu-central-1
ap-southeast-1
sa-east-1
See the complete list of regions here.
<format>
DirectiveThe format of the object content. The default is out_file
.
JSON example:
See formatter
article for more detail.
path
The path prefix of the files on S3. The default is "" (no prefix).
The actual path on S3 will be: {path}{time_slice_format}_{sequential_index}.gz
(see s3_object_key_format
) by default.
s3_object_key_format
The actual S3 path. This is interpolated to the actual path (e.g. Ruby's variable interpolation):
path
: the value of the path
parameter above
time_slice
: the time string as formatted by buffer configuration
index
: the index for the given path. Incremented per buffer flush
file_extension
: as determined by the store_as
parameter.
For example, if:
s3_object_key_format
: default
path
: hello
time_slice
: %Y%m%d
store_as
: json
Then, hello20141111_0.json
would be the example of an actual S3 path.
This parameter is for advanced users. Most users should NOT modify it. Also, always make sure that %{index}
appears in the customized s3_object_key_format
(Otherwise, multiple buffer flushes within the same time slice throws an error).
store_as
The compression type.
Supported types: lzo
, json
, txt
proxy_uri
The proxy URL.
ssl_verify_peer
Verify the SSL certificate of the endpoint. If false
, the endpoint SSL certificate is ignored.
@log_level
It allows the user to set different levels of logging for each plugin.
Supported levels: fatal
, error
, warn
, info
, debug
, trace
Please see the logging article for further details.
This page does not describe all the possible configurations. For more details, follow this:
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is an open-source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.
type
default
version
string
required/optional
1.0.0
type
default
version
string
required/optional
1.0.0
type
default
version
string
required
1.0.0
type
default
version
string
ENV["AWS_REGION"]
or us-east-1
1.0.0
type
default
version
string
""
1.0.0
type
default
version
string
%{path}%{time_slice}_%{index}.%{file_extension}
1.0.0
type
default
version
string
"gzip"
1.0.0
type
default
version
string
nil
1.0.0
type
default
version
bool
true
1.0.0