aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
kenny 2020-06-11T22:10:52.268500Z

Anyone know if there's an aws-api for invoking an API Gateway endpoint that is secured with AWS_IAM (it needs all requests to be signed)?

kenny 2020-06-11T23:00:35.270Z

Hmm, I'm pretty close to getting it to work...

(signers/v4-sign-http-request
  {:metadata {:signingName "execute-api"}}
  {:region "us-west-2"}
  {:aws/access-key-id     "..."
   :aws/secret-access-key "..."}
  {:method         :post
   :request-method :post
   :uri            invoke-url
   :headers        {"content-type" "application/json"
                    "host"         "<http://execute-api.us-west-2.amazonaws.com|execute-api.us-west-2.amazonaws.com>"
                    "x-amz-date"   (aws.util/format-date aws.util/x-amz-date-format (Date.))}}
  :content-sha256-header? true)
The AWS response tells me "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.". I'm somewhat certain this has to do with the host header.

ghadi 2020-06-11T23:01:48.270300Z

disclaimer, that namespace is not public

ghadi 2020-06-11T23:02:02.270700Z

and we will randomly break it

kenny 2020-06-11T23:02:33.271300Z

I know... After getting it to run through, I can pull the relevent pieces out 🙂

Cory 2020-06-11T23:32:50.271600Z

i'm surprised how bad these docs are