Sha256: 183eccc3d7d953d16b074f7969b608c2c99deffc439e5b63520e1c75d07b28ba

Contents?: true

Size: 764 Bytes

Versions: 40

Compression:

Stored size: 764 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

40 entries across 40 versions & 1 rubygems

Version Path
awspec-0.26.2 lib/awspec/helper/finder/lambda.rb
awspec-0.26.1 lib/awspec/helper/finder/lambda.rb
awspec-0.26.0 lib/awspec/helper/finder/lambda.rb
awspec-0.25.3 lib/awspec/helper/finder/lambda.rb
awspec-0.25.2 lib/awspec/helper/finder/lambda.rb
awspec-0.25.1 lib/awspec/helper/finder/lambda.rb
awspec-0.25.0 lib/awspec/helper/finder/lambda.rb
awspec-0.24.2 lib/awspec/helper/finder/lambda.rb
awspec-0.24.1 lib/awspec/helper/finder/lambda.rb
awspec-0.24.0 lib/awspec/helper/finder/lambda.rb
awspec-0.23.0 lib/awspec/helper/finder/lambda.rb
awspec-0.22.1 lib/awspec/helper/finder/lambda.rb
awspec-0.22.0 lib/awspec/helper/finder/lambda.rb
awspec-0.21.6 lib/awspec/helper/finder/lambda.rb
awspec-0.21.5 lib/awspec/helper/finder/lambda.rb
awspec-0.21.4 lib/awspec/helper/finder/lambda.rb
awspec-0.21.3 lib/awspec/helper/finder/lambda.rb
awspec-0.21.2 lib/awspec/helper/finder/lambda.rb
awspec-0.21.1 lib/awspec/helper/finder/lambda.rb
awspec-0.21.0 lib/awspec/helper/finder/lambda.rb