Serverless creating 2 lambda functions with EventBridge as source

Hello!

I am deploying via Serverless a lambda function which uses an EventBridge custom bus as trigger. I’ve just noticed that Serverless seems to create 2 lambda functions instead of just mine.

Let’s say if my lambda function is called myLambda, the framework would deploy:

  • myLambda
  • myLambda-stage-custom-resource-event-bridge (which seems to contain code to set permissions, etc.)

Noteworthy: I am deploying via this action triggered on pushes to my repo.

Is it intended or is it maybe a remain of an intermediate resource created to setup the final lambda which didn’t got removed? (I don’t recall seeing this a few weeks ago)

Thanks in advance!

I’ve noticed the same thing, it is the myLambda-stage-custom-resource-event-bridge that receives the events and myLambda doesn’t get triggered.

Have you found a solution?

EDIT: I was pushing the wrong events, so the wrong lambda was getting called. However I’m still getting the custom lambda deployed as above with the permissions.

On my side it’s the same: the proper lambda is getting called but I still have this extra lambda function hanging around (which has an empty log so it doesn’t even run after deployment).

I’m suspecting a bug that appeared recently where maybe it doesn’t get cleaned up while deploying or something like that. I have this stack running for some weeks already and just noticed those extra lambda functions recently.

May be worth opening an issue for that if multiple people are in the same situation. I’ll wait and see if we get more traction here and open an issue for it.

1 Like

Hi, I have the same issue. Wondering about that additional lambda. Are there any news in this direction?
Best, Patrick