Sha256: 13f84d7038c0927b9716e0786d029b71c0063d609cf99cb183364ad6d7df4ed8
Contents?: true
Size: 1.06 KB
Versions: 14
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true 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 break if res.next_marker.nil? res = lambda_client.list_functions({ marker: res.next_marker }) end selected.single_resource(id) 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 def select_all_lambda_functions lambda_client.list_functions.map do |response| response.functions end.flatten end end end end
Version data entries
14 entries across 14 versions & 1 rubygems