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
I'm building a Lambda function that reports lambda failures to slack. I'm planning to release that lambda function and an Aspect that can add the function to any other function that has no onFailure property configured.
However, when looping through Constructs in the Aspect, when a Function is passed as the node I cannot get access the EventInvokeConfig configuration. The EventInvokeConfig comes as a separate node and only for those functions that have the onFailure configured. That means that, given a Function node in the Aspect, I have no way to tell if the onFailure property has been configured or not.
Is there any way of checking if the Lambda Function has the onFailure property configured in the Aspect?
The other solution I can think of is accumulating all of the Lambda functions in an array, removing those that have the EventInvokeConfig configuration when I see the node in the aspect and then, once the aspect has finished processing, configure all of the remaining Lambdas, but that seems too dirty.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm building a Lambda function that reports lambda failures to slack. I'm planning to release that lambda function and an Aspect that can add the function to any other function that has no
onFailure
property configured.However, when looping through Constructs in the Aspect, when a Function is passed as the node I cannot get access the
EventInvokeConfig
configuration. TheEventInvokeConfig
comes as a separate node and only for those functions that have theonFailure
configured. That means that, given a Function node in the Aspect, I have no way to tell if theonFailure
property has been configured or not.Is there any way of checking if the Lambda Function has the
onFailure
property configured in the Aspect?The other solution I can think of is accumulating all of the Lambda functions in an array, removing those that have the
EventInvokeConfig
configuration when I see the node in the aspect and then, once the aspect has finished processing, configure all of the remaining Lambdas, but that seems too dirty.Beta Was this translation helpful? Give feedback.
All reactions