Safe Haskell | None |
---|---|
Language | Haskell2010 |
Identifies an Amazon Kinesis stream as the event source for an AWS Lambda function. AWS Lambda invokes the specified function when records are posted to the stream.
This is the pull model, where AWS Lambda invokes the function. For more information, go to AWS LambdaL How it Works in the AWS Lambda Developer Guide.
This association between an Amazon Kinesis stream and an AWS Lambda function is called the event source mapping. You provide the configuration information (for example, which stream to read from and which AWS Lambda function to invoke) for the event source mapping in the request body.
This operation requires permission for the 'iam:PassRole' action for the IAM role. It also requires permission for the 'lambda:AddEventSource' action.
http://docs.aws.amazon.com/lambda/latest/dg/API_AddEventSource.html
- data AddEventSource
- addEventSource :: Text -> Text -> Text -> AddEventSource
- aesBatchSize :: Lens' AddEventSource (Maybe Int)
- aesEventSource :: Lens' AddEventSource Text
- aesFunctionName :: Lens' AddEventSource Text
- aesParameters :: Lens' AddEventSource (HashMap Text Text)
- aesRole :: Lens' AddEventSource Text
- data AddEventSourceResponse
- addEventSourceResponse :: AddEventSourceResponse
- aesrBatchSize :: Lens' AddEventSourceResponse (Maybe Int)
- aesrEventSource :: Lens' AddEventSourceResponse (Maybe Text)
- aesrFunctionName :: Lens' AddEventSourceResponse (Maybe Text)
- aesrIsActive :: Lens' AddEventSourceResponse (Maybe Bool)
- aesrLastModified :: Lens' AddEventSourceResponse (Maybe UTCTime)
- aesrParameters :: Lens' AddEventSourceResponse (HashMap Text Text)
- aesrRole :: Lens' AddEventSourceResponse (Maybe Text)
- aesrStatus :: Lens' AddEventSourceResponse (Maybe Text)
- aesrUUID :: Lens' AddEventSourceResponse (Maybe Text)
Request
data AddEventSource Source
Request constructor
AddEventSource
constructor.
The fields accessible through corresponding lenses are:
Request lenses
aesBatchSize :: Lens' AddEventSource (Maybe Int) Source
The largest number of records that AWS Lambda will give to your function in a single event. The default is 100 records.
aesEventSource :: Lens' AddEventSource Text Source
The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the event source. Any record added to this stream causes AWS Lambda to invoke your Lambda function. AWS Lambda POSTs the Amazon Kinesis event, containing records, to your Lambda function as JSON.
aesFunctionName :: Lens' AddEventSource Text Source
The Lambda function to invoke when AWS Lambda detects an event on the stream.
aesParameters :: Lens' AddEventSource (HashMap Text Text) Source
A map (key-value pairs) defining the configuration for AWS Lambda to use when
reading the event source. Currently, AWS Lambda supports only the InitialPositionInStream
key. The valid values are: TRIM_HORIZON and LATEST. The default value is
TRIM_HORIZON. For more information, go to ShardIteratorType in the Amazon
Kinesis Service API Reference.
aesRole :: Lens' AddEventSource Text Source
The ARN of the IAM role (invocation role) that AWS Lambda can assume to read from the stream and invoke the function.
Response
Response constructor
addEventSourceResponse :: AddEventSourceResponse Source
AddEventSourceResponse
constructor.
The fields accessible through corresponding lenses are:
Response lenses
aesrBatchSize :: Lens' AddEventSourceResponse (Maybe Int) Source
The largest number of records that AWS Lambda will POST in the invocation request to your function.
aesrEventSource :: Lens' AddEventSourceResponse (Maybe Text) Source
The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the source of events.
aesrFunctionName :: Lens' AddEventSourceResponse (Maybe Text) Source
The Lambda function to invoke when AWS Lambda detects an event on the stream.
aesrIsActive :: Lens' AddEventSourceResponse (Maybe Bool) Source
Indicates whether the event source mapping is currently honored. Events are only processes if IsActive is true.
aesrLastModified :: Lens' AddEventSourceResponse (Maybe UTCTime) Source
The UTC time string indicating the last time the event mapping was updated.
aesrParameters :: Lens' AddEventSourceResponse (HashMap Text Text) Source
The map (key-value pairs) defining the configuration for AWS Lambda to use when reading the event source.
aesrRole :: Lens' AddEventSourceResponse (Maybe Text) Source
The ARN of the IAM role (invocation role) that AWS Lambda can assume to read from the stream and invoke the function.