Fork me on GitHub
#aws
<
2021-07-23
>
tbrooke15:07:27

I am starting with the Cognitect AWS client - just experimenting from the command line and I keep getting :Execution error (InstantiationError) at cognitect.http-client/ssl-context-factory (http_client.clj:253). org.eclipse.jetty.util.ssl.SslContextFactory I am thinking it is a credentials problem - I read that it gets credentials form the ENV I have ~/.aws and set AWS_SHARED_CREDENTIALS_FILE . I am not sure what else to do.

ghadi15:07:18

can you paste the full stack trace, not just the first line?

ghadi15:07:33

also please paste what you typed to receive this error

ghadi15:07:44

and your dependencies

tbrooke16:07:16

My namespace is: (ns trustblocks.awsclient (:require [cognitect.aws.client.api :as aws] [cognitect.aws.credentials :as creds])) Command: (def s3 (aws/client {:api :s3})) Stacktrace: clj꞉trustblocks.awsclient꞉> (def s3 (aws/client {:api :s3})) ; Execution error (InstantiationError) at cognitect.http-client/ssl-context-factory (http_client.clj:253). ; org.eclipse.jetty.util.ssl.SslContextFactory clj꞉trustblocks.awsclient꞉>  clojure.lang.Compiler$InvokeExpr/eval (Compiler.java:3711) clojure.lang.Compiler$DefExpr/eval (Compiler.java:457) clojure.lang.Compiler/eval (Compiler.java:7186) clojure.core/eval (core.clj:3202) clojure.core/eval (core.clj:3198) nrepl.middleware.interruptible-eval/evaluate (interruptible_eval.clj:87) clojure.core/apply (core.clj:667) clojure.core/with-bindings* (core.clj:1977) nrepl.middleware.interruptible-eval/evaluate (interruptible_eval.clj:87) clojure.main/repl (main.clj:437) clojure.main/repl (main.clj:458) clojure.main/repl (main.clj:368) nrepl.middleware.interruptible-eval/evaluate (interruptible_eval.clj:84) nrepl.middleware.interruptible-eval/evaluate (interruptible_eval.clj:56) nrepl.middleware.interruptible-eval/interruptible-eval (interruptible_eval.clj:152) nrepl.middleware.session/session-exec (session.clj:202) nrepl.middleware.session/session-exec (session.clj:201) java.lang.Thread/run (Thread.java:832)

tbrooke16:07:16

:deps {metosin/malli {:mvn/version "0.5.1"} com.kiranshila/cybermonday {:mvn/version “0.2.0"} ;; org.arachne-framework/arachne-fileset {:mvn/version “1.0.0-beta1”}, metosin/jsonista {:mvn/version “0.3.3"} com.cognitect.aws/api {:mvn/version “0.8.515”} com.cognitect.aws/endpoints {:mvn/version “1.1.12.13"} com.cognitect.aws/s3 {:mvn/version “811.2.934.0”} org.clojure/test.check {:mvn/version “1.1.0"} cheshire/cheshire {:mvn/version “5.10.0”} biff/main {:git/url “https://github.com/jacobobryant/biff” :deps/root “libs/main” :sha “2a82eee794e0b34908ce169f3acfa322108b26cc”}} From command line: Echo $AWS_SHARED_CREDENTIALS_FILE /Users/tmb/.aws/credentials

ghadi17:07:52

@tbrooke you have conflicting Jetty dependencies coming from aws-api and your web framework (biff?)

ghadi17:07:54

Not sure this is resolvable. You have half jetty 9.4 deps from aws-api, and half jetty 10.2 deps from biff

tbrooke17:07:55

@ghadi Got it - I guess I can fork biff and change jetty dependency unless it breaks something else