Skip to content

Commit bd6eed5

Browse files
andrewvcph
authored andcommitted
Improved S3 Error logging for validation of buckets.
Prior to this we'd log that we couldn't write to a bucket, but didn't give the exact API error. Fixes #111
1 parent dbc474b commit bd6eed5

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 4.0.1
2+
- Improved Error logging for S3 validation. Now specific S3 perms errors are logged
3+
14
## 4.0.0
25
- This version is a complete rewrite over version 3.0.0 See #103
36
- This Plugin now uses the V2 version of the SDK, this make sure we receive the latest updates and changes.

lib/logstash/outputs/s3/write_bucket_permission_validator.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ module LogStash
77
module Outputs
88
class S3
99
class WriteBucketPermissionValidator
10+
include ::LogStash::Util::Loggable
11+
1012
def self.valid?(bucket_resource)
1113
begin
1214
upload_test_file(bucket_resource)
1315
true
14-
rescue
16+
rescue StandardError => e
17+
logger.error("Error validating bucket write permissions!",
18+
:message => e.message,
19+
:class => e.class.name
20+
)
1521
false
1622
end
1723
end

logstash-output-s3.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'logstash-output-s3'
3-
s.version = '4.0.0'
3+
s.version = '4.0.1'
44
s.licenses = ['Apache-2.0']
55
s.summary = "This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3)"
66
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"

0 commit comments

Comments
 (0)