Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
## 3.1.0
- breaking,config: Remove deprecated config `endpoint_region`. Please use `region` instead.

## 3.0.1
- Republish all the gems under jruby.
- Republish all the gems under jruby.

## 3.0.0
- Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
# 2.0.7
- Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
# 2.0.6
- New dependency requirements for logstash-core for the 5.0 release
- Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141

## 2.0.7
- Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash

## 2.0.6
- New dependency requirements for logstash-core for the 5.0 release

## 2.0.5
- Support signature_version option for v4 S3 keys

## 2.0.4
- Remove the `Time.now` stub in the spec, it was conflicting with other test when running inside the default plugins test #63
- Make the spec run faster by adjusting the values of time rotation test.

## 2.0.3
- Update deps for logstash 2.0

## 2.0.2
- Fixes an issue when tags were defined #39

## 2.0.0
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
- Dependency on logstash-core update to 2.0

# 1.0.1
## 1.0.1
- Fix a synchronization issue when doing file rotation and checking the size of the current file
- Fix an issue with synchronization when shutting down the plugin and closing the current temp file
18 changes: 2 additions & 16 deletions lib/logstash/outputs/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
# s3{
# access_key_id => "crazy_key" (required)
# secret_access_key => "monkey_access_key" (required)
# endpoint_region => "eu-west-1" (required) - Deprecated
# region => "eu-west-1" (optional, default = "us-east-1")
# bucket => "boss_please_open_your_bucket" (required)
# size_file => 2048 (optional) - Bytes
# time_file => 5 (optional) - Minutes
Expand All @@ -82,11 +82,6 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
# S3 bucket
config :bucket, :validate => :string

# AWS endpoint_region
config :endpoint_region, :validate => ["us-east-1", "us-west-1", "us-west-2",
"eu-west-1", "ap-southeast-1", "ap-southeast-2",
"ap-northeast-1", "sa-east-1", "us-gov-west-1"], :deprecated => 'Deprecated, use region instead.'

# Set the size of file in bytes, this means that files on bucket when have dimension > file_size, they are stored in two or more file.
# If you have tags then it will generate a specific size file for every tags
##NOTE: define size of file is the better thing, because generate a local temporary file on disk and then put it in bucket.
Expand Down Expand Up @@ -161,17 +156,8 @@ def signature_options
end

def aws_service_endpoint(region)
# Make the deprecated endpoint_region work
# TODO: (ph) Remove this after deprecation.

if @endpoint_region
region_to_use = @endpoint_region
else
region_to_use = @region
end

return {
:s3_endpoint => region_to_use == 'us-east-1' ? 's3.amazonaws.com' : "s3-#{region_to_use}.amazonaws.com"
:s3_endpoint => region == 'us-east-1' ? 's3.amazonaws.com' : "s3-#{region}.amazonaws.com"
}
end

Expand Down
2 changes: 1 addition & 1 deletion logstash-output-s3.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|

s.name = 'logstash-output-s3'
s.version = '3.0.1'
s.version = '3.1.0'
s.licenses = ['Apache License (2.0)']
s.summary = "This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3)"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down
1 change: 1 addition & 0 deletions spec/integration/s3_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# encoding: utf-8
require "logstash/devutils/rspec/spec_helper"
require "logstash/outputs/s3"
require 'socket'
Expand Down
12 changes: 1 addition & 11 deletions spec/outputs/s3_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,7 @@
"bucket" => "my-bucket" } }

describe "configuration" do
let!(:config) { { "endpoint_region" => "sa-east-1" } }

it "should support the deprecated endpoint_region as a configuration option" do
s3 = LogStash::Outputs::S3.new(config)
expect(s3.aws_options_hash[:s3_endpoint]).to eq("s3-sa-east-1.amazonaws.com")
end

it "should fallback to region if endpoint_region isnt defined" do
s3 = LogStash::Outputs::S3.new(config.merge({ "region" => 'sa-east-1' }))
expect(s3.aws_options_hash).to include(:s3_endpoint => "s3-sa-east-1.amazonaws.com")
end
let!(:config) { { "region" => "sa-east-1" } }

describe "signature version" do
it "should set the signature version if specified" do
Expand Down