Support Forums

Background function retries

The docs for background functions say:

If function execution returns an error, AWS will retry the execution after one minute. If it fails again, another retry happens two minutes later.

So is the limit for retries 2? Or will it keep retrying after that? What status codes are retried? In a quick test, it looks like 404 are not retried. Does it need to be in the 5xx range?


So is the limit for retries 2?

I believe that’s right, yes.

What status codes are retried?

None! We’ll only automatically retry if we observe an unhandled exception.

A background function will always return a 202, by the way. It’s executed async!

My background functions are written in Go. Does this mean I need to panic to get a retry?

Oooh, good question. Now, my Go is somewhat lacking however yes – a panic should essentially un-handle a handled exception, yes!

1 Like