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

Fix cloudwatchLog event with the case that facing a resource limit exceeded #3447

Closed
horike37 opened this issue Apr 6, 2017 · 3 comments
Closed

Comments

@horike37
Copy link
Member

horike37 commented Apr 6, 2017

When using cloudwatchLog event, the deployment will fail with an error that a resource limit exceeded if you replace the logGroup name of one function with the logGroup name of another function in your serverless.yml file and run serverless deploy

This is caused by the fact that CloudFormation tries to attach the new subscription filter before detaching the old one. CloudWatch Logs only support one subscription fitlter per log group as you can read in the documentation about CloudWatch Logs Limits.

We should fix it in upcoming release.

cc @pmuens

@pmuens
Copy link
Contributor

pmuens commented Apr 6, 2017

Correct!

@horike37 Thanks for opening this one so that we don't forget about it 👍

@pmuens pmuens added bug and removed kind/feature labels Apr 6, 2017
@pmuens pmuens changed the title Fix cloudwatchLog event with the case that facing a resource limit exceeded Fix cloudwatchLog event with the case that facing a resource limit exceeded Apr 6, 2017
@ztmdsbt
Copy link

ztmdsbt commented Jun 22, 2018

The deployment will fail with same error if change the order of the cloudwatchLog groups list when one lambda has been set multiple cloudwatchLog groups.
I test some of the cases, those tow are succeed:

  • when add new cloudwatchLog group(s) at the end of the events list.
  • when delete cloudwatchLog group(s) from the bottom of the events list.

and those are failed:

  • when add new cloudwatchLog group(s) at the middle of the events list.
  • when delete cloudwatchLog group(s) from the middle of the events list.
  • when delete cloudwatchLog group(s) from the top of the events list.

@rdsedmundo
Copy link
Contributor

I was trying to debug this issue to see if I could help with a first contribution here and on my tests, I realized that this is not a problem on serverless, but on the CloudFormation itself, I confirmed at after trying to submit a dummy stack adding a log group and a subscription filter, and then after I just changed the key of the subscription filter for something else, the result is the same: CF tries to add it the new one before deleting the existent, therefore everything fails.

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

No branches or pull requests

4 participants