2019/08/29 - AWS Lambda - 5 updated api methods
Changes Update lambda client to latest version
{'MaximumBatchingWindowInSeconds': 'integer'}
Creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.
For details about each event source type, see the following topics.
See also: AWS API Documentation
Request Syntax
client.create_event_source_mapping( EventSourceArn='string', FunctionName='string', Enabled=True|False, BatchSize=123, MaximumBatchingWindowInSeconds=123, StartingPosition='TRIM_HORIZON'|'LATEST'|'AT_TIMESTAMP', StartingPositionTimestamp=datetime(2015, 1, 1) )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the event source.
Amazon Kinesis - The ARN of the data stream or a stream consumer.
Amazon DynamoDB Streams - The ARN of the stream.
Amazon Simple Queue Service - The ARN of the queue.
string
[REQUIRED]
The name of the Lambda function.
Name formats
Function name - MyFunction.
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.
Partial ARN - 123456789012:function:MyFunction.
The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
boolean
Disables the event source mapping to pause polling and invocation.
integer
The maximum number of items to retrieve in a single batch.
Amazon Kinesis - Default 100. Max 10,000.
Amazon DynamoDB Streams - Default 100. Max 1,000.
Amazon Simple Queue Service - Default 10. Max 10.
integer
string
The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Streams sources. AT_TIMESTAMP is only supported for Amazon Kinesis streams.
datetime
With StartingPosition set to AT_TIMESTAMP, the time from which to start reading.
dict
Response Syntax
{ 'UUID': 'string', 'BatchSize': 123, 'MaximumBatchingWindowInSeconds': 123, 'EventSourceArn': 'string', 'FunctionArn': 'string', 'LastModified': datetime(2015, 1, 1), 'LastProcessingResult': 'string', 'State': 'string', 'StateTransitionReason': 'string' }
Response Structure
(dict) --
A mapping between an AWS resource and an AWS Lambda function. See CreateEventSourceMapping for details.
UUID (string) --
The identifier of the event source mapping.
BatchSize (integer) --
The maximum number of items to retrieve in a single batch.
MaximumBatchingWindowInSeconds (integer) --
EventSourceArn (string) --
The Amazon Resource Name (ARN) of the event source.
FunctionArn (string) --
The ARN of the Lambda function.
LastModified (datetime) --
The date that the event source mapping was last updated.
LastProcessingResult (string) --
The result of the last AWS Lambda invocation of your Lambda function.
State (string) --
The state of the event source mapping. It can be one of the following: Creating, Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.
StateTransitionReason (string) --
The cause of the last state change, either User initiated or Lambda initiated.
{'MaximumBatchingWindowInSeconds': 'integer'}
Deletes an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.
See also: AWS API Documentation
Request Syntax
client.delete_event_source_mapping( UUID='string' )
string
[REQUIRED]
The identifier of the event source mapping.
dict
Response Syntax
{ 'UUID': 'string', 'BatchSize': 123, 'MaximumBatchingWindowInSeconds': 123, 'EventSourceArn': 'string', 'FunctionArn': 'string', 'LastModified': datetime(2015, 1, 1), 'LastProcessingResult': 'string', 'State': 'string', 'StateTransitionReason': 'string' }
Response Structure
(dict) --
A mapping between an AWS resource and an AWS Lambda function. See CreateEventSourceMapping for details.
UUID (string) --
The identifier of the event source mapping.
BatchSize (integer) --
The maximum number of items to retrieve in a single batch.
MaximumBatchingWindowInSeconds (integer) --
EventSourceArn (string) --
The Amazon Resource Name (ARN) of the event source.
FunctionArn (string) --
The ARN of the Lambda function.
LastModified (datetime) --
The date that the event source mapping was last updated.
LastProcessingResult (string) --
The result of the last AWS Lambda invocation of your Lambda function.
State (string) --
The state of the event source mapping. It can be one of the following: Creating, Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.
StateTransitionReason (string) --
The cause of the last state change, either User initiated or Lambda initiated.
{'MaximumBatchingWindowInSeconds': 'integer'}
Returns details about an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.
See also: AWS API Documentation
Request Syntax
client.get_event_source_mapping( UUID='string' )
string
[REQUIRED]
The identifier of the event source mapping.
dict
Response Syntax
{ 'UUID': 'string', 'BatchSize': 123, 'MaximumBatchingWindowInSeconds': 123, 'EventSourceArn': 'string', 'FunctionArn': 'string', 'LastModified': datetime(2015, 1, 1), 'LastProcessingResult': 'string', 'State': 'string', 'StateTransitionReason': 'string' }
Response Structure
(dict) --
A mapping between an AWS resource and an AWS Lambda function. See CreateEventSourceMapping for details.
UUID (string) --
The identifier of the event source mapping.
BatchSize (integer) --
The maximum number of items to retrieve in a single batch.
MaximumBatchingWindowInSeconds (integer) --
EventSourceArn (string) --
The Amazon Resource Name (ARN) of the event source.
FunctionArn (string) --
The ARN of the Lambda function.
LastModified (datetime) --
The date that the event source mapping was last updated.
LastProcessingResult (string) --
The result of the last AWS Lambda invocation of your Lambda function.
State (string) --
The state of the event source mapping. It can be one of the following: Creating, Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.
StateTransitionReason (string) --
The cause of the last state change, either User initiated or Lambda initiated.
{'EventSourceMappings': {'MaximumBatchingWindowInSeconds': 'integer'}}
Lists event source mappings. Specify an EventSourceArn to only show event source mappings for a single event source.
See also: AWS API Documentation
Request Syntax
client.list_event_source_mappings( EventSourceArn='string', FunctionName='string', Marker='string', MaxItems=123 )
string
The Amazon Resource Name (ARN) of the event source.
Amazon Kinesis - The ARN of the data stream or a stream consumer.
Amazon DynamoDB Streams - The ARN of the stream.
Amazon Simple Queue Service - The ARN of the queue.
string
The name of the Lambda function.
Name formats
Function name - MyFunction.
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.
Partial ARN - 123456789012:function:MyFunction.
The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
string
A pagination token returned by a previous call.
integer
The maximum number of event source mappings to return.
dict
Response Syntax
{ 'NextMarker': 'string', 'EventSourceMappings': [ { 'UUID': 'string', 'BatchSize': 123, 'MaximumBatchingWindowInSeconds': 123, 'EventSourceArn': 'string', 'FunctionArn': 'string', 'LastModified': datetime(2015, 1, 1), 'LastProcessingResult': 'string', 'State': 'string', 'StateTransitionReason': 'string' }, ] }
Response Structure
(dict) --
NextMarker (string) --
A pagination token that's returned when the response doesn't contain all event source mappings.
EventSourceMappings (list) --
A list of event source mappings.
(dict) --
A mapping between an AWS resource and an AWS Lambda function. See CreateEventSourceMapping for details.
UUID (string) --
The identifier of the event source mapping.
BatchSize (integer) --
The maximum number of items to retrieve in a single batch.
MaximumBatchingWindowInSeconds (integer) --
EventSourceArn (string) --
The Amazon Resource Name (ARN) of the event source.
FunctionArn (string) --
The ARN of the Lambda function.
LastModified (datetime) --
The date that the event source mapping was last updated.
LastProcessingResult (string) --
The result of the last AWS Lambda invocation of your Lambda function.
State (string) --
The state of the event source mapping. It can be one of the following: Creating, Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.
StateTransitionReason (string) --
The cause of the last state change, either User initiated or Lambda initiated.
{'MaximumBatchingWindowInSeconds': 'integer'}
Updates an event source mapping. You can change the function that AWS Lambda invokes, or pause invocation and resume later from the same location.
See also: AWS API Documentation
Request Syntax
client.update_event_source_mapping( UUID='string', FunctionName='string', Enabled=True|False, BatchSize=123, MaximumBatchingWindowInSeconds=123 )
string
[REQUIRED]
The identifier of the event source mapping.
string
The name of the Lambda function.
Name formats
Function name - MyFunction.
Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.
Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.
Partial ARN - 123456789012:function:MyFunction.
The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
boolean
Disables the event source mapping to pause polling and invocation.
integer
The maximum number of items to retrieve in a single batch.
Amazon Kinesis - Default 100. Max 10,000.
Amazon DynamoDB Streams - Default 100. Max 1,000.
Amazon Simple Queue Service - Default 10. Max 10.
integer
dict
Response Syntax
{ 'UUID': 'string', 'BatchSize': 123, 'MaximumBatchingWindowInSeconds': 123, 'EventSourceArn': 'string', 'FunctionArn': 'string', 'LastModified': datetime(2015, 1, 1), 'LastProcessingResult': 'string', 'State': 'string', 'StateTransitionReason': 'string' }
Response Structure
(dict) --
A mapping between an AWS resource and an AWS Lambda function. See CreateEventSourceMapping for details.
UUID (string) --
The identifier of the event source mapping.
BatchSize (integer) --
The maximum number of items to retrieve in a single batch.
MaximumBatchingWindowInSeconds (integer) --
EventSourceArn (string) --
The Amazon Resource Name (ARN) of the event source.
FunctionArn (string) --
The ARN of the Lambda function.
LastModified (datetime) --
The date that the event source mapping was last updated.
LastProcessingResult (string) --
The result of the last AWS Lambda invocation of your Lambda function.
State (string) --
The state of the event source mapping. It can be one of the following: Creating, Enabling, Enabled, Disabling, Disabled, Updating, or Deleting.
StateTransitionReason (string) --
The cause of the last state change, either User initiated or Lambda initiated.