cognitect-labs / aws-api

AWS, data driven
Apache License 2.0
727 stars 100 forks source link

refresh/clear for default http client #195

Open eoliphan opened 3 years ago

eoliphan commented 3 years ago

Dependencies

{:deps {com.cognitect.aws/api       {:mvn/version "0.8.515"}}}

Enhancement Description

The new client behavior is definitely a better default. However, it'd be nice to be able to force a reset/clear of it in situations where the AWS creds have expired, etc. such that you don't have to bother with manually creating http clients. For example, we use temporary SAML-based creds, and over the course of a daylong REPL session they will eventually time out and i have to restart the repl, or manually create a client and pass it around. so something like:

(aws/reset-default-httpclient) ; and existing clients just work
; or
(aws/reset-defalt-httpclient)
(def s3 (aws/client {:api :s3}))

Stack traces

N/A