Skip to content

Commit

Permalink
Function name as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolabogetic committed Sep 7, 2023
1 parent 767fd2a commit d94504d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/movable_ink/aws/lambda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ def lambda(region: 'us-east-1')
@lambda_client[region] ||= Aws::Lambda::Client.new(region: region)
end

def disable_autoscaling_lambda
function_name = 'autoscaling-scheduled-capacity-production-cleanup'

def disable_autoscaling_lambda(function_name)
lambda.update_function_configuration({
function_name: function_name,
environment: {
Expand All @@ -21,9 +19,7 @@ def disable_autoscaling_lambda
})
end

def enable_autoscaling_lambda
function_name = 'autoscaling-scheduled-capacity-production-cleanup'

def enable_autoscaling_lambda(function_name)
lambda.update_function_configuration({
function_name: function_name,
environment: {
Expand Down

0 comments on commit d94504d

Please sign in to comment.