hey all, what’s the easiest way to send an alert (...
# random
s
hey all, what’s the easiest way to send an alert (of some kind) that a long-running process is complete? like if a user makes an API call, it returns with a 202 (async process). the process completes, and it should somehow let the user know, like via email. is EventBridge the way to go? (one Lambda alerting another one)
j
Not sure if it's the best way to do this, but in the past we just used SNS to notify a Lambda function and from there, can go anywhere really.
j
@Sam Hulick have you considered using a Step Function?
Have the API directly invoke the Step Function (it will return the 200). Then the Step Function will do its thing like wait for a task to complete before progressing to the next step (such as sending an email via SNS). I highly recommend you looking at this as the most reliable option.
s
@Joe Kendal yeah, I’m using step functions in other places. in this case it would be overkill because it’s literally just ONE Lambda function with a long-running process. it’s not several functions that depend on the results of each other