You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
First of all, thanks for lambda-local, this is an excelent product.
I have some use cases where I read infomation (like functionName) from the context object and I use it as part of my pk/sk in DynamoDB. In other cases I post messages to EventBridge and the function name is used as the Source field.
I digged through the code and saw that currently there's no way to override the context object properties.
In the case of functionName, it uses the name of the handler function or defaults to the string handler.
This messes up some of my use cases because every developer running lambda-local will end up with the same functionName on the context object. For instance, it causes DynamoDB records to be overwritten and all EventBridge events have the same Source.
I'd like to request a feature where we could overwrite some of the context properties, or even supply our own object.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello!
First of all, thanks for lambda-local, this is an excelent product.
I have some use cases where I read infomation (like
functionName
) from the context object and I use it as part of my pk/sk in DynamoDB. In other cases I post messages to EventBridge and the function name is used as theSource
field.I digged through the code and saw that currently there's no way to override the context object properties.
In the case of
functionName
, it uses the name of the handler function or defaults to the stringhandler
.This messes up some of my use cases because every developer running lambda-local will end up with the same functionName on the context object. For instance, it causes DynamoDB records to be overwritten and all EventBridge events have the same Source.
I'd like to request a feature where we could overwrite some of the context properties, or even supply our own object.
Thanks!
The text was updated successfully, but these errors were encountered: