github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/website/source/docs/providers/aws/r/lambda_event_source_mapping.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_lambda_event_source_mapping"
     4  sidebar_current: "docs-aws-resource-aws-lambda-event-source-mapping"
     5  description: |-
     6    Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis and DynamoDB.
     7  ---
     8  
     9  # aws\_lambda\_event\_source\_mapping
    10  
    11  Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis and DynamoDB.
    12  
    13  For information about Lambda and how to use it, see [What is AWS Lambda?][1]
    14  For information about event source mappings, see [CreateEventSourceMapping][2] in the API docs.
    15  
    16  ## Example Usage
    17  
    18  ```
    19  resource "aws_lambda_event_source_mapping" "event_source_mapping" {
    20      batch_size = 100
    21      event_source_arn = "arn:aws:kinesis:REGION:123456789012:stream/stream_name"
    22      enabled = true
    23      function_name = "arn:aws:lambda:REGION:123456789012:function:function_name"
    24      starting_position = "TRIM_HORIZON|LATEST"
    25  }
    26  ```
    27  
    28  ## Argument Reference
    29  
    30  * `batch_size` - (Optional) The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to `100`.
    31  * `event_source_arn` - (Required) The event source ARN - can either be a Kinesis or DynamoDB stream.
    32  * `enabled` - (Optional) Determines if the mapping will be enabled on creation. Defaults to `true`.
    33  * `function_name` - (Required) The name or the ARN of the Lambda function that will be subscribing to events.
    34  * `starting_position` - (Required) The position in the stream where AWS Lambda should start reading. Can be one of either `TRIM_HORIZON` or `LATEST`.
    35  
    36  ## Attributes Reference
    37  
    38  * `function_arn` - The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from `function_name` above.)
    39  * `last_modified` - The date this resource was last modified.
    40  * `last_processing_result` - The result of the last AWS Lambda invocation of your Lambda function.
    41  * `state` - The state of the event source mapping.
    42  * `state_transition_reason` - The reason the event source mapping is in its current state.
    43  * `uuid` - The UUID of the created event source mapping.
    44  
    45  
    46  [1]: http://docs.aws.amazon.com/lambda/latest/dg/welcome.html
    47  [2]: http://docs.aws.amazon.com/lambda/latest/dg/API_CreateEventSourceMapping.html