aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
kenny 2020-05-06T15:19:54.167200Z

aws-api doesn't seem to be mapping a 429 -> busy anomaly. Bug?

{:Reason "ReservedFunctionConcurrentInvocationLimitExceeded",
 :Type "User",
 :message "Rate Exceeded.",
 :cognitect.anomalies/category :cognitect.anomalies/incorrect}

(meta *1)
=>
{:http-request  {:request-method :post,
                 :scheme         :https,
                 :server-port    443,
                 :uri            "",
                 :headers        {},
                 :body           "",
                 :server-name    "<http://lambda.us-west-2.amazonaws.com|lambda.us-west-2.amazonaws.com>"},
 :http-response {:status  429,
                 :headers {"connection"       "keep-alive",
                           "x-amzn-requestid" "",
                           "x-amzn-errortype" "TooManyRequestsException",
                           "content-length"   "103",
                           "date"             "Wed, 06 May 2020 15:16:56 GMT",
                           "content-type"     "application/json"},
                 :body    ""}}

jaihindhreddy 2020-05-06T15:46:17.168900Z

Busy would be 503 wouldn't it? 429 is the service refusing your request rate, not being unable to serve it cuz they're busy. Of course, what we might choose to do when we counter either might be the same, but they're two different things, aren't they?

kenny 2020-05-06T15:48:04.169700Z

Perhaps. Either way, incorrect is not the correct category. This request should be marked as a category that is retriable.

kenny 2020-05-06T16:01:41.170500Z

From an end user perspective, I think 429 = 503.

ghadi 2020-05-06T16:21:37.170900Z

we only map whatever is in the AWS provided descriptors

ghadi 2020-05-06T16:21:53.171300Z

which we know isn't comprehensive w.r.t. errors

ghadi 2020-05-06T16:22:34.172100Z

we're working on some functionality that would, among other things, potentially make it easier to fill in gaps where the service descriptors are insufficient

kenny 2020-05-06T16:23:28.173Z

Oh, didn't realize this was how it worked. Why not map http request statuses?

kenny 2020-05-06T21:26:21.177300Z

@dchelimsky I think 429 = busy. Thoughts?

2020-05-06T21:37:46.178400Z

429 is about rate limiting, which could be happening based on e.g. a service contract (you're allowed n requests) even if the server could handle them.

➕ 2
kenny 2020-05-06T21:54:32.178700Z

I realize that but the end user effect is identical.

kenny 2020-05-06T21:56:16.179200Z

i.e., both use the Retry-After header and represent temporary conditions. I think they should be treated the same.

kenny 2020-05-07T14:29:47.187500Z

I'm now very much in agreement with @dchelimsky. I have a hard time qualifying with an "almost always" and would instead say it is very use case dependent. I see both sides of the coin now and agree that there is no default that can possibly satisfy every use case. Leaving the current defaults as is is safest. Allowing this to be configurable is really the only solution 🙂

2020-05-06T21:59:04.180300Z

That's your preference, but it might not be everybody's. As Ghadi mentioned, we're working on something that will allow you to post-process errors.

➕ 1
kenny 2020-05-06T21:59:41.181Z

Fair enough. Curious what situation you're thinking in which you'd handle them differently?

2020-05-06T21:59:53.181300Z

If you're actually being rate-limited.

2020-05-06T22:00:20.181900Z

Retry might not be the right answer in that case.

kenny 2020-05-06T22:00:51.182300Z

Couldn't you make the same case for a server being "busy"?

2020-05-06T22:02:12.183400Z

Sure, but "making a case" is part of the point I

2020-05-06T22:02:15.183700Z

'm making

2020-05-06T22:03:12.184900Z

These things are up for interpretation, and are implemented and handled wildly differently not only across the entire internet, but even across AWS services.

2020-05-06T22:03:36.185400Z

So, we're going to give you control over this, and probably not change any of the decisions we already made as defaults.

1
2020-05-06T22:04:26.186Z

Consider github's choice to return a 404 when you're not authorized to see a repo.

2020-05-06T22:04:47.186500Z

They'll justify it as security. Fine. But choices like that make status codes useless.

👍 1
2020-05-09T01:21:46.187700Z

well, from your perspective as the requester, maybe that one's actually true? 😉

2020-05-09T01:22:02.187900Z

purely trolling here