function_event_invoke_config#

State module for managing Lambda function asynchronous invocation configuration

async idem_aws.states.aws.lambda_aws.function_event_invoke_config.present(hub, ctx, name: str, function_name: str, resource_id: ~typing.Optional[str] = None, qualifier: ~typing.Optional[str] = None, maximum_retry_attempts: ~typing.Optional[int] = None, maximum_event_age_in_seconds: ~typing.Optional[int] = None, destination_config: ~typing.Optional[~types.A destination configuration for events after they have been sent to a function.DestinationConfigRequest] = None) Dict[str, Any][source]#

Configures options for asynchronous invocation on a function, version, or alias. If a configuration already exists for a function, version, or alias, this operation overwrites it. By default, Lambda retries an asynchronous invocation twice if the function returns an error. It retains events in a queue for up to six hours. When an event fails all processing attempts or stays in the asynchronous invocation queue for too long, Lambda discards it. To retain discarded events, configure a dead-letter queue. To send an invocation record to a queue, topic, function, or event bus, specify a destination. You can configure separate destinations for successful invocations (on-success) and events that fail all processing attempts (on-failure). You can configure destinations in addition to or instead of a dead-letter queue.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str, Optional) – The Amazon Resource Name (ARN) of the function. Defaults to None.

  • function_name (str) –

    The name of the Lambda function. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
    Name formats
    • Function name - my-function

    • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function

    • Partial ARN - 123456789012:function:my-function

  • qualifier (str, Optional) – A version number or alias name. Defaults to None.

  • maximum_retry_attempts (int, Optional) – The maximum number of times to retry when the function returns an error. Defaults to None.

  • maximum_event_age_in_seconds (int, Optional) – The maximum age of a request that Lambda sends to a function for processing. Defaults to None.

  • destination_config (Dict, Optional) –

    A destination for events after they have been sent to a function for processing.
    • (OnSuccess, Dict, Optional): The destination configuration for successful invocations.

    • (OnFailure, Dict, Optional): The destination configuration for failed invocations.

    Destinations
    • Function - The Amazon Resource Name (ARN) of a Lambda function.

    • Queue - The ARN of an SQS queue.

    • Topic - The ARN of an SNS topic.

    • Event Bus - The ARN of an Amazon EventBridge event bus. Defaults to None.

Returns:

Dict[str, Any]

Examples

function_event_invoke_config-01234672f3336db8:
  aws.lambda_aws.function_event_invoke_config.present:
    - name: value
    - function_name: value
async idem_aws.states.aws.lambda_aws.function_event_invoke_config.absent(hub, ctx, name: str, resource_id: Optional[str] = None) Dict[str, Any][source]#

Deletes the configuration for asynchronous invocation for a function, version, or alias.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str, Optional) – The Amazon Resource Name (ARN) of the function. Idem automatically considers this resource being absent if this field is not specified.

Returns:

Dict[str, Any]

Examples

function_event_invoke_config-01234672f3336db8:
  aws.lambda_aws.function_event_invoke_config.absent:
    - name: value
    - resource_id: value
async idem_aws.states.aws.lambda_aws.function_event_invoke_config.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Retrieves a list of configurations for asynchronous invocation for a function.

Returns:

Dict[str, Dict[str, Any]]

Examples

$ idem describe aws.lambda_aws.function_event_invoke_config