logstash-output-kinesis-iot 0.1.9-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: 5e49da5415d0213c84e1e23d30e0ccabf1869062df0a3a811e014ebf13bea42b
4
- data.tar.gz: a84219def0d32fc43b9099836b4c18a90bfbc085d3b8eee0d285def57f85aff7
3
+ metadata.gz: d218142d94d3ecb765e37d578dd6f7099b232c8e04f3d342c8150f1cc09c85ec
4
+ data.tar.gz: 43fbc7f3e6e68c6f6f54d085ffd40dfaca91f0663c76fd3c43ac8362d0b187da
5
5
  SHA512:
6
- metadata.gz: bdbdca28b480c127f80f883d1575201fe61062eba7e10cb47f8418722d9fd667733605fb0e71f4c9989bc2cba70efd25f76a280f9f4458d33ec9843de5b3bf1b
7
- data.tar.gz: b196bc3f3775358a6d36c5358f073f7d7b3d86d30e6004c60d18552247349e0d57f26e76a8766880fe23dec702e19b07118aa56e3c1b870cac0c3d7a5d4a23bc
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.9'
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"
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.9
4
+ version: 0.1.10
5
5
  platform: java
6
6
  authors:
7
7
  - Jeremy Frandon