Module: MovableInk::AWS::Lambda
- Included in:
- MovableInk::AWS
- Defined in:
- lib/movable_ink/aws/lambda.rb
Instance Method Summary collapse
- #disable_autoscaling_lambda(function_name) ⇒ Object
- #enable_autoscaling_lambda(function_name) ⇒ Object
- #lambda(region: 'us-east-1') ⇒ Object
Instance Method Details
#disable_autoscaling_lambda(function_name) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/movable_ink/aws/lambda.rb', line 11 def disable_autoscaling_lambda(function_name) lambda.update_function_configuration({ function_name: function_name, environment: { variables: { "DRY_RUN" => "true", } } }) end |
#enable_autoscaling_lambda(function_name) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/movable_ink/aws/lambda.rb', line 22 def enable_autoscaling_lambda(function_name) lambda.update_function_configuration({ function_name: function_name, environment: { variables: { "DRY_RUN" => "false", } } }) end |
#lambda(region: 'us-east-1') ⇒ Object
6 7 8 9 |
# File 'lib/movable_ink/aws/lambda.rb', line 6 def lambda(region: 'us-east-1') @lambda_client ||= {} @lambda_client[region] ||= Aws::Lambda::Client.new(region: region) end |