MovableInkAWS 2.8.5 → 2.8.6

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: a3ab8d344b1600f1fd9cd739958ffd34069a2114daf77c88554638b0599f9423
4
- data.tar.gz: 41c97068a8c8e06652f4ae366554fe45caeeef0b59cc6e4711dcef9a3ba5a57f
3
+ metadata.gz: f8d52d8ec5295f793b12e672cbbba250e82d1cd71df33780da70d10f3e3dc14d
4
+ data.tar.gz: 41fabe79fefa2b283d28006f656cfb9b43c40e75ed7f8a4c1c9dade4e614c64f
5
5
  SHA512:
6
- metadata.gz: c74d277fc52a597c30e2e3e860d078a9bba892424933404aaf68eec673a55f3140b09d6259d55ec9d59fcf3351574dcc1e21c2645eb5ea4760662c00e268b523
7
- data.tar.gz: a84acccf090af202b1223df79c12a3a1e181a9091df42e2268fd8d128181e68c1d61367457c25d30557ca600259639be5d3a2ac4dfc25b85a31fd4c3666d8001
6
+ metadata.gz: ab53428f6ff406bfd94f3acdb86510ba872ca3f3843f10ea2bbc1482919cbadbfa06d1077941f9b1b52f87eed52c3d8b8115ae7f42fb1e856bb1626d8417423e
7
+ data.tar.gz: 32270cef8a5dbcb1eab64dd52f2c101cb3b2e317e07915d12e8fdd20b5fa0eb4ab09b49c355d1955241605a50ba8445f43f978f147bf09b1ba63751dc6035200
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- MovableInkAWS (2.8.5)
4
+ MovableInkAWS (2.8.6)
5
5
  aws-sdk-athena (~> 1)
6
6
  aws-sdk-autoscaling (~> 1)
7
7
  aws-sdk-cloudwatch (~> 1)
@@ -10,6 +10,7 @@ PATH
10
10
  aws-sdk-eks (~> 1)
11
11
  aws-sdk-elasticache (~> 1)
12
12
  aws-sdk-iam (~> 1)
13
+ aws-sdk-lambda (~> 1)
13
14
  aws-sdk-rds (~> 1)
14
15
  aws-sdk-route53 (~> 1)
15
16
  aws-sdk-s3 (~> 1)
@@ -55,6 +56,9 @@ GEM
55
56
  aws-sdk-kms (1.62.0)
56
57
  aws-sdk-core (~> 3, >= 3.165.0)
57
58
  aws-sigv4 (~> 1.1)
59
+ aws-sdk-lambda (1.96.0)
60
+ aws-sdk-core (~> 3, >= 3.165.0)
61
+ aws-sigv4 (~> 1.1)
58
62
  aws-sdk-rds (1.171.0)
59
63
  aws-sdk-core (~> 3, >= 3.165.0)
60
64
  aws-sigv4 (~> 1.1)
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.add_runtime_dependency 'aws-sdk-eks', '~> 1'
18
18
  s.add_runtime_dependency 'aws-sdk-elasticache', '~> 1'
19
19
  s.add_runtime_dependency 'aws-sdk-iam', '~> 1'
20
+ s.add_runtime_dependency 'aws-sdk-lambda', '~> 1'
20
21
  s.add_runtime_dependency 'aws-sdk-rds', '~> 1'
21
22
  s.add_runtime_dependency 'aws-sdk-route53', '~> 1'
22
23
  s.add_runtime_dependency 'aws-sdk-s3', '~> 1'
@@ -0,0 +1,35 @@
1
+ require 'aws-sdk-lambda'
2
+
3
+ module MovableInk
4
+ class AWS
5
+ module Lambda
6
+ def lambda(region: 'us-east-1')
7
+ @lambda_client ||= {}
8
+ @lambda_client[region] ||= Aws::Lambda::Client.new(region: region)
9
+ end
10
+
11
+ def disable_autoscaling_lambda(function_name)
12
+ lambda.update_function_configuration({
13
+ function_name: function_name,
14
+ environment: {
15
+ variables: {
16
+ "DRY_RUN" => "true",
17
+ }
18
+ }
19
+ })
20
+ end
21
+
22
+ def enable_autoscaling_lambda(function_name)
23
+ lambda.update_function_configuration({
24
+ function_name: function_name,
25
+ environment: {
26
+ variables: {
27
+ "DRY_RUN" => "false",
28
+ }
29
+ }
30
+ })
31
+ end
32
+
33
+ end
34
+ end
35
+ end
@@ -11,6 +11,7 @@ require_relative 'aws/iam'
11
11
  require_relative 'aws/eks'
12
12
  require_relative 'aws/elasticache'
13
13
  require_relative 'aws/api_gateway'
14
+ require_relative 'aws/lambda'
14
15
  require_relative 'consul/consul'
15
16
  require 'aws-sdk-cloudwatch'
16
17
 
@@ -28,6 +29,7 @@ module MovableInk
28
29
  include ApiGateway
29
30
  include EKS
30
31
  include IAM
32
+ include Lambda
31
33
 
32
34
  class << self
33
35
  def regions
@@ -1,5 +1,5 @@
1
1
  module MovableInk
2
2
  class AWS
3
- VERSION = '2.8.5'
3
+ VERSION = '2.8.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: MovableInkAWS
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.5
4
+ version: 2.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - MI SRE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-15 00:00:00.000000000 Z
11
+ date: 2023-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '1'
125
+ - !ruby/object:Gem::Dependency
126
+ name: aws-sdk-lambda
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '1'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: aws-sdk-rds
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -256,6 +270,7 @@ files:
256
270
  - lib/movable_ink/aws/elasticache.rb
257
271
  - lib/movable_ink/aws/errors.rb
258
272
  - lib/movable_ink/aws/iam.rb
273
+ - lib/movable_ink/aws/lambda.rb
259
274
  - lib/movable_ink/aws/metadata.rb
260
275
  - lib/movable_ink/aws/route53.rb
261
276
  - lib/movable_ink/aws/s3.rb