Module: Shrine::Plugins::Lambda::ClassMethods
- Defined in:
- lib/shrine/plugins/shrine-lambda.rb
Instance Method Summary collapse
-
#lambda_client(access_key_id: , secret_access_key: , region: , **args) ⇒ Object
Creates a new AWS Lambda client.
-
#lambda_function_list(master_region: nil, function_version: 'ALL', marker: nil, items: 100, force: false) ⇒ Object
Memoize and returns a list of your Lambda functions.
Instance Method Details
#lambda_client(access_key_id: , secret_access_key: , region: , **args) ⇒ Object
Creates a new AWS Lambda client
234 235 236 237 238 239 240 241 |
# File 'lib/shrine/plugins/shrine-lambda.rb', line 234 def lambda_client(access_key_id: opts[:access_key_id], secret_access_key: opts[:secret_access_key], region: opts[:region], **args) Aws::Lambda::Client.new(args.merge!(access_key_id: access_key_id, secret_access_key: secret_access_key, region: region)) end |
#lambda_function_list(master_region: nil, function_version: 'ALL', marker: nil, items: 100, force: false) ⇒ Object
Memoize and returns a list of your Lambda functions. For each function, the response includes the function configuration information.
248 249 250 251 252 253 254 255 256 |
# File 'lib/shrine/plugins/shrine-lambda.rb', line 248 def lambda_function_list(master_region: nil, function_version: 'ALL', marker: nil, items: 100, force: false) fl = opts[:lambda_function_list] return fl unless force || fl.nil? || fl.empty? opts[:lambda_function_list] = lambda_client.list_functions(master_region: master_region, function_version: function_version, marker: marker, max_items: items).functions end |