-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Integration with AWS Step Functions #83
Comments
Do you maybe have a simple repro with step functions? I'm happy to tune HL to make it work. What I can see is you're getting the error in the form of:
I have to check the custom runtime design documents. |
I do not have this simple repo, but I will create one. I will post it here when I have it ready. |
Thank you! Just simple "hello world" on AWS SAM + Step Functions exposing this issue would be enough 😀 Nothing too fancy please. |
Hi, https://github.com/mcuervoe/holy-lambda-steps It is an implementation in Clojure/HL of the example in python that you can find in https://aws.amazon.com/getting-started/hands-on/handle-serverless-application-errors-step-functions-lambda/ You can follow the instruction in this article to invoke the step function with different inputs to generate different exceptions (Step 4, Test your Error Handling Workflow). If you have any issues with the deployment of the code, let me know Miguel |
@mcuervoe please check the latest HL release (0.6.7). This should fix your issue :) FYI: HL now supports both Clojure
Please let me know if this solves your issue. Btw, thank you for the repro. Really well done and easy to follow! |
Hi @FieryCod , I tested the change, and it works beautifully. I updated the repo https://github.com/mcuervoe/holy-lambda-steps so that it accepts new status codes in the input to try the throw of
I think it can be used as an example of the integration of HL and Step Functions I really like the new functionality of allowing Thanks, |
Is your feature request related to a problem? Please describe.
When AWS Lambda is used in AWS Step Functions, AWS Step Functions uses the field
"errorType"
to implementcatch and retry logic. When the Lambda is implemented in Java, Javascript, or Python, this field is
generated when the code raises an exception.
In the case of Java, the
"errorType"
takes the name of the exception class.See these documents for details:
Unfortunately, when the lambda function is implemented with holy-lambda, I have not seen a way to make this mechanism works:
"errorType"
populated. This makes the code treated with"Lambda.Unknown"
.Since all the exceptions are treated the same, there is no way to create a different workflow branch based on the error returned.
"errorType"
, something like this:In this case, the output gets wrapped in a field
"output"
. AWS Step Functions receives something like:In this case, AWS Steps Functions does not even consider this as an error (and therefore, the catch and retry clauses of the workflow can't be used)
Describe the solution you'd like
I think it is needed a way to provide a errorType to AWS Step Functions when some error happens processing the lambda
Describe alternatives you've considered
I see there are two possible alternatives:
"errorType"
gets populated."erroType"
from a mapAdditional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: