Home > Blockchain >  How to pass environment variables (runtime variables) to a lambda function from an EventBridge rule?
How to pass environment variables (runtime variables) to a lambda function from an EventBridge rule?

Time:08-19

I have two event bridge rules pointing to a lambda function with two different aliases (say dev & prod). How do I send runtime arguments from EventBridge to respective lambda alias? If that's not possible, how to set environment variable (or runtime arguments) for a specific lambda alias?

Currently, it is only possible to add them globally (applicable to all aliases).

CodePudding user response:

You can use input transformer. Each rule will have its input transformer which you write. This can including adding new parameters to the event, indicating dev or prod environments.

  • Related