Skip to content

Error on lambdas that get List of events #29

Description

@giducko

I am using lambda warmers on lambda functions that are connected as resolvers to AWS AppSync (graphql)
AppSync has a feature that enables batches for a lambda function (resolver), resulting in a List of events.
Therefore we receive this error when the invocation is not a warmer invocation.

@functools.wraps(f)
def wrapped_func(event, context, *args, **kwargs):

    execution_info = dict(
        instance_id=context.aws_request_id,
        is_warmer_invocation=event.get(flag) or False,
        **LAMBDA_INFO
    )
  AttributeError: 'list' object has no attribute 'get'

../../../.venv/lib/python3.9/site-packages/lambdawarmer/init.py:34: AttributeError

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions