Class: Client

Inherits:
Object
  • Object
show all
Defined in:
lib/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aws_region) ⇒ Client

Returns a new instance of Client.



4
5
6
# File 'lib/client.rb', line 4

def initialize(aws_region)
  @client = Aws::Lambda::Client.new(region: aws_region)
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



3
4
5
# File 'lib/client.rb', line 3

def client
  @client
end

Instance Method Details

#update_function_code(function_name, s3_bucket, s3_key) ⇒ Object



8
9
10
11
# File 'lib/client.rb', line 8

def update_function_code(function_name, s3_bucket, s3_key)
  response = client.update_function_code({function_name: function_name, s3_bucket: s3_bucket, s3_key: s3_key})
  puts "Updated: #{response.function_name}"
end