Skip to content

LambdaInvokeOperation

Source code in docs_src/capo_s3_control/types/lambda_invoke_operation.py
class LambdaInvokeOperation(TypedDict, closed=True):
    function_arn: NotRequired[
        "capo_s3_control.types.function_arn_string.FunctionArnString"
    ]
    """<p>The Amazon Resource Name (ARN) for the Lambda function that the specified job will invoke on every object in the manifest.</p>"""
    invocation_schema_version: NotRequired[
        "capo_s3_control.types.non_empty_max_length64_string.NonEmptyMaxLength64String"
    ]
    """<p>Specifies the schema version for the payload that Batch Operations sends when invoking an Lambda function. Version <code>1.0</code> is the default. Version <code>2.0</code> is required when you use Batch Operations to invoke Lambda functions that act on directory buckets, or if you need to specify <code>UserArguments</code>. For more information, see <a href="https://aws.amazon.com/blogs/storage/automate-object-processing-in-amazon-s3-directory-buckets-with-s3-batch-operations-and-aws-lambda/">Automate object processing in Amazon S3 directory buckets with S3 Batch Operations and Lambda</a> in the <i>Amazon Web Services Storage Blog</i>.</p> <important> <p>Ensure that your Lambda function code expects <code>InvocationSchemaVersion</code> <b>2.0</b> and uses bucket name rather than bucket ARN. If the <code>InvocationSchemaVersion</code> does not match what your Lambda function expects, your function might not work as expected.</p> </important> <note> <p> <b>Directory buckets</b> - To initiate Amazon Web Services Lambda function to perform custom actions on objects in directory buckets, you must specify <code>2.0</code>.</p> </note>"""
    user_arguments: NotRequired["capo_s3_control.types.user_arguments.UserArguments"]
    """<p>Key-value pairs that are passed in the payload that Batch Operations sends when invoking an Lambda function. You must specify <code>InvocationSchemaVersion</code> <b>2.0</b> for <code>LambdaInvoke</code> operations that include <code>UserArguments</code>. For more information, see <a href="https://aws.amazon.com/blogs/storage/automate-object-processing-in-amazon-s3-directory-buckets-with-s3-batch-operations-and-aws-lambda/">Automate object processing in Amazon S3 directory buckets with S3 Batch Operations and Lambda</a> in the <i>Amazon Web Services Storage Blog</i>.</p>"""

function_arn instance-attribute

function_arn: NotRequired[FunctionArnString]

The Amazon Resource Name (ARN) for the Lambda function that the specified job will invoke on every object in the manifest.

invocation_schema_version instance-attribute

invocation_schema_version: NotRequired[NonEmptyMaxLength64String]

Specifies the schema version for the payload that Batch Operations sends when invoking an Lambda function. Version 1.0 is the default. Version 2.0 is required when you use Batch Operations to invoke Lambda functions that act on directory buckets, or if you need to specify UserArguments. For more information, see Automate object processing in Amazon S3 directory buckets with S3 Batch Operations and Lambda in the Amazon Web Services Storage Blog.

Ensure that your Lambda function code expects InvocationSchemaVersion 2.0 and uses bucket name rather than bucket ARN. If the InvocationSchemaVersion does not match what your Lambda function expects, your function might not work as expected.

Directory buckets - To initiate Amazon Web Services Lambda function to perform custom actions on objects in directory buckets, you must specify 2.0.

user_arguments instance-attribute

user_arguments: NotRequired[UserArguments]

Key-value pairs that are passed in the payload that Batch Operations sends when invoking an Lambda function. You must specify InvocationSchemaVersion 2.0 for LambdaInvoke operations that include UserArguments. For more information, see Automate object processing in Amazon S3 directory buckets with S3 Batch Operations and Lambda in the Amazon Web Services Storage Blog.