istox 0.1.157.11.1 → 0.1.157.11.2

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: 9f27c050ff47aa360eb7fc2c431d64ece017c5cb7ae43bfb47b2fe08319afa19
4
- data.tar.gz: 6b986f010736efb42d1c26fe069ff257eb2465943c522885de5f2197f84823ff
3
+ metadata.gz: 54ed9bcff5c0cf4fac36db3d932688509800043f0841bb38f60495c923039912
4
+ data.tar.gz: 4a7375a044969a37152bb06e20725dd82ad841e523913a08dc23822c27a64ba2
5
5
  SHA512:
6
- metadata.gz: 350c1bed91bbc4666e6d4a03008f5c0d1af97226583164247e270d8fde94276d43aca61db5f54a4c8aaad9694471474e79c425a10a00266f91b8e60c754e211a
7
- data.tar.gz: f9eaa41ba50c0c2579a995145ea30121a66fe4778d2e27efa7e58230b7d8b22a9cac73d148f10ec3fe6f982b629cc7a96f49f36ea000c1dc9fa36a78183cda9f
6
+ metadata.gz: 9c2b012d97b4d5e29ea5516acb70645cf69a998d761cb11dcb15f9f93dcc751ced67f23bf9d9ac8064ee544559488023d83e4f534c3de9c2cc4612939fd4806d
7
+ data.tar.gz: c87a1c4b5a5ed11f7cf1fe3fda3871ff69a09286b79b2523fade5bed4be87ef8d3c332eb2c87cbffad97f2caef727dda94260dc68e6654b2135651f6b020726e
@@ -28,8 +28,15 @@ module Istox
28
28
  def sns_client
29
29
  return @sns_client if @sns_client.present?
30
30
 
31
- Aws.config.update(region: ENV.fetch('AWS_REGION', 'ap-southeast-1'),
32
- credentials: Aws::Credentials.new(ENV.fetch('AWS_STS_ACCESS_KEY_ID', nil), ENV.fetch('AWS_STS_SECRET_ACCESS_KEY', nil)))
31
+ access_key = ENV.fetch('AWS_STS_ACCESS_KEY_ID', nil)
32
+
33
+ if access_key.present?
34
+ credentials = Aws::Credentials.new(ENV.fetch('AWS_STS_ACCESS_KEY_ID', nil), ENV.fetch('AWS_STS_SECRET_ACCESS_KEY', nil))
35
+ Aws.config.update(region: ENV.fetch('AWS_REGION', 'ap-southeast-1'),
36
+ credentials: credentials)
37
+ else
38
+ Aws.config.update(region: ENV.fetch('AWS_REGION', 'ap-southeast-1'))
39
+ end
33
40
 
34
41
  @sns_client = Aws::SNS::Client.new(region: ENV.fetch('AWS_REGION', 'ap-southeast-1'))
35
42
  end
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.157.11.1'.freeze
2
+ VERSION = '0.1.157.11.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.157.11.1
4
+ version: 0.1.157.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng