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

Version Path
awspec-0.33.0 lib/awspec/helper/finder/lambda.rb
awspec-0.32.0 lib/awspec/helper/finder/lambda.rb
awspec-0.31.0 lib/awspec/helper/finder/lambda.rb
awspec-0.30.0 lib/awspec/helper/finder/lambda.rb
awspec-0.29.0 lib/awspec/helper/finder/lambda.rb
awspec-0.28.1 lib/awspec/helper/finder/lambda.rb
awspec-0.28.0 lib/awspec/helper/finder/lambda.rb
awspec-0.27.2 lib/awspec/helper/finder/lambda.rb
awspec-0.27.1 lib/awspec/helper/finder/lambda.rb
awspec-0.27.0 lib/awspec/helper/finder/lambda.rb