Skip to content

Commit 6df8ecd

Browse files
committed
fix invalid test-code
1 parent 3292baf commit 6df8ecd

File tree

2 files changed

+1
-35
lines changed

2 files changed

+1
-35
lines changed

bmise/src/bmise/cli.clj

+1-6
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,10 @@
3838
(apply p/shell cmd)))))
3939

4040
(comment
41-
(install nil)
42-
43-
(->> (sh "mise ls --json")
44-
->edn
45-
(map #(p))))
4641

4742
;; map over lang keys (:java, :bun, ..)
4843
;; map over versions
4944
;; flatmap
5045

5146
;;
52-
47+
:rfc)

fiddles/aws/sts.clj

-29
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,3 @@
4343
:aws/secret-access-key (:SecretAccessKey creds)
4444
:aws/session-token (:SessionToken creds)
4545
::credentials/ttl (credentials/calculate-ttl creds)}))))
46-
47-
;; Example steps
48-
;; 1: create client with basic user credentials
49-
;; 2: assume role with the client, along with mfa serial and mfa token
50-
;; 3: create s3 client with assumed role credentials
51-
;; 4. list buckets using s3 client
52-
(let [
53-
;; load from 1password or somethin
54-
mfa-token-code "577170"
55-
56-
;; load with aero
57-
mfa-serial-number "arn:aws:iam::123412341234:mfa/jol"
58-
user-creds {:access-key-id "AKIATY00000000000000"
59-
:secret-access-key "****************************************"}
60-
assume-role-arn "arn:aws:iam::123412341234:role/OtherRole"
61-
sts-client (create-sts-client user-creds)
62-
assumed-role-creds (assume-role {:sts-client sts-client
63-
:role-arn assume-role-arn
64-
:mfa-serial mfa-serial-number
65-
:mfa-token mfa-token-code
66-
:session-prefix "my-session"})
67-
credentials-provider (wrap-in-credentials-provider assumed-role-creds)
68-
s3-client (aws/client {:api :s3
69-
:region "eu-west-1"
70-
:credentials-provider credentials-provider})]
71-
72-
;; list buckets using assumed role credentials
73-
(def assumed-role-creds assumed-role-creds)
74-
(aws/invoke s3-client {:op :ListBuckets}))

0 commit comments

Comments
 (0)