AshishT
AshishT

Reputation: 58

Amazon SNS http endpoint retry on non 4xx http status code

SNS seems to retry delivery to http(s) endpoints only if the endpoint returns a 5xx code on first attempt. Is it possible to configure a http subscription with SNS to allow retries if the endpoint returns 4xx error codes as well ?

Upvotes: 2

Views: 988

Answers (1)

oieduardorabelo
oieduardorabelo

Reputation: 2985

not at the moment, SNS doesn't consider 2xx-4xx as server errors after you confirm the subscription,

as step 5 on the documention confirms it:

  1. Make sure that your endpoint responds to the HTTP POST message from Amazon SNS with the appropriate status code. The connection will time out in 15 seconds. If your endpoint does not respond before the connection times out or if your endpoint returns a status code outside the range of 200–4xx, Amazon SNS will consider the delivery of the message as a failed attempt.

https://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.prepare.html

Upvotes: 4

Related Questions