Skip to content
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

Changing batch size in SQS event does not actually change the batch size off SQS trigger #1343

Open
lmuther8 opened this issue Jul 26, 2024 · 2 comments

Comments

@lmuther8
Copy link
Contributor

Context

I was updating a SQS event batch size with the zappa settings and assumed it had worked and did not even check the console to make sure. Later I was testing another function that invoked the previous one and in doing so I noticed the batch size was not increased.

Expected Behavior

I changed the batch size in the zappa settings from 1 > 5 and the SQS trigger batch size should change from 1 > 5.

Old Settings:

{
    "function": "app.lambda_handler",
    "event_source": {
        "arn": "arn:aws:sqs:us-west-2:1........",
        "batch_size": 1,
        "enabled": true
    }
}

New Settings:

{
    "function": "app.lambda_handler",
    "event_source": {
        "arn": "arn:aws:sqs:us-west-2:1........",
        "batch_size": 5,
        "enabled": true
    }
}

Actual Behavior

Nothing happens.

Steps to Reproduce

  1. Create a deployment with an SQS event with a batch size of 1.
  2. Change the batch size to 5 and update the function.
  3. Check AWS console to see the batch size has not changed.

Your Environment

  • Zappa version used: 0.59.0
  • Operating System and Python version: MacOS Python 3.12
@lmuther8
Copy link
Contributor Author

Line 2885 and 2886 in zappa/core.py:

elif rule_response == "exists":
    print("{} event schedule for {} already exists - Nothing to do here.".format(svc, function))

rule_response is returned from the function add_event_source from line 445 in zappa/utilities.py and that should maybe update the event source if it has changed and can return a status of updated when that happens.

@lmuther8
Copy link
Contributor Author

lmuther8 commented Aug 2, 2024

Also should add support for batch window and maximum concurrency

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