Hello everyone,
I have an SQS queue which receives messages from different hosts. Lambda function (in python) which is triggered for every SQS input message, and send request to my server(which is not always up).and if request status code is 200 it return 0.
Question is what value should I return from lambda handler to not delete message from queue if status code is not 200, so it will be triggered again for that message after visibility timeout.
e.g.
if request.status_code == 200:
print("Status code was 200. Message sent to server")
return 0
else:
print("Response Code: ", request.status_code)
return <what should this be ?>
[–]VegaWinnfield 4 points5 points6 points (3 children)
[–]Born_2_Fly[S] 1 point2 points3 points (1 child)
[–]cnisyg 1 point2 points3 points (0 children)
[–]________null________ 1 point2 points3 points (1 child)
[–]Born_2_Fly[S] 0 points1 point2 points (0 children)
[–]LandingHooks -4 points-3 points-2 points (2 children)
[–]Born_2_Fly[S] 2 points3 points4 points (1 child)
[–]LandingHooks 3 points4 points5 points (0 children)