Skip to content

Argument list too long when a lambda function event body is too large #1055

@a88zach

Description

@a88zach

I'm currently working on a process by which a kinesis stream triggers a lambda function to process a batch of records. Whenever the putRecords method is used with a large amount of records, the call to trigger the lambda will fail b/c the argument list is too long. The command is:

CONTAINER_ID="$(docker create  -e AWS_LAMBDA_FUNCTION_INVOKED_ARN="$AWS_LAMBDA_FUNCTION_INVOKED_ARN" -e AWS_LAMBDA_FUNCTION_NAME="$AWS_LAMBDA_FUNCTION_NAME" -e AWS_LAMBDA_EVENT_BODY="$AWS_LAMBDA_EVENT_BODY" -e AWS_LAMBDA_FUNCTION_VERSION="$AWS_LAMBDA_FUNCTION_VERSION" -e LOCALSTACK_HOSTNAME="$LOCALSTACK_HOSTNAME"  "lambci/lambda:nodejs8.10" "index.handler")"

Instead of sending the event body to the lambda via an argument list, the body should be written to a file that is then copied into the docker and then the command should reference the file in the arguments list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugBug reporttype: featureNew feature, or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions