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 +4 -4
- data/lib/istox/helpers/sns_publisher.rb +9 -2
- data/lib/istox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54ed9bcff5c0cf4fac36db3d932688509800043f0841bb38f60495c923039912
|
4
|
+
data.tar.gz: 4a7375a044969a37152bb06e20725dd82ad841e523913a08dc23822c27a64ba2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
32
|
-
|
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
|
data/lib/istox/version.rb
CHANGED