Skip to content

Error on lambdas that get List of events #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
giducko opened this issue Jun 12, 2023 · 0 comments
Open

Error on lambdas that get List of events #29

giducko opened this issue Jun 12, 2023 · 0 comments

Comments

@giducko
Copy link

giducko commented Jun 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant