CfnEventInvokeConfigPropsMixin

class aws_cdk.mixins_preview.aws_lambda.mixins.CfnEventInvokeConfigPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Lambda::EventInvokeConfig resource configures options for asynchronous invocation on a version or an alias.

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html

CloudformationResource:

AWS::Lambda::EventInvokeConfig

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins

cfn_event_invoke_config_props_mixin = lambda_mixins.CfnEventInvokeConfigPropsMixin(lambda_mixins.CfnEventInvokeConfigMixinProps(
    destination_config=lambda_mixins.CfnEventInvokeConfigPropsMixin.DestinationConfigProperty(
        on_failure=lambda_mixins.CfnEventInvokeConfigPropsMixin.OnFailureProperty(
            destination="destination"
        ),
        on_success=lambda_mixins.CfnEventInvokeConfigPropsMixin.OnSuccessProperty(
            destination="destination"
        )
    ),
    function_name="functionName",
    maximum_event_age_in_seconds=123,
    maximum_retry_attempts=123,
    qualifier="qualifier"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Lambda::EventInvokeConfig.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['destinationConfig', 'functionName', 'maximumEventAgeInSeconds', 'maximumRetryAttempts', 'qualifier']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

DestinationConfigProperty

class CfnEventInvokeConfigPropsMixin.DestinationConfigProperty(*, on_failure=None, on_success=None)

Bases: object

A configuration object that specifies the destination of an event after Lambda processes it.

For more information, see Adding a destination .

Parameters:
  • on_failure (Union[IResolvable, OnFailureProperty, Dict[str, Any], None]) – The destination configuration for failed invocations. .. epigraph:: When using an Amazon SQS queue as a destination, FIFO queues cannot be used.

  • on_success (Union[IResolvable, OnSuccessProperty, Dict[str, Any], None]) – The destination configuration for successful invocations. .. epigraph:: When using an Amazon SQS queue as a destination, FIFO queues cannot be used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins

destination_config_property = lambda_mixins.CfnEventInvokeConfigPropsMixin.DestinationConfigProperty(
    on_failure=lambda_mixins.CfnEventInvokeConfigPropsMixin.OnFailureProperty(
        destination="destination"
    ),
    on_success=lambda_mixins.CfnEventInvokeConfigPropsMixin.OnSuccessProperty(
        destination="destination"
    )
)

Attributes

on_failure

The destination configuration for failed invocations.

When using an Amazon SQS queue as a destination, FIFO queues cannot be used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig-onfailure

on_success

The destination configuration for successful invocations.

When using an Amazon SQS queue as a destination, FIFO queues cannot be used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig-onsuccess

OnFailureProperty

class CfnEventInvokeConfigPropsMixin.OnFailureProperty(*, destination=None)

Bases: object

A destination for events that failed processing.

For more information, see Adding a destination .

Parameters:

destination (Optional[str]) –

The Amazon Resource Name (ARN) of the destination resource. To retain records of failed invocations from Kinesis , DynamoDB , self-managed Apache Kafka , or Amazon MSK , you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, or Kafka topic as the destination. .. epigraph:: Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending OnFailure event to the destination. For details on this behavior, refer to Retaining records of asynchronous invocations . To retain records of failed invocations from Kinesis , DynamoDB , self-managed Kafka or Amazon MSK , you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-onfailure.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins

on_failure_property = lambda_mixins.CfnEventInvokeConfigPropsMixin.OnFailureProperty(
    destination="destination"
)

Attributes

destination

The Amazon Resource Name (ARN) of the destination resource.

To retain records of failed invocations from Kinesis , DynamoDB , self-managed Apache Kafka , or Amazon MSK , you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, or Kafka topic as the destination. .. epigraph:

Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending ``OnFailure`` event to the destination. For details on this behavior, refer to `Retaining records of asynchronous invocations <https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html>`_ .

To retain records of failed invocations from Kinesis , DynamoDB , self-managed Kafka or Amazon MSK , you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-onfailure.html#cfn-lambda-eventinvokeconfig-onfailure-destination

OnSuccessProperty

class CfnEventInvokeConfigPropsMixin.OnSuccessProperty(*, destination=None)

Bases: object

A destination for events that were processed successfully.

To retain records of successful asynchronous invocations , you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function, or Amazon EventBridge event bus as the destination. .. epigraph:

``OnSuccess`` is not supported in ``CreateEventSourceMapping`` or ``UpdateEventSourceMapping`` requests.
Parameters:

destination (Optional[str]) –

The Amazon Resource Name (ARN) of the destination resource. .. epigraph:: Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending OnFailure event to the destination. For details on this behavior, refer to Retaining records of asynchronous invocations .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-onsuccess.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_lambda import mixins as lambda_mixins

on_success_property = lambda_mixins.CfnEventInvokeConfigPropsMixin.OnSuccessProperty(
    destination="destination"
)

Attributes

destination

The Amazon Resource Name (ARN) of the destination resource.

Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending OnFailure event to the destination. For details on this behavior, refer to Retaining records of asynchronous invocations .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-onsuccess.html#cfn-lambda-eventinvokeconfig-onsuccess-destination