logstash-output-kinesis-iot 0.1.8-java → 0.1.10-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd675d5c0a123eb9c66e096e862062b905ff8ebd24db5f2aacf6e0a5b460a318
4
- data.tar.gz: fb50d1680f61b904f6bff02f431f962f7d6b61f6dc2e41ad9d5908a059072486
3
+ metadata.gz: d218142d94d3ecb765e37d578dd6f7099b232c8e04f3d342c8150f1cc09c85ec
4
+ data.tar.gz: 43fbc7f3e6e68c6f6f54d085ffd40dfaca91f0663c76fd3c43ac8362d0b187da
5
5
  SHA512:
6
- metadata.gz: 7ddfa1568a11bf2739c4e01a43325dbf6242ae63bf9504c2331c9f3bc94c469d97a41d4d25220e49ebbaefa71f0102c17b558055d93e1ecf2552c43b4c5e8b4d
7
- data.tar.gz: ab0dc04047694f9b51589345bec9a19b356e31e18b1cad1cd05a86f04d11bd8dec09912aed793d197a3b598e1a0702ce07714dec4b49b2870396a32e228bd072
6
+ metadata.gz: 9a6f3d5db60492b7f404413ef0fd5b3acdcc2b67e8da5a23143840da022f66c9c7e8dd2ba6d78bf1e1c94b3abb47070ee07245caf11d38d5c7337c9cf2ff5f0f
7
+ data.tar.gz: 7569522e712b73b45fcadd0981a62f2c1b053f2b2462e05218556db25fbc884daa5b86460c69bf59f5b69024a184239683dc3bc668f1bebbbcc906fde3529260
@@ -95,6 +95,7 @@ class LogStash::Outputs::KinesisIOT < LogStash::Outputs::Base
95
95
  end
96
96
 
97
97
  def init_aws
98
+ @logger.info("Set AWS Credentials")
98
99
  Aws.config.update({
99
100
  region: @region,
100
101
  credentials: Aws::Credentials.new(@creds.accessKeyId, @creds.secretAccessKey, @creds.sessionToken)
@@ -104,8 +105,10 @@ class LogStash::Outputs::KinesisIOT < LogStash::Outputs::Base
104
105
  # send data to kinesis
105
106
  end
106
107
  def renew_aws
108
+ @logger.info("Renewing AWS Credentials")
107
109
  @creds = getIotAccess()
108
110
  Aws.config.update({ credentials: Aws::Credentials.new(@creds.accessKeyId, @creds.secretAccessKey, @creds.sessionToken)})
111
+
109
112
  end
110
113
 
111
114
 
@@ -148,6 +151,7 @@ class LogStash::Outputs::KinesisIOT < LogStash::Outputs::Base
148
151
  end
149
152
  def send_record(event, payload)
150
153
  begin
154
+ renew_aws() unless @creds.expiration < Time.now() + 1
151
155
  response = @kinesis.put_record({
152
156
  stream_name: @stream_name,
153
157
  data: payload,
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-kinesis-iot'
3
- s.version = '0.1.8'
3
+ s.version = '0.1.10'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "Sends data to a AWS kinesis, "
6
6
  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"
@@ -22,5 +22,5 @@ Gem::Specification.new do |s|
22
22
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
23
23
  s.add_development_dependency 'logstash-devutils', ">= 0"
24
24
  s.add_runtime_dependency "logstash-codec-json", ">= 0"
25
- s.add_runtime_dependency "aws-sdk-kinesis", "~> 1.70"
25
+ s.add_runtime_dependency "aws-sdk-kinesis", "~> 1"
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-kinesis-iot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.10
5
5
  platform: java
6
6
  authors:
7
7
  - Jeremy Frandon
@@ -63,7 +63,7 @@ dependencies:
63
63
  requirements:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: '1.70'
66
+ version: '1'
67
67
  name: aws-sdk-kinesis
68
68
  prerelease: false
69
69
  type: :runtime
@@ -71,7 +71,7 @@ dependencies:
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '1.70'
74
+ version: '1'
75
75
  description: This gem is a Logstash plugin required to be installed on top of the
76
76
  Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
77
77
  gem is not a stand-alone program