amazonka-lambda-1.4.0: Amazon Lambda SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Lambda.UpdateEventSourceMapping

Contents

Description

You can update an event source mapping. This is useful if you want to change the parameters of the existing mapping without losing your position in the stream. You can change which function will receive the stream records, but to change the stream itself, you must create a new mapping.

If you are using the versioning feature, you can update the event source mapping to map to a specific Lambda function version or alias as described in the FunctionName parameter. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases.

If you disable the event source mapping, AWS Lambda stops polling. If you enable again, it will resume polling from the time it had stopped polling, so you don't lose processing of any records. However, if you delete event source mapping and create it again, it will reset.

This operation requires permission for the 'lambda:UpdateEventSourceMapping' action.

Synopsis

Creating a Request

updateEventSourceMapping Source

Creates a value of UpdateEventSourceMapping with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

uesmEnabled :: Lens' UpdateEventSourceMapping (Maybe Bool) Source

Specifies whether AWS Lambda should actively poll the stream or not. If disabled, AWS Lambda will not poll the stream.

uesmBatchSize :: Lens' UpdateEventSourceMapping (Maybe Natural) Source

The maximum number of stream records that can be sent to your Lambda function for a single invocation.

uesmFunctionName :: Lens' UpdateEventSourceMapping (Maybe Text) Source

The Lambda function to which you want the stream records sent.

You can specify a function name (for example, Thumbnail) or you can specify Amazon Resource Name (ARN) of the function (for example, 'arn:aws:lambda:us-west-2:account-id:function:ThumbNail'). AWS Lambda also allows you to specify a partial ARN (for example, 'account-id:Thumbnail').

If you are using versioning, you can also provide a qualified function ARN (ARN that is qualified with function version or alias name as suffix). For more information about versioning, see AWS Lambda Function Versioning and Aliases

Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 character in length.

uesmUUId :: Lens' UpdateEventSourceMapping Text Source

The event source mapping identifier.

Destructuring the Response

Response Lenses

esmcEventSourceARN :: Lens' EventSourceMappingConfiguration (Maybe Text) Source

The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the source of events.

esmcState :: Lens' EventSourceMappingConfiguration (Maybe Text) Source

The state of the event source mapping. It can be Creating, Enabled, Disabled, Enabling, Disabling, Updating, or Deleting.

esmcFunctionARN :: Lens' EventSourceMappingConfiguration (Maybe Text) Source

The Lambda function to invoke when AWS Lambda detects an event on the stream.

esmcUUId :: Lens' EventSourceMappingConfiguration (Maybe Text) Source

The AWS Lambda assigned opaque identifier for the mapping.

esmcLastProcessingResult :: Lens' EventSourceMappingConfiguration (Maybe Text) Source

The result of the last AWS Lambda invocation of your Lambda function.

esmcBatchSize :: Lens' EventSourceMappingConfiguration (Maybe Natural) Source

The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. Your function receives an event with all the retrieved records.

esmcStateTransitionReason :: Lens' EventSourceMappingConfiguration (Maybe Text) Source

The reason the event source mapping is in its current state. It is either user-requested or an AWS Lambda-initiated state transition.

esmcLastModified :: Lens' EventSourceMappingConfiguration (Maybe UTCTime) Source

The UTC time string indicating the last time the event mapping was updated.