aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
alexmiller 2018-12-20T00:11:05.093500Z

https://clojure.org/guides/faq#illegal_access

alexmiller 2018-12-20T00:11:38.094400Z

^^ for general info

alexmiller 2018-12-20T00:12:09.095400Z

I think in this particular case, it’s fixed in newer versions of jetty and those may get bumped in the deps chain soon

2018-12-20T01:03:18.096100Z

cool, thanks once again

2018-12-20T01:15:57.097100Z

sheesh to illegal access... Clojure is not a crime! ;)

viesti 2018-12-20T14:11:21.097300Z

hmm

viesti 2018-12-20T14:11:30.097500Z

0% cat deps.edn
{:deps {org.clojure/clojure {:mvn/version "1.10.0"}
        com.cognitect.aws/api {:mvn/version "0.8.158"}
        com.cognitect.aws/endpoints {:mvn/version "1.1.11.467"}
        com.cognitect.aws/s3 {:mvn/version "680.2.370.0"}
        com.cognitect.aws/apigateway {:mvn/version "668.2.364.0"}}}
kimmoko@MACTN0AFH040 dev /tmp
0% clj -Srepro
Clojure 1.10.0
user=> (require '[cognitect.aws.client.api :as aws])
nil
user=> (def apigw-client (aws/client {:api :apigateway}))
2018-12-20 16:09:35.111:INFO::main: Logging initialized @12592ms
#'user/apigw-client
user=> (aws/invoke apigw-client {:op :GetRestApis})
{}
user=> ^D
kimmoko@MACTN0AFH040 dev /tmp
0% aws apigateway get-rest-apis
{
    "items": [
        {
            "id": "6e071va237",
            "name": "chatAPI",
            "createdDate": 1479113133,....

viesti 2018-12-20T14:11:48.097700Z

wonder where to look next

alexmiller 2018-12-20T14:17:49.098200Z

is the problem that you don’t have any or that you can’t see them?

alexmiller 2018-12-20T14:18:03.098500Z

a check with aws console would tell you the answer

alexmiller 2018-12-20T14:18:32.098800Z

iam may also be affecting what you see I presume

alexmiller 2018-12-20T14:19:01.099200Z

oh, you checked at the end, I didn’t see that

alexmiller 2018-12-20T14:20:46.099700Z

I believe the request / response stuff is in the meta of the op return - that might tell you something

viesti 2018-12-20T16:07:01.100200Z

haa, there’s stuff in the (-> (meta response) :http-response :body slurp)

viesti 2018-12-20T16:07:12.100500Z

I guess it’s just not deserialized?

viesti 2018-12-20T16:07:50.100800Z

user=> (-> (meta response) :http-response :body slurp)
"{\"_links\":{\"curies\":[{\"href\":\"<http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-authorizer-{rel}.html\>",\"name\":\"authorizer\",\...

chrisulloa 2018-12-20T16:14:39.102900Z

In other SDKs like the javascript SDK, the http response body is a string. Probably makes sense because I don’t think response body is consistently json across all endpoints.

viesti 2018-12-20T16:15:03.103200Z

yeah, S3 api is XML

viesti 2018-12-20T16:15:10.103500Z

over 10 years old

viesti 2018-12-20T16:16:39.104400Z

Api Gateway is this funny Hypertext Application Language (HAL) thing https://docs.aws.amazon.com/apigateway/api-reference/index.html

viesti 2018-12-20T16:17:52.105100Z

would be well suited for Datafy/nav I guess 🙂

chrisulloa 2018-12-20T16:17:54.105200Z

I’ve never seen HAL before interesting

viesti 2018-12-20T16:18:18.105700Z

some other aws api uses HAL too, don’t remember which now

viesti 2018-12-20T16:18:43.106200Z

where’s my rebl now

viesti 2018-12-20T16:24:49.106500Z

maybe something like this to unhal: https://github.com/portkey-cloud/aws-clj-sdk/blob/master/src/portkey/aws.clj#L182-L197

viesti 2018-12-20T16:26:38.107300Z

but hum, trying to grok how the deserialization is done in aws-api

viesti 2018-12-20T16:45:56.108300Z

anyway, response in metadata is a neat thing, it means the lib is usable even though there isn’t a parser for the response yet

alexmiller 2018-12-20T17:08:32.108600Z

if it’s not yet, it would be good to file an issue for aws-api

viesti 2018-12-20T17:54:59.109300Z

filed https://github.com/cognitect-labs/aws-api/issues/30, just had to make sure I did’t do something foolish myself 🙂