Sha256: 8a4c18321f35251f7527758dfe884e36e4c18e937ed5ea14cd59634abed930e7
Contents?: true
Size: 760 Bytes
Versions: 10
Compression:
Stored size: 760 Bytes
Contents
module Awspec::Helper module Finder module Lambda def find_lambda(id) selected = [] res = lambda_client.list_functions loop do selected += res.functions.select do |function| function.function_name == id || function.function_arn == id end (res.next_page? && res = res.next_page) || break end selected.first if selected.count == 1 end def select_event_source_by_function_arn(function_arn) res = lambda_client.list_event_source_mappings({ function_name: function_arn }) res[:event_source_mappings] end end end end
Version data entries
10 entries across 10 versions & 1 rubygems