Sha256: f2288b79aa09d77e65bef4a896fa818500d1d25a8c9691e76ce763387ebc04d9

Contents?: true

Size: 993 Bytes

Versions: 136

Compression:

Stored size: 993 Bytes

Contents

# Note the Lambda function timeout must be less than or equal to the sqs queue default timeout.
module Jets::Resource::Lambda
  class EventSourceMapping < Jets::Resource::Base
    def initialize(props={})
      @props = props # associated_properties from dsl.rb
    end

    def definition
      # CloudFormation Docs: https://amzn.to/2WM6165
      properties = {
        # batch_size: 10, # Defaults: Kinesis 100, DynamoDB Streams: 100, SQS: 10
        # enabled: boolean,
        # event_source_arn: string, # required
        function_name: "!Ref {namespace}LambdaFunction",
        # starting_position: string # reqiured for Required for Amazon Kinesis and Amazon DynamoDB Streams sources
      }
      properties.merge!(@props)

      {
        event_source_mapping_logical_id => {
          type: "AWS::Lambda::EventSourceMapping",
          properties: properties
        }
      }
    end

    def event_source_mapping_logical_id
      "{namespace}EventSourceMapping"
    end
  end
end

Version data entries

136 entries across 136 versions & 3 rubygems

Version Path
jets-4.0.12 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.11 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.10 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.9 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.8 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.7 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.6 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.5 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.4 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.3 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.2 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.1 lib/jets/resource/lambda/event_source_mapping.rb
jets-4.0.0 lib/jets/resource/lambda/event_source_mapping.rb
jets-3.2.2 lib/jets/resource/lambda/event_source_mapping.rb
jets-3.2.1 lib/jets/resource/lambda/event_source_mapping.rb
jets.benforeva-3.0.17.pre.mount.pre.fix lib/jets/resource/lambda/event_source_mapping.rb
jets-3.2.0 lib/jets/resource/lambda/event_source_mapping.rb
jets-3.1.5 lib/jets/resource/lambda/event_source_mapping.rb
jets-3.1.4 lib/jets/resource/lambda/event_source_mapping.rb
jets-3.1.3 lib/jets/resource/lambda/event_source_mapping.rb