├── .circleci
├── config.yml
└── script
│ ├── deploy
│ ├── docker
│ ├── install-clojure
│ ├── install-leiningen
│ ├── lein
│ ├── performance
│ ├── release
│ └── tools.deps
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── appveyor.yml
├── aws-libs.edn
├── build.clj
├── deps.edn
├── deps.template.edn
├── docker-compose.yml
├── pod-babashka-aws.build_artifacts.txt
├── reflection.json
├── resources.json
├── resources
├── POD_BABASHKA_AWS_VERSION
├── aws-services.edn
└── babashka.png
├── script
├── changelog.clj
├── compile
├── compile.bat
├── setup-musl
├── test
└── update-deps.clj
├── src
└── pod
│ └── babashka
│ ├── aws.clj
│ └── aws
│ ├── impl
│ ├── aws.clj
│ └── aws
│ │ └── credentials.clj
│ └── logging.clj
└── test
├── credentials_test.clj
└── script.clj
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | # Clojure CircleCI 2.0 configuration file
2 | #
3 | # Check https://circleci.com/docs/2.0/language-clojure/ for more details
4 | #
5 | version: 2.1
6 | jobs:
7 | jvm:
8 | docker:
9 | # specify the version you desire here
10 | - image: circleci/clojure:openjdk-11-lein-2.9.6-bullseye
11 | - image: localstack/localstack
12 | environment:
13 | SERVICES: s3,lambda
14 | working_directory: ~/repo
15 | environment:
16 | LEIN_ROOT: "true"
17 | steps:
18 | - checkout
19 | - run:
20 | name: Get rid of erroneous git config
21 | command: |
22 | rm -rf /home/circleci/.gitconfig
23 | - restore_cache:
24 | keys:
25 | - v1-dependencies-{{ checksum "deps.edn" }}
26 | # fallback to using the latest cache if no exact match is found
27 | - v1-dependencies-
28 | - run:
29 | name: Install Clojure
30 | command: |
31 | wget -nc https://download.clojure.org/install/linux-install-1.10.3.1058.sh
32 | chmod +x linux-install-1.10.3.1058.sh
33 | sudo ./linux-install-1.10.3.1058.sh
34 | - run:
35 | name: Run JVM tests
36 | environment:
37 | AWS_ACCESS_KEY_ID: test
38 | AWS_SECRET_ACCESS_KEY: test
39 | AWS_REGION: eu-west-1
40 | command: |
41 | script/test
42 | - save_cache:
43 | paths:
44 | - ~/.m2
45 | key: v1-dependencies-{{ checksum "deps.edn" }}
46 | linux:
47 | resource_class: large # localstack needs more mem
48 | docker:
49 | - image: circleci/clojure:openjdk-11-lein-2.9.6-bullseye
50 | - image: localstack/localstack
51 | environment:
52 | SERVICES: s3
53 | working_directory: ~/repo
54 | environment:
55 | LEIN_ROOT: "true"
56 | GRAALVM_HOME: /home/circleci/graalvm-ce-java11-21.3.0
57 | APP_PLATFORM: linux # used in release script
58 | APP_TEST_ENV: native
59 | steps:
60 | - checkout
61 | - run:
62 | name: Get rid of erroneous git config
63 | command: |
64 | rm -rf /home/circleci/.gitconfig
65 | - restore_cache:
66 | keys:
67 | - linux-amd64-{{ checksum "deps.edn" }}-{{ checksum ".circleci/config.yml" }}
68 | - run:
69 | name: Install Clojure
70 | command: |
71 | wget https://download.clojure.org/install/linux-install-1.10.3.1058.sh
72 | chmod +x linux-install-1.10.3.1058.sh
73 | sudo ./linux-install-1.10.3.1058.sh
74 | - run:
75 | name: Install native dev tools
76 | command: |
77 | sudo apt-get update
78 | sudo apt-get -y install gcc g++ zlib1g-dev
79 | - run:
80 | name: Download GraalVM
81 | command: |
82 | cd ~
83 | if ! [ -d graalvm-ce-java11-21.3.0 ]; then
84 | curl -O -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-linux-amd64-21.3.0.tar.gz
85 | tar xzf graalvm-ce-java11-linux-amd64-21.3.0.tar.gz
86 | fi
87 | - run:
88 | name: Build binary
89 | command: |
90 | script/compile
91 | no_output_timeout: 30m
92 | - run:
93 | name: Install bb for test
94 | command: |
95 | mkdir bb
96 | bash <(curl -sL https://raw.githubusercontent.com/borkdude/babashka/master/install) \
97 | --dir bb --download-dir bb
98 | - run:
99 | name: Run test
100 | environment:
101 | AWS_ACCESS_KEY_ID: test
102 | AWS_SECRET_ACCESS_KEY: test
103 | AWS_REGION: eu-west-1
104 | command: PATH=$PATH:bb script/test
105 | - run:
106 | name: Release
107 | command: |
108 | .circleci/script/release
109 | - save_cache:
110 | paths:
111 | - ~/.m2
112 | - ~/graalvm-ce-java11-21.3.0
113 | key: linux-amd64-{{ checksum "deps.edn" }}-{{ checksum ".circleci/config.yml" }}
114 | - store_artifacts:
115 | path: /tmp/release
116 | destination: release
117 | linux-static:
118 | resource_class: large # localstack needs more mem
119 | docker:
120 | - image: circleci/clojure:openjdk-11-lein-2.9.6-bullseye
121 | - image: localstack/localstack
122 | environment:
123 | SERVICES: s3
124 | working_directory: ~/repo
125 | environment:
126 | LEIN_ROOT: "true"
127 | GRAALVM_HOME: /home/circleci/graalvm-ce-java11-21.3.0
128 | BABASHKA_STATIC: "true"
129 | BABASHKA_MUSL: "true"
130 | APP_PLATFORM: linux # used in release script
131 | APP_TEST_ENV: native
132 | steps:
133 | - checkout
134 | - run:
135 | name: Get rid of erroneous git config
136 | command: |
137 | rm -rf /home/circleci/.gitconfig
138 | - restore_cache:
139 | keys:
140 | - linux-amd64-{{ checksum "deps.edn" }}-{{ checksum ".circleci/config.yml" }}
141 | - run:
142 | name: Install Clojure
143 | command: |
144 | wget https://download.clojure.org/install/linux-install-1.10.3.1058.sh
145 | chmod +x linux-install-1.10.3.1058.sh
146 | sudo ./linux-install-1.10.3.1058.sh
147 | - run:
148 | name: Install native dev tools
149 | command: |
150 | sudo apt-get update
151 | sudo apt-get -y install g++
152 | sudo -E script/setup-musl
153 | - run:
154 | name: Download GraalVM
155 | command: |
156 | cd ~
157 | if ! [ -d graalvm-ce-java11-21.3.0 ]; then
158 | curl -O -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-linux-amd64-21.3.0.tar.gz
159 | tar xzf graalvm-ce-java11-linux-amd64-21.3.0.tar.gz
160 | fi
161 | - run:
162 | name: Build binary
163 | command: |
164 | script/compile
165 | no_output_timeout: 30m
166 | - run:
167 | name: Install bb for test
168 | command: |
169 | mkdir bb
170 | bash <(curl -sL https://raw.githubusercontent.com/borkdude/babashka/master/install) \
171 | --dir bb --download-dir bb
172 | - run:
173 | name: Run test
174 | environment:
175 | AWS_ACCESS_KEY_ID: test
176 | AWS_SECRET_ACCESS_KEY: test
177 | AWS_REGION: eu-west-1
178 | command: PATH=$PATH:bb script/test
179 | - run:
180 | name: Release
181 | command: |
182 | .circleci/script/release
183 | - save_cache:
184 | paths:
185 | - ~/.m2
186 | - ~/graalvm-ce-java11-21.3.0
187 | key: linux-amd64-{{ checksum "deps.edn" }}-{{ checksum ".circleci/config.yml" }}
188 | - store_artifacts:
189 | path: /tmp/release
190 | destination: release
191 | linux-static-aarch64:
192 | machine:
193 | enabled: true
194 | image: ubuntu-2004:202101-01
195 | resource_class: arm.large
196 | working_directory: ~/repo
197 | environment:
198 | LEIN_ROOT: "true"
199 | GRAALVM_HOME: /home/circleci/graalvm-ce-java11-21.3.0
200 | BABASHKA_STATIC: "true"
201 | APP_PLATFORM: linux # used in release script
202 | APP_ARCH: aarch64 # used in release script
203 | steps:
204 | - checkout
205 | - run:
206 | name: Get rid of erroneous git config
207 | command: |
208 | rm -rf /home/circleci/.gitconfig
209 | - restore_cache:
210 | keys:
211 | - linux-aarch64-{{ checksum "deps.edn" }}-{{ checksum ".circleci/config.yml" }}
212 | - run:
213 | name: Install Clojure
214 | command: |
215 | wget https://download.clojure.org/install/linux-install-1.10.3.1058.sh
216 | chmod +x linux-install-1.10.3.1058.sh
217 | sudo ./linux-install-1.10.3.1058.sh
218 | - run:
219 | name: Install native dev tools
220 | command: |
221 | sudo apt-get update
222 | sudo apt-get -y install g++
223 | - run:
224 | name: Download GraalVM
225 | command: |
226 | cd ~
227 | if ! [ -d graalvm-ce-java11-21.3.0 ]; then
228 | curl -O -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz
229 | tar xzf graalvm-ce-java11-linux-aarch64-21.3.0.tar.gz
230 | fi
231 | - run:
232 | name: Build binary
233 | command: |
234 | script/compile
235 | no_output_timeout: 30m
236 | - run:
237 | name: Release
238 | command: |
239 | .circleci/script/release
240 | - save_cache:
241 | paths:
242 | - ~/.m2
243 | - ~/graalvm-ce-java11-21.3.0
244 | key: linux-aarch64-{{ checksum "deps.edn" }}-{{ checksum ".circleci/config.yml" }}
245 | - store_artifacts:
246 | path: /tmp/release
247 | destination: release
248 | mac:
249 | macos:
250 | xcode: "12.0.0"
251 | environment:
252 | GRAALVM_HOME: /Users/distiller/graalvm-ce-java11-21.3.0/Contents/Home
253 | APP_PLATFORM: macos # used in release script
254 | APP_TEST_ENV: native
255 | steps:
256 | - checkout
257 | - run:
258 | name: Get rid of erroneous git config
259 | command: |
260 | rm -rf ~/.gitconfig
261 | - restore_cache:
262 | keys:
263 | - mac-amd64-{{ checksum "deps.edn" }}-{{ checksum ".circleci/config.yml" }}
264 | - run:
265 | name: Install Clojure
266 | command: |
267 | .circleci/script/install-clojure /usr/local
268 | - run:
269 | name: Download GraalVM
270 | command: |
271 | cd ~
272 | ls -la
273 | if ! [ -d graalvm-ce-java11-21.3.0 ]; then
274 | curl -O -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-darwin-amd64-21.3.0.tar.gz
275 | tar xzf graalvm-ce-java11-darwin-amd64-21.3.0.tar.gz
276 | fi
277 | - run:
278 | name: Build binary
279 | command: |
280 | script/compile
281 | no_output_timeout: 30m
282 | - run:
283 | name: Install bb for test
284 | command: |
285 | mkdir bb
286 | bash <(curl -sL https://raw.githubusercontent.com/borkdude/babashka/master/install) \
287 | --dir bb --download-dir bb
288 | - run:
289 | name: Run test
290 | command: PATH=$PATH:bb script/test
291 | - run:
292 | name: Release
293 | command: |
294 | .circleci/script/release
295 | - save_cache:
296 | paths:
297 | - ~/.m2
298 | - ~/graalvm-ce-java11-21.3.0
299 | key: mac-amd64-{{ checksum "deps.edn" }}-{{ checksum ".circleci/config.yml" }}
300 | - store_artifacts:
301 | path: /tmp/release
302 | destination: release
303 | deploy:
304 | docker:
305 | - image: circleci/clojure:openjdk-11-lein-2.9.6-bullseye
306 | working_directory: ~/repo
307 | environment:
308 | LEIN_ROOT: "true"
309 | steps:
310 | - checkout
311 | - run:
312 | name: Get rid of erroneous git config
313 | command: |
314 | rm -rf /home/circleci/.gitconfig
315 | - restore_cache:
316 | keys:
317 | - v1-dependencies-{{ checksum "deps.edn" }}
318 | # fallback to using the latest cache if no exact match is found
319 | - v1-dependencies-
320 | - run: .circleci/script/deploy
321 | - save_cache:
322 | paths:
323 | - ~/.m2
324 | key: v1-dependencies-{{ checksum "deps.edn" }}
325 |
326 | workflows:
327 | version: 2
328 | ci:
329 | jobs:
330 | - jvm
331 | - linux
332 | - linux-static
333 | - linux-static-aarch64
334 | - mac
335 | - deploy:
336 | filters:
337 | branches:
338 | only: master
339 | requires:
340 | - jvm
341 | - linux
342 | - mac
343 |
--------------------------------------------------------------------------------
/.circleci/script/deploy:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" = "master" ]
4 | then
5 | lein deploy clojars
6 | fi
7 |
8 | exit 0;
9 |
--------------------------------------------------------------------------------
/.circleci/script/docker:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | image_name="borkdude/clj-kondo"
4 | image_tag=$(cat resources/CLJ_KONDO_VERSION)
5 | latest_tag="latest"
6 |
7 | if [[ $image_tag =~ SNAPSHOT$ ]]; then
8 | echo "This is a snapshot version"
9 | snapshot="true"
10 | else
11 | echo "This is a non-snapshot version"
12 | snapshot="false"
13 | fi
14 |
15 | if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" = "master" ]; then
16 | echo "Building Docker image $image_name:$image_tag"
17 | echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin
18 | docker build -t "$image_name" .
19 | docker tag "$image_name:$latest_tag" "$image_name:$image_tag"
20 | # we only update latest when it's not a SNAPSHOT version
21 | if [ "false" = "$snapshot" ]; then
22 | echo "Pushing image $image_name:$latest_tag"
23 | docker push "$image_name:$latest_tag"
24 | fi
25 | # we update the version tag, even if it's a SNAPSHOT version
26 | echo "Pushing image $image_name:$image_tag"
27 | docker push "$image_name:$image_tag"
28 | else
29 | echo "Not publishing Docker image"
30 | fi
31 |
32 | exit 0;
33 |
--------------------------------------------------------------------------------
/.circleci/script/install-clojure:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | install_dir=${1:-/tmp/clojure}
4 | mkdir -p "$install_dir"
5 | cd /tmp
6 | curl -O -sL https://download.clojure.org/install/clojure-tools-1.10.3.1020.tar.gz
7 | tar xzf clojure-tools-1.10.3.1020.tar.gz
8 | cd clojure-tools
9 | clojure_lib_dir="$install_dir/lib/clojure"
10 | mkdir -p "$clojure_lib_dir/libexec"
11 | cp ./*.jar "$clojure_lib_dir/libexec"
12 | cp deps.edn "$clojure_lib_dir"
13 | cp example-deps.edn "$clojure_lib_dir"
14 |
15 | sed -i -e 's@PREFIX@'"$clojure_lib_dir"'@g' clojure
16 | mkdir -p "$install_dir/bin"
17 | cp clojure "$install_dir/bin"
18 | cp clj "$install_dir/bin"
19 |
20 | cd /tmp
21 | rm -rf clojure-tools-1.10.3.1020.tar.gz
22 | rm -rf clojure-tools
23 | echo "Installed clojure to $install_dir/bin"
24 |
--------------------------------------------------------------------------------
/.circleci/script/install-leiningen:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | curl https://raw.githubusercontent.com/technomancy/leiningen/2.9.1/bin/lein > lein
4 | sudo mkdir -p /usr/local/bin/
5 | sudo mv lein /usr/local/bin/lein
6 | sudo chmod a+x /usr/local/bin/lein
7 |
--------------------------------------------------------------------------------
/.circleci/script/lein:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo '{:a 1}' | lein jet --from edn --to json
4 |
--------------------------------------------------------------------------------
/.circleci/script/performance:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | err=0
4 | function _trap_error() {
5 | local exit_code="$1"
6 | if [ "$exit_code" -ne 2 ] && [ "$exit_code" -ne 3 ]; then
7 | echo "EXIT CODE :( $exit_code"
8 | (( err |= "$exit_code" ))
9 | fi
10 | }
11 |
12 | trap '_trap_error $?' ERR
13 | trap 'exit $err' SIGINT SIGTERM
14 |
15 |
16 | rm -rf performance.txt
17 | echo -e "==== Build initial cache" | tee -a performance.txt
18 | cp="$(clojure -R:cljs -Spath)"
19 | read -r -d '' config <<'EOF' || true
20 | {:linters
21 | {:not-a-function
22 | {:skip-args [clojure.pprint/defdirectives
23 | cljs.pprint/defdirectives
24 | clojure.data.json/codepoint-case]}}}
25 | EOF
26 |
27 | (time ./clj-kondo --lint "$cp" --cache --config "$config") 2>&1 | tee -a performance.txt
28 |
29 | echo -e "\n==== Lint a single file (emulate in-editor usage)" | tee -a performance.txt
30 | (time ./clj-kondo --lint src/clj_kondo/impl/core.clj --cache) 2>&1 | tee -a performance.txt
31 |
32 | count=$(find . -name "*.clj*" -type f | wc -l | tr -d ' ')
33 | echo -e "\n==== Launch clj-kondo for each file in project ($count)" | tee -a performance.txt
34 | (time find src -name "*.clj*" -type f -exec ./clj-kondo --lint {} --cache \; ) 2>&1 | tee -a performance.txt
35 |
36 | exit "$err"
37 |
--------------------------------------------------------------------------------
/.circleci/script/release:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | rm -rf /tmp/release
4 | mkdir -p /tmp/release
5 | cp pod-babashka-aws /tmp/release
6 | VERSION=$(cat resources/POD_BABASHKA_AWS_VERSION)
7 |
8 | cd /tmp/release
9 |
10 | arch=${APP_ARCH:-amd64}
11 |
12 | if [ "$BABASHKA_STATIC" = "true" ]; then
13 | arch="$arch-static"
14 | fi
15 |
16 | ## release binary as zip archive
17 |
18 | zip "pod-babashka-aws-$VERSION-$APP_PLATFORM-$arch.zip" pod-babashka-aws
19 |
20 | ## cleanup
21 |
22 | rm pod-babashka-aws
23 |
--------------------------------------------------------------------------------
/.circleci/script/tools.deps:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | err=0
4 | function _trap_error() {
5 | local exit_code="$1"
6 | if [ "$exit_code" -ne 2 ] && [ "$exit_code" -ne 3 ]; then
7 | (( err |= "$exit_code" ))
8 | fi
9 | }
10 |
11 | trap '_trap_error $?' ERR
12 | trap 'exit $err' SIGINT SIGTERM
13 |
14 |
15 | # Run as local root dependency
16 | rm -rf /tmp/proj
17 | mkdir -p /tmp/proj
18 | cd /tmp/proj
19 | clojure -Sdeps '{:deps {clj-kondo {:local/root "/home/circleci/repo"}}}' \
20 | -m clj-kondo.main --lint /home/circleci/repo/src /home/circleci/repo/test
21 |
22 | # Run as git dependency
23 | rm -rf /tmp/proj
24 | mkdir -p /tmp/proj
25 | cd /tmp/proj
26 |
27 | github_user=${CIRCLE_PR_USERNAME:-borkdude}
28 | clojure -Sdeps "{:deps {clj-kondo {:git/url \"https://github.com/$github_user/clj-kondo\" :sha \"$CIRCLE_SHA1\"}}}" \
29 | -m clj-kondo.main --lint /home/circleci/repo/src /home/circleci/repo/test
30 |
31 | exit "$err"
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .cpcache
2 | target
3 | pom.xml
4 | .lein-failures
5 | classes
6 | /pod-babashka-aws
7 | /pod-babashka-aws.jar
8 | /.clj-kondo/.cache
9 | /.lsp/.cache
10 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## v0.1.2
4 |
5 | - fix [#49](https://github.com/babashka/pod-babashka-aws/issues/49): creation of available services ([@jeroenvandijk](https://github.com/jeroenvandijk))
6 |
7 | ## v0.1.1
8 |
9 | - feat [#46](https://github.com/babashka/pod-babashka-aws/issues/46): Provide aarch64 binary ([@cap10morgan](https://github.com/cap10morgan))
10 | - chore: update deps (see `deps.edn`)
11 |
12 | ## v0.1.0
13 |
14 | - Bump deps (see `deps.edn`)
15 | - Add `pod.babashka.aws.logging` namespace with `set-level!` function. See [docs](https://github.com/babashka/pod-babashka-aws#logging). [#41](https://github.com/babashka/pod-babashka-aws/issues/41)
16 | - Fix transit serialization of `Throwable` and `Class` in `:Error` payload. [#30](https://github.com/babashka/pod-babashka-aws/issues/30)
17 |
18 | ## v0.0.6
19 |
20 | - Bump deps (see `deps.edn`)
21 | - Provide static linux version linked against musl ([@lispyclouds](https://github.com/lispyclouds), [@thiagokokada](https://github.com/thiagokokada))
22 |
23 | ## v0.0.4
24 |
25 | - Bump deps (see `deps.edn`)
26 | - Add forwarding of `aws.sessionToken` system property ([@digash](https://github.com/digash))
27 |
28 | ## v0.0.3
29 |
30 | - Add `pod.babashka.aws.credentials` namespace ([@jeroenvandijk](https://github.com/jeroenvandijk))
31 |
32 | ## v0.0.2
33 |
34 | - Support passing files as blob uploads directly for better memory consumption [#18](https://github.com/babashka/pod-babashka-aws/issues/18)
35 |
36 | ## v0.0.1
37 |
38 | Initial release
39 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | > # pod-babashka-aws * *deprecated*
2 | >
3 | > **Great news! :tada:** [Awyeah-api](https://github.com/grzm/awyeah-api) is a babashka compatible re-implementation of Cognitect's [aws-api](https://github.com/cognitect-labs/aws-api)!
4 | This means that this pod is no longer necessary, and will no longer be maintained.
5 | Please use [Awyeah-api](https://github.com/grzm/awyeah-api).
6 |
7 | A [babashka](https://github.com/babashka/babashka)
8 | [pod](https://github.com/babashka/pods) wrapping the
9 | [aws-api](https://github.com/cognitect-labs/aws-api) library.
10 |
11 | ## Status
12 |
13 | Experimental, awaiting your feedback.
14 |
15 | ## API
16 |
17 | The namespaces and functions in this pod reflect those in the official
18 | [aws-api](https://github.com/cognitect-labs/aws-api) library.
19 |
20 | Available namespaces and functions:
21 |
22 | - `pod.babashka.aws`: `client`, `doc`, `invoke`
23 | - `pod.babashka.aws.config`: `parse`
24 | - `pod.babashka.aws.credentials`: `credential-process-credentials-provider`,
25 | `basic-credentials-provider`, `default-credentials-provider`,
26 | `fetch`, `profile-credentials-provider`, `system-property-credentials-provider`
27 | - `pod.babashka.aws.logging`: `set-level!`
28 |
29 | ## Examples
30 |
31 | ### Single-file script
32 |
33 | ``` clojure
34 | #!/usr/bin/env bb
35 |
36 | (require '[babashka.pods :as pods])
37 |
38 | (pods/load-pod 'org.babashka/aws "0.1.2")
39 |
40 | (require '[pod.babashka.aws :as aws])
41 |
42 | (def region "eu-central-1")
43 |
44 | (def s3-client
45 | (aws/client {:api :s3 :region region}))
46 |
47 | (aws/doc s3-client :ListBuckets)
48 |
49 | (aws/invoke s3-client {:op :ListBuckets})
50 |
51 | (aws/invoke s3-client
52 | {:op :CreateBucket
53 | :request {:Bucket "pod-babashka-aws"
54 | :CreateBucketConfiguration {:LocationConstraint region}}})
55 |
56 | (require '[clojure.java.io :as io])
57 |
58 | (aws/invoke s3-client
59 | {:op :PutObject
60 | :request {:Bucket "pod-babashka-aws"
61 | :Key "logo.png"
62 | :Body (io/file "resources" "babashka.png")}})
63 | ```
64 |
65 | See [test/script.clj](test/script.clj) for an example script.
66 |
67 | ### Project with a bb.edn file
68 |
69 | `bb.edn`:
70 |
71 | ```clojure
72 | {:pods {org.babashka/aws {:version "0.1.2"}}} ; this will be loaded on demand
73 | ```
74 |
75 | Your code:
76 |
77 | ```clojure
78 | (ns my.code
79 | (:require [pod.babashka.aws :as aws] ; required just like a normal Clojure library
80 | [clojure.java.io :as io]))
81 |
82 | (def region "eu-central-1")
83 |
84 | (def s3-client
85 | (aws/client {:api :s3 :region region}))
86 |
87 | (aws/doc s3-client :ListBuckets)
88 |
89 | (aws/invoke s3-client {:op :ListBuckets})
90 |
91 | (aws/invoke s3-client
92 | {:op :CreateBucket
93 | :request {:Bucket "pod-babashka-aws"
94 | :CreateBucketConfiguration {:LocationConstraint region}}})
95 |
96 | (aws/invoke s3-client
97 | {:op :PutObject
98 | :request {:Bucket "pod-babashka-aws"
99 | :Key "logo.png"
100 | :Body (io/file "resources" "babashka.png")}})
101 | ```
102 |
103 | ## Differences with aws-api
104 |
105 | - Credentials: custom flows are supported, but not by extending CredentialsProvider interface. See Credentials for options.
106 | - This pod doesn't require adding dependencies for each AWS service.
107 | - Async might be added in a later version.
108 | - For uploading (big) files (e.g. to S3), it is better for memory consumption to
109 | pass a `java.io.File` directly, rather than an input-stream.
110 |
111 | ## Credentials
112 |
113 | The default behaviour for credentials is the same way as Cognitect's
114 | [`aws-api`](https://github.com/cognitect-labs/aws-api#credentials); meaning the
115 | client implicitly looks up credentials the same way the [java SDK
116 | does](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html)
117 | .
118 |
119 | To provide credentials explicitly, you can pass a `credentials-provider` to the
120 | client constructor fn, e.g.:
121 |
122 | ```clojure
123 | (require '[pod.babashka.aws :as aws])
124 | (require '[pod.babashka.aws.credentials :as credentials])
125 |
126 | (def s3 (aws/client {:api :s3
127 | :credentials-provider (credentials/basic-credentials-provider
128 | {:access-key-id "ABC"
129 | :secret-access-key "XYZ"})}))
130 | ```
131 |
132 | In contrast to the `aws-api` library this pod does not support extending the
133 | CredentialsProvider interface. For more complex flows, e.g. temporary
134 | credentials obtained by `AWS SSO`, one can use a `credential_process` entry in a
135 | `~/.aws/credentials` file, as documented [here](https://docs.aws.amazon.com/credref/latest/refdocs/setting-global-credential_process.html):
136 |
137 | ```clojure
138 | (def s3 (aws/client {:api :s3
139 | :credentials-provider (credentials/credential-process-credentials-provider
140 | "custom-profile")}))
141 | ```
142 |
143 | where `~/.aws/credentials` could look like
144 |
145 | ```
146 | [custom-profile]
147 | credential_process = bb fetch_sso_credentials.clj
148 | ```
149 |
150 | The `credential_process` entry can be any program that prints the expected JSON data:
151 |
152 | ```clojure
153 | #!/usr/bin/env bb
154 |
155 | (println "{\"AccessKeyId\":\"***\",\"SecretAccessKey\":\"***\",\"SessionToken\":\"***\",\"Expiration\":\"2020-01-00T00:00:00Z\",\"Version\":1}")
156 | ```
157 |
158 | ## Logging
159 |
160 | The aws-api includes clojure.tools.logging using the default java.util.logging
161 | implementation. Use `pod.babashka.aws.logging/set-level!` to change the level of
162 | logging in the pod. The default log level in the pod is `:warn`. All possible
163 | levels: `:trace`, `:debug`, `:info`, `:warn`, `:error` or `:fatal`.
164 |
165 | Each aws-api client has its own logger which adopts the logging level
166 | of the global logger at time it was instantiated.
167 |
168 | ```clojure
169 | user=> (def sts-1 (aws/client {:api :sts}))
170 | 2021-11-10 23:07:13.608:INFO::main: Logging initialized @30234ms to org.eclipse.jetty.util.log.StdErrLog
171 | #'user/sts-1
172 |
173 | user=> (keys (aws/invoke sts-1 {:op :GetCallerIdentity}))
174 | (:UserId :Account :Arn)
175 |
176 | user=> (require '[pod.babashka.aws.logging :as logging])
177 | nil
178 |
179 | user=> (logging/set-level! :info)
180 | nil
181 | user=> (def sts-2 (aws/client {:api :sts}))
182 | #'user/sts-2
183 |
184 | user=> (keys (aws/invoke sts-2 {:op :GetCallerIdentity}))
185 | Nov 10, 2021 11:07:45 PM clojure.tools.logging$eval9973$fn__9976 invoke
186 | INFO: Unable to fetch credentials from environment variables.
187 | Nov 10, 2021 11:07:45 PM clojure.tools.logging$eval9973$fn__9976 invoke
188 | INFO: Unable to fetch credentials from system properties.
189 | (:UserId :Account :Arn)
190 |
191 | ;; The sts-1 client still has level :warn:
192 | user=> (keys (aws/invoke sts-1 {:op :GetCallerIdentity}))
193 | (:UserId :Account :Arn)
194 | ```
195 |
196 | ## Build
197 |
198 | Run `script/compile`. This requires `GRAALVM_HOME` to be set.
199 |
200 | ## Update aws-api deps
201 |
202 | Run `script/update-deps.clj`.
203 |
204 | ## Test
205 |
206 | Run `script/test`. This will run both the pod and tests (defined in
207 | `test/script.clj`) in two separate JVMs.
208 |
209 | To test the native-image together with babashka, run the tests while setting
210 | `APP_TEST_ENV` to `native`:
211 |
212 | ``` shell
213 | APP_TEST_ENV=native script/test
214 | ```
215 |
216 | To test with [localstack](https://github.com/localstack/localstack):
217 |
218 | ``` shell
219 | # Start localstack
220 | docker-compose up -d
221 |
222 | # Set test credentials and run tests
223 | AWS_REGION=eu-north-1 AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test script/test
224 | ```
225 |
226 | When adding new services to tests you need to add the service name into `SERVICES` environment variable in `docker-compose.yml` and `.circleci/config.yml`. See [localstack docs](https://github.com/localstack/localstack#configurations) for a list of available services.
227 |
228 | ## License
229 |
230 | Copyright © 2020 Michiel Borkent, Jeroen van Dijk, Rahul De and Valtteri Harmainen.
231 |
232 | Distributed under the Apache License 2.0. See LICENSE.
233 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | version: "v-{build}"
4 |
5 | image: Visual Studio 2017
6 |
7 | clone_folder: C:\projects\babashka
8 |
9 | environment:
10 | GRAALVM_HOME: C:\projects\babashka\graalvm\graalvm-ce-java11-21.3.0
11 | BABASHKA_XMX: "-J-Xmx5g"
12 |
13 | cache:
14 | - '%USERPROFILE%\.m2 -> deps.edn'
15 | - '%USERPROFILE%\.gitlibs -> deps.edn'
16 | - 'graalvm -> appveyor.yml'
17 |
18 | clone_script:
19 | - ps: >-
20 | if(-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
21 | git clone -q --branch=$env:APPVEYOR_REPO_BRANCH https://github.com/$env:APPVEYOR_REPO_NAME.git $env:APPVEYOR_BUILD_FOLDER
22 | cd $env:APPVEYOR_BUILD_FOLDER
23 | git checkout -qf $env:APPVEYOR_REPO_COMMIT
24 | } else {
25 | git clone -q https://github.com/$env:APPVEYOR_REPO_NAME.git $env:APPVEYOR_BUILD_FOLDER
26 | cd $env:APPVEYOR_BUILD_FOLDER
27 | git fetch -q origin +refs/pull/$env:APPVEYOR_PULL_REQUEST_NUMBER/merge:
28 | git checkout -qf FETCH_HEAD
29 | }
30 | - cmd: git submodule update --init --recursive
31 |
32 | build_script:
33 | - cmd: >-
34 |
35 | # set CLJ_KONDO_TEST_ENV=jvm
36 |
37 | # call script/test.bat
38 |
39 | # see https://github.com/quarkusio/quarkus/pull/7663
40 |
41 | - cmd: >-
42 | call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
43 |
44 | powershell -Command "if (Test-Path('graalvm')) { return } else { (New-Object Net.WebClient).DownloadFile('https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-windows-amd64-21.3.0.zip', 'graalvm.zip') }"
45 |
46 | powershell -Command "if (Test-Path('graalvm')) { return } else { Expand-Archive graalvm.zip graalvm }"
47 |
48 | powershell -Command "if (Test-Path('bb.exe')) { return } else { (New-Object Net.WebClient).DownloadFile('https://github.com/babashka/babashka/releases/download/v0.6.4/babashka-0.6.4-windows-amd64.zip', 'bb.zip') }"
49 |
50 | powershell -Command "if (Test-Path('bb.exe')) { return } else { Expand-Archive bb.zip . }"
51 |
52 | - cmd: >-
53 | call script/compile.bat
54 |
55 | artifacts:
56 | - path: pod-babashka-aws-*-windows-amd64.zip
57 | name: pod-babashka-aws
58 |
--------------------------------------------------------------------------------
/aws-libs.edn:
--------------------------------------------------------------------------------
1 | com.cognitect.aws/AWS242AppRegistry #:mvn{:version "810.2.817.0"}
2 | com.cognitect.aws/AWSMigrationHub #:mvn{:version "796.2.657.0"}
3 | com.cognitect.aws/accessanalyzer #:mvn{:version "809.2.784.0"}
4 | com.cognitect.aws/acm #:mvn{:version "809.2.784.0"}
5 | com.cognitect.aws/acm-pca #:mvn{:version "809.2.784.0"}
6 | com.cognitect.aws/alexaforbusiness #:mvn{:version "802.2.713.0"}
7 | com.cognitect.aws/amp #:mvn{:version "810.2.817.0"}
8 | com.cognitect.aws/amplify #:mvn{:version "809.2.797.0"}
9 | com.cognitect.aws/amplifybackend #:mvn{:version "810.2.805.0"}
10 | com.cognitect.aws/apigateway #:mvn{:version "810.2.817.0"}
11 | com.cognitect.aws/apigatewaymanagementapi #:mvn{:version "770.2.568.0"}
12 | com.cognitect.aws/apigatewayv2 #:mvn{:version "809.2.784.0"}
13 | com.cognitect.aws/appconfig #:mvn{:version "801.2.697.0"}
14 | com.cognitect.aws/appflow #:mvn{:version "810.2.801.0"}
15 | com.cognitect.aws/appintegrations #:mvn{:version "810.2.801.0"}
16 | com.cognitect.aws/application-autoscaling #:mvn{:version "809.2.784.0"}
17 | com.cognitect.aws/application-insights #:mvn{:version "810.2.801.0"}
18 | com.cognitect.aws/appmesh #:mvn{:version "809.2.797.0"}
19 | com.cognitect.aws/appstream #:mvn{:version "809.2.734.0"}
20 | com.cognitect.aws/appsync #:mvn{:version "809.2.784.0"}
21 | com.cognitect.aws/athena #:mvn{:version "801.2.687.0"}
22 | com.cognitect.aws/auditmanager #:mvn{:version "810.2.817.0"}
23 | com.cognitect.aws/autoscaling #:mvn{:version "810.2.817.0"}
24 | com.cognitect.aws/autoscaling-plans #:mvn{:version "773.2.578.0"}
25 | com.cognitect.aws/backup #:mvn{:version "809.2.797.0"}
26 | com.cognitect.aws/batch #:mvn{:version "810.2.817.0"}
27 | com.cognitect.aws/braket #:mvn{:version "810.2.797.0"}
28 | com.cognitect.aws/budgets #:mvn{:version "809.2.784.0"}
29 | com.cognitect.aws/ce #:mvn{:version "810.2.817.0"}
30 | com.cognitect.aws/chime #:mvn{:version "809.2.797.0"}
31 | com.cognitect.aws/cloud9 #:mvn{:version "809.2.734.0"}
32 | com.cognitect.aws/clouddirectory #:mvn{:version "770.2.568.0"}
33 | com.cognitect.aws/cloudformation #:mvn{:version "810.2.801.0"}
34 | com.cognitect.aws/cloudfront #:mvn{:version "809.2.784.0"}
35 | com.cognitect.aws/cloudhsm #:mvn{:version "770.2.568.0"}
36 | com.cognitect.aws/cloudhsmv2 #:mvn{:version "809.2.797.0"}
37 | com.cognitect.aws/cloudsearch #:mvn{:version "773.2.571.0"}
38 | com.cognitect.aws/cloudsearchdomain #:mvn{:version "770.2.568.0"}
39 | com.cognitect.aws/cloudtrail #:mvn{:version "810.2.817.0"}
40 | com.cognitect.aws/codeartifact #:mvn{:version "810.2.801.0"}
41 | com.cognitect.aws/codebuild #:mvn{:version "810.2.802.0"}
42 | com.cognitect.aws/codecommit #:mvn{:version "801.2.704.0"}
43 | com.cognitect.aws/codedeploy #:mvn{:version "799.2.681.0"}
44 | com.cognitect.aws/codeguru-reviewer #:mvn{:version "809.2.797.0"}
45 | com.cognitect.aws/codeguruprofiler #:mvn{:version "803.2.717.0"}
46 | com.cognitect.aws/codepipeline #:mvn{:version "809.2.797.0"}
47 | com.cognitect.aws/codestar #:mvn{:version "770.2.568.0"}
48 | com.cognitect.aws/codestar-connections #:mvn{:version "810.2.801.0"}
49 | com.cognitect.aws/codestar-notifications #:mvn{:version "770.2.568.0"}
50 | com.cognitect.aws/cognito-identity #:mvn{:version "809.2.797.0"}
51 | com.cognitect.aws/cognito-idp #:mvn{:version "810.2.801.0"}
52 | com.cognitect.aws/cognito-sync #:mvn{:version "770.2.568.0"}
53 | com.cognitect.aws/comprehend #:mvn{:version "810.2.801.0"}
54 | com.cognitect.aws/comprehendmedical #:mvn{:version "801.2.708.0"}
55 | com.cognitect.aws/compute-optimizer #:mvn{:version "810.2.817.0"}
56 | com.cognitect.aws/config #:mvn{:version "810.2.817.0"}
57 | com.cognitect.aws/connect #:mvn{:version "810.2.817.0"}
58 | com.cognitect.aws/connect-contact-lens #:mvn{:version "810.2.801.0"}
59 | com.cognitect.aws/connectparticipant #:mvn{:version "810.2.817.0"}
60 | com.cognitect.aws/cur #:mvn{:version "809.2.784.0"}
61 | com.cognitect.aws/customer-profiles #:mvn{:version "810.2.802.0"}
62 | com.cognitect.aws/databrew #:mvn{:version "810.2.797.0"}
63 | com.cognitect.aws/dataexchange #:mvn{:version "801.2.698.0"}
64 | com.cognitect.aws/datapipeline #:mvn{:version "770.2.568.0"}
65 | com.cognitect.aws/datasync #:mvn{:version "809.2.797.0"}
66 | com.cognitect.aws/dax #:mvn{:version "770.2.568.0"}
67 | com.cognitect.aws/detective #:mvn{:version "796.2.650.0"}
68 | com.cognitect.aws/devicefarm #:mvn{:version "784.2.595.0"}
69 | com.cognitect.aws/devices #:mvn{:version "770.2.568.0"}
70 | com.cognitect.aws/devops-guru #:mvn{:version "810.2.817.0"}
71 | com.cognitect.aws/directconnect #:mvn{:version "809.2.784.0"}
72 | com.cognitect.aws/discovery #:mvn{:version "788.2.608.0"}
73 | com.cognitect.aws/dlm #:mvn{:version "810.2.817.0"}
74 | com.cognitect.aws/dms #:mvn{:version "810.2.817.0"}
75 | com.cognitect.aws/docdb #:mvn{:version "809.2.784.0"}
76 | com.cognitect.aws/ds #:mvn{:version "810.2.805.0"}
77 | com.cognitect.aws/dynamodb #:mvn{:version "810.2.801.0"}
78 | com.cognitect.aws/ebs #:mvn{:version "809.2.784.0"}
79 | com.cognitect.aws/ec2 #:mvn{:version "810.2.817.0"}
80 | com.cognitect.aws/ec2-instance-connect #:mvn{:version "770.2.568.0"}
81 | com.cognitect.aws/ecr #:mvn{:version "810.2.817.0"}
82 | com.cognitect.aws/ecr-public #:mvn{:version "810.2.801.0"}
83 | com.cognitect.aws/ecs #:mvn{:version "810.2.801.0"}
84 | com.cognitect.aws/eks #:mvn{:version "810.2.801.0"}
85 | com.cognitect.aws/elastic-inference #:mvn{:version "796.2.663.0"}
86 | com.cognitect.aws/elasticache #:mvn{:version "810.2.817.0"}
87 | com.cognitect.aws/elasticbeanstalk #:mvn{:version "810.2.801.0"}
88 | com.cognitect.aws/elasticfilesystem #:mvn{:version "802.2.711.0"}
89 | com.cognitect.aws/elasticloadbalancing #:mvn{:version "809.2.784.0"}
90 | com.cognitect.aws/elasticloadbalancingv2 #:mvn{:version "809.2.797.0"}
91 | com.cognitect.aws/elasticmapreduce #:mvn{:version "810.2.801.0"}
92 | com.cognitect.aws/elastictranscoder #:mvn{:version "770.2.568.0"}
93 | com.cognitect.aws/email #:mvn{:version "770.2.568.0"}
94 | com.cognitect.aws/emr-containers #:mvn{:version "810.2.817.0"}
95 | com.cognitect.aws/entitlement-marketplace #:mvn{:version "770.2.568.0"}
96 | com.cognitect.aws/es #:mvn{:version "809.2.797.0"}
97 | com.cognitect.aws/eventbridge #:mvn{:version "809.2.797.0"}
98 | com.cognitect.aws/events #:mvn{:version "809.2.797.0"}
99 | com.cognitect.aws/firehose #:mvn{:version "807.2.729.0"}
100 | com.cognitect.aws/fms #:mvn{:version "809.2.797.0"}
101 | com.cognitect.aws/forecast #:mvn{:version "810.2.817.0"}
102 | com.cognitect.aws/forecastquery #:mvn{:version "789.2.612.0"}
103 | com.cognitect.aws/frauddetector #:mvn{:version "809.2.797.0"}
104 | com.cognitect.aws/fsx #:mvn{:version "810.2.801.0"}
105 | com.cognitect.aws/gamelift #:mvn{:version "810.2.801.0"}
106 | com.cognitect.aws/glacier #:mvn{:version "770.2.568.0"}
107 | com.cognitect.aws/globalaccelerator #:mvn{:version "810.2.817.0"}
108 | com.cognitect.aws/glue #:mvn{:version "810.2.817.0"}
109 | com.cognitect.aws/greengrass #:mvn{:version "809.2.784.0"}
110 | com.cognitect.aws/greengrassv2 #:mvn{:version "810.2.817.0"}
111 | com.cognitect.aws/groundstation #:mvn{:version "809.2.784.0"}
112 | com.cognitect.aws/guardduty #:mvn{:version "810.2.817.0"}
113 | com.cognitect.aws/health #:mvn{:version "807.2.729.0"}
114 | com.cognitect.aws/healthlake #:mvn{:version "810.2.817.0"}
115 | com.cognitect.aws/honeycode #:mvn{:version "810.2.801.0"}
116 | com.cognitect.aws/iam #:mvn{:version "801.2.704.0"}
117 | com.cognitect.aws/identitystore #:mvn{:version "810.2.797.0"}
118 | com.cognitect.aws/imagebuilder #:mvn{:version "810.2.817.0"}
119 | com.cognitect.aws/importexport #:mvn{:version "770.2.568.0"}
120 | com.cognitect.aws/inspector #:mvn{:version "770.2.568.0"}
121 | com.cognitect.aws/iot #:mvn{:version "810.2.817.0"}
122 | com.cognitect.aws/iot-data #:mvn{:version "801.2.695.0"}
123 | com.cognitect.aws/iot-jobs-data #:mvn{:version "770.2.568.0"}
124 | com.cognitect.aws/iot1click-projects #:mvn{:version "770.2.568.0"}
125 | com.cognitect.aws/iotanalytics #:mvn{:version "810.2.817.0"}
126 | com.cognitect.aws/iotdeviceadvisor #:mvn{:version "810.2.817.0"}
127 | com.cognitect.aws/iotevents #:mvn{:version "796.2.667.0"}
128 | com.cognitect.aws/iotevents-data #:mvn{:version "770.2.568.0"}
129 | com.cognitect.aws/iotfleethub #:mvn{:version "810.2.817.0"}
130 | com.cognitect.aws/iotsecuretunneling #:mvn{:version "809.2.797.0"}
131 | com.cognitect.aws/iotsitewise #:mvn{:version "810.2.817.0"}
132 | com.cognitect.aws/iotthingsgraph #:mvn{:version "770.2.568.0"}
133 | com.cognitect.aws/iotwireless #:mvn{:version "810.2.817.0"}
134 | com.cognitect.aws/ivs #:mvn{:version "809.2.784.0"}
135 | com.cognitect.aws/kafka #:mvn{:version "810.2.805.0"}
136 | com.cognitect.aws/kendra #:mvn{:version "810.2.817.0"}
137 | com.cognitect.aws/kinesis #:mvn{:version "809.2.784.0"}
138 | com.cognitect.aws/kinesis-video-archived-media #:mvn{:version "796.2.665.0"}
139 | com.cognitect.aws/kinesis-video-media #:mvn{:version "770.2.568.0"}
140 | com.cognitect.aws/kinesis-video-signaling #:mvn{:version "781.2.585.0"}
141 | com.cognitect.aws/kinesisanalytics #:mvn{:version "770.2.568.0"}
142 | com.cognitect.aws/kinesisanalyticsv2 #:mvn{:version "809.2.797.0"}
143 | com.cognitect.aws/kinesisvideo #:mvn{:version "796.2.665.0"}
144 | com.cognitect.aws/kms #:mvn{:version "810.2.817.0"}
145 | com.cognitect.aws/lakeformation #:mvn{:version "809.2.784.0"}
146 | com.cognitect.aws/lambda #:mvn{:version "810.2.817.0"}
147 | com.cognitect.aws/lex-models #:mvn{:version "810.2.801.0"}
148 | com.cognitect.aws/license-manager #:mvn{:version "810.2.805.0"}
149 | com.cognitect.aws/lightsail #:mvn{:version "809.2.797.0"}
150 | com.cognitect.aws/location #:mvn{:version "810.2.817.0"}
151 | com.cognitect.aws/logs #:mvn{:version "809.2.784.0"}
152 | com.cognitect.aws/lookoutvision #:mvn{:version "810.2.801.0"}
153 | com.cognitect.aws/machinelearning #:mvn{:version "770.2.568.0"}
154 | com.cognitect.aws/macie #:mvn{:version "801.2.684.0"}
155 | com.cognitect.aws/macie2 #:mvn{:version "809.2.797.0"}
156 | com.cognitect.aws/managedblockchain #:mvn{:version "810.2.817.0"}
157 | com.cognitect.aws/marketplace-catalog #:mvn{:version "809.2.784.0"}
158 | com.cognitect.aws/marketplacecommerceanalytics #:mvn{:version "809.2.784.0"}
159 | com.cognitect.aws/mediaconnect #:mvn{:version "809.2.784.0"}
160 | com.cognitect.aws/mediaconvert #:mvn{:version "810.2.801.0"}
161 | com.cognitect.aws/medialive #:mvn{:version "810.2.805.0"}
162 | com.cognitect.aws/mediapackage #:mvn{:version "809.2.784.0"}
163 | com.cognitect.aws/mediapackage-vod #:mvn{:version "801.2.690.0"}
164 | com.cognitect.aws/mediastore #:mvn{:version "796.2.650.0"}
165 | com.cognitect.aws/mediastore-data #:mvn{:version "770.2.568.0"}
166 | com.cognitect.aws/mediatailor #:mvn{:version "809.2.784.0"}
167 | com.cognitect.aws/meteringmarketplace #:mvn{:version "809.2.797.0"}
168 | com.cognitect.aws/migrationhub-config #:mvn{:version "796.2.656.0"}
169 | com.cognitect.aws/mobile #:mvn{:version "770.2.568.0"}
170 | com.cognitect.aws/mobileanalytics #:mvn{:version "770.2.568.0"}
171 | com.cognitect.aws/monitoring #:mvn{:version "810.2.817.0"}
172 | com.cognitect.aws/mq #:mvn{:version "809.2.797.0"}
173 | com.cognitect.aws/mturk-requester #:mvn{:version "770.2.568.0"}
174 | com.cognitect.aws/mwaa #:mvn{:version "810.2.801.0"}
175 | com.cognitect.aws/neptune #:mvn{:version "809.2.784.0"}
176 | com.cognitect.aws/network-firewall #:mvn{:version "810.2.797.0"}
177 | com.cognitect.aws/networkmanager #:mvn{:version "810.2.817.0"}
178 | com.cognitect.aws/opsworks #:mvn{:version "770.2.568.0"}
179 | com.cognitect.aws/opsworkscm #:mvn{:version "801.2.701.0"}
180 | com.cognitect.aws/organizations #:mvn{:version "809.2.784.0"}
181 | com.cognitect.aws/outposts #:mvn{:version "810.2.817.0"}
182 | com.cognitect.aws/personalize #:mvn{:version "807.2.729.0"}
183 | com.cognitect.aws/personalize-events #:mvn{:version "809.2.784.0"}
184 | com.cognitect.aws/personalize-runtime #:mvn{:version "810.2.817.0"}
185 | com.cognitect.aws/pi #:mvn{:version "810.2.817.0"}
186 | com.cognitect.aws/pinpoint #:mvn{:version "809.2.784.0"}
187 | com.cognitect.aws/pinpoint-email #:mvn{:version "770.2.568.0"}
188 | com.cognitect.aws/pinpoint-sms-voice #:mvn{:version "770.2.568.0"}
189 | com.cognitect.aws/polly #:mvn{:version "809.2.797.0"}
190 | com.cognitect.aws/pricing #:mvn{:version "770.2.568.0"}
191 | com.cognitect.aws/qldb #:mvn{:version "801.2.698.0"}
192 | com.cognitect.aws/qldb-session #:mvn{:version "810.2.817.0"}
193 | com.cognitect.aws/quicksight #:mvn{:version "810.2.817.0"}
194 | com.cognitect.aws/ram #:mvn{:version "796.2.662.0"}
195 | com.cognitect.aws/rds #:mvn{:version "810.2.817.0"}
196 | com.cognitect.aws/rds-data #:mvn{:version "795.2.645.0"}
197 | com.cognitect.aws/redshift #:mvn{:version "810.2.817.0"}
198 | com.cognitect.aws/redshift-data #:mvn{:version "810.2.801.0"}
199 | com.cognitect.aws/rekognition #:mvn{:version "809.2.784.0"}
200 | com.cognitect.aws/resource-groups #:mvn{:version "810.2.817.0"}
201 | com.cognitect.aws/resourcegroupstaggingapi #:mvn{:version "809.2.784.0"}
202 | com.cognitect.aws/robomaker #:mvn{:version "809.2.797.0"}
203 | com.cognitect.aws/route53 #:mvn{:version "810.2.817.0"}
204 | com.cognitect.aws/route53domains #:mvn{:version "796.2.660.0"}
205 | com.cognitect.aws/route53resolver #:mvn{:version "810.2.817.0"}
206 | com.cognitect.aws/runtime-lex #:mvn{:version "809.2.797.0"}
207 | com.cognitect.aws/runtime-sagemaker #:mvn{:version "810.2.817.0"}
208 | com.cognitect.aws/s3 #:mvn{:version "810.2.817.0"}
209 | com.cognitect.aws/s3control #:mvn{:version "809.2.797.0"}
210 | com.cognitect.aws/s3outposts #:mvn{:version "810.2.797.0"}
211 | com.cognitect.aws/sagemaker #:mvn{:version "810.2.817.0"}
212 | com.cognitect.aws/sagemaker-a2i-runtime #:mvn{:version "796.2.657.0"}
213 | com.cognitect.aws/sagemaker-edge #:mvn{:version "810.2.817.0"}
214 | com.cognitect.aws/sagemaker-featurestore-runtime #:mvn{:version "810.2.801.0"}
215 | com.cognitect.aws/savingsplans #:mvn{:version "809.2.784.0"}
216 | com.cognitect.aws/schemas #:mvn{:version "809.2.784.0"}
217 | com.cognitect.aws/sdb #:mvn{:version "770.2.568.0"}
218 | com.cognitect.aws/secretsmanager #:mvn{:version "802.2.713.0"}
219 | com.cognitect.aws/securityhub #:mvn{:version "810.2.817.0"}
220 | com.cognitect.aws/serverlessrepo #:mvn{:version "794.2.637.0"}
221 | com.cognitect.aws/service-quotas #:mvn{:version "810.2.817.0"}
222 | com.cognitect.aws/servicecatalog #:mvn{:version "810.2.817.0"}
223 | com.cognitect.aws/servicediscovery #:mvn{:version "809.2.784.0"}
224 | com.cognitect.aws/sesv2 #:mvn{:version "809.2.784.0"}
225 | com.cognitect.aws/shield #:mvn{:version "809.2.797.0"}
226 | com.cognitect.aws/signer #:mvn{:version "810.2.801.0"}
227 | com.cognitect.aws/sms #:mvn{:version "807.2.729.0"}
228 | com.cognitect.aws/snowball #:mvn{:version "809.2.784.0"}
229 | com.cognitect.aws/sns #:mvn{:version "809.2.797.0"}
230 | com.cognitect.aws/sqs #:mvn{:version "810.2.817.0"}
231 | com.cognitect.aws/ssm #:mvn{:version "810.2.817.0"}
232 | com.cognitect.aws/sso #:mvn{:version "770.2.568.0"}
233 | com.cognitect.aws/sso-admin #:mvn{:version "810.2.801.0"}
234 | com.cognitect.aws/sso-oidc #:mvn{:version "770.2.568.0"}
235 | com.cognitect.aws/states #:mvn{:version "810.2.801.0"}
236 | com.cognitect.aws/storagegateway #:mvn{:version "809.2.797.0"}
237 | com.cognitect.aws/streams-dynamodb #:mvn{:version "809.2.784.0"}
238 | com.cognitect.aws/sts #:mvn{:version "809.2.784.0"}
239 | com.cognitect.aws/support #:mvn{:version "801.2.700.0"}
240 | com.cognitect.aws/swf #:mvn{:version "770.2.568.0"}
241 | com.cognitect.aws/synthetics #:mvn{:version "809.2.797.0"}
242 | com.cognitect.aws/textract #:mvn{:version "809.2.797.0"}
243 | com.cognitect.aws/timestream-query #:mvn{:version "810.2.801.0"}
244 | com.cognitect.aws/timestream-write #:mvn{:version "810.2.801.0"}
245 | com.cognitect.aws/transcribe #:mvn{:version "809.2.784.0"}
246 | com.cognitect.aws/transfer #:mvn{:version "809.2.784.0"}
247 | com.cognitect.aws/translate #:mvn{:version "810.2.801.0"}
248 | com.cognitect.aws/waf #:mvn{:version "796.2.666.0"}
249 | com.cognitect.aws/waf-regional #:mvn{:version "796.2.666.0"}
250 | com.cognitect.aws/wafv2 #:mvn{:version "809.2.784.0"}
251 | com.cognitect.aws/wellarchitected #:mvn{:version "810.2.817.0"}
252 | com.cognitect.aws/workdocs #:mvn{:version "793.2.629.0"}
253 | com.cognitect.aws/worklink #:mvn{:version "801.2.687.0"}
254 | com.cognitect.aws/workmail #:mvn{:version "809.2.784.0"}
255 | com.cognitect.aws/workmailmessageflow #:mvn{:version "770.2.568.0"}
256 | com.cognitect.aws/workspaces #:mvn{:version "810.2.805.0"}
257 | com.cognitect.aws/xray #:mvn{:version "809.2.797.0"}
--------------------------------------------------------------------------------
/build.clj:
--------------------------------------------------------------------------------
1 | ;; see https://ask.clojure.org/index.php/10905/control-transient-deps-that-compiled-assembled-into-uberjar?show=10913#c10913
2 | (require 'clojure.tools.deps.alpha.util.s3-transporter)
3 |
4 | (ns build
5 | (:require [clojure.string :as str]
6 | [clojure.tools.build.api :as b]))
7 |
8 | (def lib 'pod-babashka-aws)
9 | (def version (str/trim (slurp "resources/POD_BABASHKA_AWS_VERSION")))
10 | (def class-dir "target/classes")
11 | (def basis (b/create-basis {:project "deps.edn" :aliases [:native]}))
12 | (def uber-file "target/pod-babashka-aws.jar")
13 |
14 | (defn clean [_]
15 | (b/delete {:path "target"}))
16 |
17 | (defn uber [_]
18 | (clean nil)
19 | (b/copy-dir {:src-dirs ["src" "resources"]
20 | :target-dir class-dir})
21 | (b/compile-clj {:basis basis
22 | :src-dirs ["src"]
23 | :ns-compile '[pod.babashka.aws]
24 | :class-dir class-dir
25 | :compile-opts {:direct-linking true}})
26 | (b/uber {:class-dir class-dir
27 | :uber-file uber-file
28 | :basis basis}))
29 |
--------------------------------------------------------------------------------
/deps.edn:
--------------------------------------------------------------------------------
1 | ;; NOTE: do not edit this directly. Edit deps.template.edn instead and run script/update-deps.edn.clj
2 | {:paths ["src" "resources"]
3 | :aliases {:native {:jvm-opts ["-Dclojure.compiler.direct-linking=true"]
4 | :extra-deps {org.clojure/clojure {:mvn/version "1.10.3"}
5 | com.github.clj-easy/graal-build-time {:mvn/version "0.1.3"}}}
6 | :build
7 | {:deps {io.github.clojure/tools.build {:tag "v0.6.5" :sha "a0c3ff6"}}
8 | :ns-default build}}
9 | :deps {com.cognitect/transit-clj {:mvn/version "1.0.324"}
10 | nrepl/bencode {:mvn/version "1.1.0"}
11 | babashka/pods {:git/url "https://github.com/babashka/pods"
12 | :sha "f360afa6135b8bd2d384d9ba4582c0de6fdac804"}
13 | ;; from https://raw.githubusercontent.com/cognitect-labs/aws-api/master/latest-releases.edn
14 | com.cognitect.aws/AWS242AppRegistry {:mvn/version "814.2.986.0" :aws/serviceFullName "AWS Service Catalog App Registry"}
15 | com.cognitect.aws/AWSApplicationCostProfiler {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Application Cost Profiler"}
16 | com.cognitect.aws/AWSMigrationHub {:mvn/version "796.2.657.0" :aws/serviceFullName "AWS Migration Hub"}
17 | com.cognitect.aws/accessanalyzer {:mvn/version "814.2.986.0" :aws/serviceFullName "Access Analyzer"}
18 | com.cognitect.aws/account {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Account"}
19 | com.cognitect.aws/acm {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Certificate Manager"}
20 | com.cognitect.aws/acm-pca {:mvn/version "814.2.986.0" :aws/serviceFullName "AWS Certificate Manager Private Certificate Authority"}
21 | com.cognitect.aws/alexaforbusiness {:mvn/version "811.2.889.0" :aws/serviceFullName "Alexa For Business"}
22 | com.cognitect.aws/amp {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Prometheus Service"}
23 | com.cognitect.aws/amplify {:mvn/version "809.2.797.0" :aws/serviceFullName "AWS Amplify"}
24 | com.cognitect.aws/amplifybackend {:mvn/version "814.2.1008.0" :aws/serviceFullName "AmplifyBackend"}
25 | com.cognitect.aws/api {:mvn/version "0.8.539" :aws/serviceFullName ""}
26 | com.cognitect.aws/apigateway {:mvn/version "814.2.977.0" :aws/serviceFullName "Amazon API Gateway"}
27 | com.cognitect.aws/apigatewaymanagementapi {:mvn/version "770.2.568.0" :aws/serviceFullName "AmazonApiGatewayManagementApi"}
28 | com.cognitect.aws/apigatewayv2 {:mvn/version "813.2.972.0" :aws/serviceFullName "AmazonApiGatewayV2"}
29 | com.cognitect.aws/appconfig {:mvn/version "801.2.697.0" :aws/serviceFullName "Amazon AppConfig"}
30 | com.cognitect.aws/appflow {:mvn/version "814.2.1012.0" :aws/serviceFullName "Amazon Appflow"}
31 | com.cognitect.aws/appintegrations {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon AppIntegrations Service"}
32 | com.cognitect.aws/application-autoscaling {:mvn/version "814.2.1008.0" :aws/serviceFullName "Application Auto Scaling"}
33 | com.cognitect.aws/application-insights {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon CloudWatch Application Insights"}
34 | com.cognitect.aws/appmesh {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS App Mesh"}
35 | com.cognitect.aws/apprunner {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS App Runner"}
36 | com.cognitect.aws/appstream {:mvn/version "811.2.889.0" :aws/serviceFullName "Amazon AppStream"}
37 | com.cognitect.aws/appsync {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS AppSync"}
38 | com.cognitect.aws/athena {:mvn/version "813.2.963.0" :aws/serviceFullName "Amazon Athena"}
39 | com.cognitect.aws/auditmanager {:mvn/version "814.2.1023.0" :aws/serviceFullName "AWS Audit Manager"}
40 | com.cognitect.aws/autoscaling {:mvn/version "814.2.1023.0" :aws/serviceFullName "Auto Scaling"}
41 | com.cognitect.aws/autoscaling-plans {:mvn/version "811.2.824.0" :aws/serviceFullName "AWS Auto Scaling Plans"}
42 | com.cognitect.aws/backup {:mvn/version "814.2.1028.0" :aws/serviceFullName "AWS Backup"}
43 | com.cognitect.aws/batch {:mvn/version "814.2.1028.0" :aws/serviceFullName "AWS Batch"}
44 | com.cognitect.aws/braket {:mvn/version "811.2.934.0" :aws/serviceFullName "Braket"}
45 | com.cognitect.aws/budgets {:mvn/version "809.2.784.0" :aws/serviceFullName "AWS Budgets"}
46 | com.cognitect.aws/ce {:mvn/version "813.2.972.0" :aws/serviceFullName "AWS Cost Explorer Service"}
47 | com.cognitect.aws/chime {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Chime"}
48 | com.cognitect.aws/chime-sdk-identity {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Chime SDK Identity"}
49 | com.cognitect.aws/chime-sdk-meetings {:mvn/version "814.2.1028.0" :aws/serviceFullName "Amazon Chime SDK Meetings"}
50 | com.cognitect.aws/chime-sdk-messaging {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Chime SDK Messaging"}
51 | com.cognitect.aws/cloud9 {:mvn/version "813.2.972.0" :aws/serviceFullName "AWS Cloud9"}
52 | com.cognitect.aws/cloudcontrol {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Cloud Control API"}
53 | com.cognitect.aws/clouddirectory {:mvn/version "813.2.972.0" :aws/serviceFullName "Amazon CloudDirectory"}
54 | com.cognitect.aws/cloudformation {:mvn/version "814.2.991.0" :aws/serviceFullName "AWS CloudFormation"}
55 | com.cognitect.aws/cloudfront {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon CloudFront"}
56 | com.cognitect.aws/cloudhsm {:mvn/version "811.2.889.0" :aws/serviceFullName "Amazon CloudHSM"}
57 | com.cognitect.aws/cloudhsmv2 {:mvn/version "809.2.797.0" :aws/serviceFullName "AWS CloudHSM V2"}
58 | com.cognitect.aws/cloudsearch {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon CloudSearch"}
59 | com.cognitect.aws/cloudsearchdomain {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon CloudSearch Domain"}
60 | com.cognitect.aws/cloudtrail {:mvn/version "814.2.986.0" :aws/serviceFullName "AWS CloudTrail"}
61 | com.cognitect.aws/codeartifact {:mvn/version "811.2.934.0" :aws/serviceFullName "CodeArtifact"}
62 | com.cognitect.aws/codebuild {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS CodeBuild"}
63 | com.cognitect.aws/codecommit {:mvn/version "801.2.704.0" :aws/serviceFullName "AWS CodeCommit"}
64 | com.cognitect.aws/codedeploy {:mvn/version "811.2.865.0" :aws/serviceFullName "AWS CodeDeploy"}
65 | com.cognitect.aws/codeguru-reviewer {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon CodeGuru Reviewer"}
66 | com.cognitect.aws/codeguruprofiler {:mvn/version "811.2.865.0" :aws/serviceFullName "Amazon CodeGuru Profiler"}
67 | com.cognitect.aws/codepipeline {:mvn/version "811.2.858.0" :aws/serviceFullName "AWS CodePipeline"}
68 | com.cognitect.aws/codestar {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS CodeStar"}
69 | com.cognitect.aws/codestar-connections {:mvn/version "811.2.889.0" :aws/serviceFullName "AWS CodeStar connections"}
70 | com.cognitect.aws/codestar-notifications {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS CodeStar Notifications"}
71 | com.cognitect.aws/cognito-identity {:mvn/version "811.2.834.0" :aws/serviceFullName "Amazon Cognito Identity"}
72 | com.cognitect.aws/cognito-idp {:mvn/version "811.2.958.0" :aws/serviceFullName "Amazon Cognito Identity Provider"}
73 | com.cognitect.aws/cognito-sync {:mvn/version "811.2.889.0" :aws/serviceFullName "Amazon Cognito Sync"}
74 | com.cognitect.aws/comprehend {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Comprehend"}
75 | com.cognitect.aws/comprehendmedical {:mvn/version "811.2.889.0" :aws/serviceFullName "AWS Comprehend Medical"}
76 | com.cognitect.aws/compute-optimizer {:mvn/version "814.2.986.0" :aws/serviceFullName "AWS Compute Optimizer"}
77 | com.cognitect.aws/config {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Config"}
78 | com.cognitect.aws/connect {:mvn/version "814.2.1028.0" :aws/serviceFullName "Amazon Connect Service"}
79 | com.cognitect.aws/connect-contact-lens {:mvn/version "810.2.801.0" :aws/serviceFullName "Amazon Connect Contact Lens"}
80 | com.cognitect.aws/connectparticipant {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Connect Participant Service"}
81 | com.cognitect.aws/cur {:mvn/version "811.2.865.0" :aws/serviceFullName "AWS Cost and Usage Report Service"}
82 | com.cognitect.aws/customer-profiles {:mvn/version "813.2.972.0" :aws/serviceFullName "Amazon Connect Customer Profiles"}
83 | com.cognitect.aws/databrew {:mvn/version "813.2.972.0" :aws/serviceFullName "AWS Glue DataBrew"}
84 | com.cognitect.aws/dataexchange {:mvn/version "814.2.1012.0" :aws/serviceFullName "AWS Data Exchange"}
85 | com.cognitect.aws/datapipeline {:mvn/version "811.2.889.0" :aws/serviceFullName "AWS Data Pipeline"}
86 | com.cognitect.aws/datasync {:mvn/version "814.2.1023.0" :aws/serviceFullName "AWS DataSync"}
87 | com.cognitect.aws/dax {:mvn/version "811.2.934.0" :aws/serviceFullName "Amazon DynamoDB Accelerator (DAX)"}
88 | com.cognitect.aws/detective {:mvn/version "811.2.934.0" :aws/serviceFullName "Amazon Detective"}
89 | com.cognitect.aws/devicefarm {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Device Farm"}
90 | com.cognitect.aws/devices {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS IoT 1-Click Devices Service"}
91 | com.cognitect.aws/devops-guru {:mvn/version "814.2.1028.0" :aws/serviceFullName "Amazon DevOps Guru"}
92 | com.cognitect.aws/directconnect {:mvn/version "814.2.1012.0" :aws/serviceFullName "AWS Direct Connect"}
93 | com.cognitect.aws/discovery {:mvn/version "788.2.608.0" :aws/serviceFullName "AWS Application Discovery Service"}
94 | com.cognitect.aws/dlm {:mvn/version "814.2.977.0" :aws/serviceFullName "Amazon Data Lifecycle Manager"}
95 | com.cognitect.aws/dms {:mvn/version "814.2.991.0" :aws/serviceFullName "AWS Database Migration Service"}
96 | com.cognitect.aws/docdb {:mvn/version "811.2.934.0" :aws/serviceFullName "Amazon DocumentDB with MongoDB compatibility"}
97 | com.cognitect.aws/ds {:mvn/version "813.2.972.0" :aws/serviceFullName "AWS Directory Service"}
98 | com.cognitect.aws/dynamodb {:mvn/version "814.2.1028.0" :aws/serviceFullName "Amazon DynamoDB"}
99 | com.cognitect.aws/ebs {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon Elastic Block Store"}
100 | com.cognitect.aws/ec2 {:mvn/version "814.2.1028.0" :aws/serviceFullName "Amazon Elastic Compute Cloud"}
101 | com.cognitect.aws/ec2-instance-connect {:mvn/version "811.2.889.0" :aws/serviceFullName "AWS EC2 Instance Connect"}
102 | com.cognitect.aws/ecr {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon EC2 Container Registry"}
103 | com.cognitect.aws/ecr-public {:mvn/version "811.2.858.0" :aws/serviceFullName "Amazon Elastic Container Registry Public"}
104 | com.cognitect.aws/ecs {:mvn/version "814.2.1028.0" :aws/serviceFullName "Amazon EC2 Container Service"}
105 | com.cognitect.aws/eks {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Elastic Kubernetes Service"}
106 | com.cognitect.aws/elastic-inference {:mvn/version "796.2.663.0" :aws/serviceFullName "Amazon Elastic Inference"}
107 | com.cognitect.aws/elasticache {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon ElastiCache"}
108 | com.cognitect.aws/elasticbeanstalk {:mvn/version "810.2.801.0" :aws/serviceFullName "AWS Elastic Beanstalk"}
109 | com.cognitect.aws/elasticfilesystem {:mvn/version "814.2.1012.0" :aws/serviceFullName "Amazon Elastic File System"}
110 | com.cognitect.aws/elasticloadbalancing {:mvn/version "809.2.784.0" :aws/serviceFullName "Elastic Load Balancing"}
111 | com.cognitect.aws/elasticloadbalancingv2 {:mvn/version "814.2.1008.0" :aws/serviceFullName "Elastic Load Balancing"}
112 | com.cognitect.aws/elasticmapreduce {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon EMR"}
113 | com.cognitect.aws/elastictranscoder {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Elastic Transcoder"}
114 | com.cognitect.aws/email {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Simple Email Service"}
115 | com.cognitect.aws/emr-containers {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon EMR Containers"}
116 | com.cognitect.aws/endpoints {:mvn/version "1.1.12.110" :aws/serviceFullName ""}
117 | com.cognitect.aws/entitlement-marketplace {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS Marketplace Entitlement Service"}
118 | com.cognitect.aws/es {:mvn/version "814.2.991.0" :aws/serviceFullName "Amazon Elasticsearch Service"}
119 | com.cognitect.aws/eventbridge {:mvn/version "814.2.977.0" :aws/serviceFullName "Amazon EventBridge"}
120 | com.cognitect.aws/events {:mvn/version "814.2.977.0" :aws/serviceFullName "Amazon CloudWatch Events"}
121 | com.cognitect.aws/finspace {:mvn/version "811.2.934.0" :aws/serviceFullName "FinSpace Public API"}
122 | com.cognitect.aws/firehose {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Kinesis Firehose"}
123 | com.cognitect.aws/fis {:mvn/version "811.2.889.0" :aws/serviceFullName "AWS Fault Injection Simulator"}
124 | com.cognitect.aws/fms {:mvn/version "814.2.977.0" :aws/serviceFullName "Firewall Management Service"}
125 | com.cognitect.aws/forecast {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon Forecast Service"}
126 | com.cognitect.aws/forecastquery {:mvn/version "789.2.612.0" :aws/serviceFullName "Amazon Forecast Query Service"}
127 | com.cognitect.aws/frauddetector {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Fraud Detector"}
128 | com.cognitect.aws/fsx {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon FSx"}
129 | com.cognitect.aws/gamelift {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon GameLift"}
130 | com.cognitect.aws/glacier {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Glacier"}
131 | com.cognitect.aws/globalaccelerator {:mvn/version "811.2.844.0" :aws/serviceFullName "AWS Global Accelerator"}
132 | com.cognitect.aws/glue {:mvn/version "814.2.1012.0" :aws/serviceFullName "AWS Glue"}
133 | com.cognitect.aws/grafana {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Managed Grafana"}
134 | com.cognitect.aws/greengrass {:mvn/version "811.2.889.0" :aws/serviceFullName "AWS Greengrass"}
135 | com.cognitect.aws/greengrassv2 {:mvn/version "814.2.1028.0" :aws/serviceFullName "AWS IoT Greengrass V2"}
136 | com.cognitect.aws/groundstation {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Ground Station"}
137 | com.cognitect.aws/guardduty {:mvn/version "810.2.817.0" :aws/serviceFullName "Amazon GuardDuty"}
138 | com.cognitect.aws/health {:mvn/version "814.2.1028.0" :aws/serviceFullName "AWS Health APIs and Notifications"}
139 | com.cognitect.aws/healthlake {:mvn/version "811.2.958.0" :aws/serviceFullName "Amazon HealthLake"}
140 | com.cognitect.aws/honeycode {:mvn/version "810.2.801.0" :aws/serviceFullName "Amazon Honeycode"}
141 | com.cognitect.aws/iam {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Identity and Access Management"}
142 | com.cognitect.aws/identitystore {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS SSO Identity Store"}
143 | com.cognitect.aws/imagebuilder {:mvn/version "814.2.1008.0" :aws/serviceFullName "EC2 Image Builder"}
144 | com.cognitect.aws/importexport {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS Import/Export"}
145 | com.cognitect.aws/inspector {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Inspector"}
146 | com.cognitect.aws/iot {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS IoT"}
147 | com.cognitect.aws/iot-data {:mvn/version "814.2.977.0" :aws/serviceFullName "AWS IoT Data Plane"}
148 | com.cognitect.aws/iot-jobs-data {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS IoT Jobs Data Plane"}
149 | com.cognitect.aws/iot1click-projects {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS IoT 1-Click Projects Service"}
150 | com.cognitect.aws/iotanalytics {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS IoT Analytics"}
151 | com.cognitect.aws/iotdeviceadvisor {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS IoT Core Device Advisor"}
152 | com.cognitect.aws/iotevents {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS IoT Events"}
153 | com.cognitect.aws/iotevents-data {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS IoT Events Data"}
154 | com.cognitect.aws/iotfleethub {:mvn/version "810.2.817.0" :aws/serviceFullName "AWS IoT Fleet Hub"}
155 | com.cognitect.aws/iotsecuretunneling {:mvn/version "809.2.797.0" :aws/serviceFullName "AWS IoT Secure Tunneling"}
156 | com.cognitect.aws/iotsitewise {:mvn/version "814.2.977.0" :aws/serviceFullName "AWS IoT SiteWise"}
157 | com.cognitect.aws/iotthingsgraph {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS IoT Things Graph"}
158 | com.cognitect.aws/iotwireless {:mvn/version "814.2.1023.0" :aws/serviceFullName "AWS IoT Wireless"}
159 | com.cognitect.aws/ivs {:mvn/version "814.2.1012.0" :aws/serviceFullName "Amazon Interactive Video Service"}
160 | com.cognitect.aws/kafka {:mvn/version "814.2.986.0" :aws/serviceFullName "Managed Streaming for Kafka"}
161 | com.cognitect.aws/kafkaconnect {:mvn/version "814.2.991.0" :aws/serviceFullName "Managed Streaming for Kafka Connect"}
162 | com.cognitect.aws/kendra {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWSKendraFrontendService"}
163 | com.cognitect.aws/kinesis {:mvn/version "809.2.784.0" :aws/serviceFullName "Amazon Kinesis"}
164 | com.cognitect.aws/kinesis-video-archived-media {:mvn/version "811.2.889.0" :aws/serviceFullName "Amazon Kinesis Video Streams Archived Media"}
165 | com.cognitect.aws/kinesis-video-media {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Kinesis Video Streams Media"}
166 | com.cognitect.aws/kinesis-video-signaling {:mvn/version "781.2.585.0" :aws/serviceFullName "Amazon Kinesis Video Signaling Channels"}
167 | com.cognitect.aws/kinesisanalytics {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Kinesis Analytics"}
168 | com.cognitect.aws/kinesisanalyticsv2 {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Kinesis Analytics"}
169 | com.cognitect.aws/kinesisvideo {:mvn/version "796.2.665.0" :aws/serviceFullName "Amazon Kinesis Video Streams"}
170 | com.cognitect.aws/kms {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Key Management Service"}
171 | com.cognitect.aws/lakeformation {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Lake Formation"}
172 | com.cognitect.aws/lambda {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Lambda"}
173 | com.cognitect.aws/lex-models {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon Lex Model Building Service"}
174 | com.cognitect.aws/license-manager {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS License Manager"}
175 | com.cognitect.aws/lightsail {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Lightsail"}
176 | com.cognitect.aws/location {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Location Service"}
177 | com.cognitect.aws/logs {:mvn/version "813.2.972.0" :aws/serviceFullName "Amazon CloudWatch Logs"}
178 | com.cognitect.aws/lookoutequipment {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon Lookout for Equipment"}
179 | com.cognitect.aws/lookoutmetrics {:mvn/version "811.2.934.0" :aws/serviceFullName "Amazon Lookout for Metrics"}
180 | com.cognitect.aws/lookoutvision {:mvn/version "811.2.850.0" :aws/serviceFullName "Amazon Lookout for Vision"}
181 | com.cognitect.aws/machinelearning {:mvn/version "811.2.889.0" :aws/serviceFullName "Amazon Machine Learning"}
182 | com.cognitect.aws/macie {:mvn/version "811.2.844.0" :aws/serviceFullName "Amazon Macie"}
183 | com.cognitect.aws/macie2 {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Macie 2"}
184 | com.cognitect.aws/managedblockchain {:mvn/version "811.2.934.0" :aws/serviceFullName "Amazon Managed Blockchain"}
185 | com.cognitect.aws/marketplace-catalog {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Marketplace Catalog Service"}
186 | com.cognitect.aws/marketplacecommerceanalytics {:mvn/version "809.2.784.0" :aws/serviceFullName "AWS Marketplace Commerce Analytics"}
187 | com.cognitect.aws/mediaconnect {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS MediaConnect"}
188 | com.cognitect.aws/mediaconvert {:mvn/version "814.2.1028.0" :aws/serviceFullName "AWS Elemental MediaConvert"}
189 | com.cognitect.aws/medialive {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Elemental MediaLive"}
190 | com.cognitect.aws/mediapackage {:mvn/version "814.2.1012.0" :aws/serviceFullName "AWS Elemental MediaPackage"}
191 | com.cognitect.aws/mediapackage-vod {:mvn/version "814.2.1012.0" :aws/serviceFullName "AWS Elemental MediaPackage VOD"}
192 | com.cognitect.aws/mediastore {:mvn/version "796.2.650.0" :aws/serviceFullName "AWS Elemental MediaStore"}
193 | com.cognitect.aws/mediastore-data {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS Elemental MediaStore Data Plane"}
194 | com.cognitect.aws/mediatailor {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS MediaTailor"}
195 | com.cognitect.aws/memorydb {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon MemoryDB"}
196 | com.cognitect.aws/meteringmarketplace {:mvn/version "809.2.797.0" :aws/serviceFullName "AWSMarketplace Metering"}
197 | com.cognitect.aws/mgn {:mvn/version "811.2.958.0" :aws/serviceFullName "Application Migration Service"}
198 | com.cognitect.aws/migrationhub-config {:mvn/version "796.2.656.0" :aws/serviceFullName "AWS Migration Hub Config"}
199 | com.cognitect.aws/mobile {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS Mobile"}
200 | com.cognitect.aws/mobileanalytics {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Mobile Analytics"}
201 | com.cognitect.aws/models-lex-v2 {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Lex Model Building V2"}
202 | com.cognitect.aws/monitoring {:mvn/version "811.2.958.0" :aws/serviceFullName "Amazon CloudWatch"}
203 | com.cognitect.aws/mq {:mvn/version "811.2.958.0" :aws/serviceFullName "AmazonMQ"}
204 | com.cognitect.aws/mturk-requester {:mvn/version "811.2.934.0" :aws/serviceFullName "Amazon Mechanical Turk"}
205 | com.cognitect.aws/mwaa {:mvn/version "811.2.934.0" :aws/serviceFullName "AmazonMWAA"}
206 | com.cognitect.aws/neptune {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Neptune"}
207 | com.cognitect.aws/network-firewall {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Network Firewall"}
208 | com.cognitect.aws/networkmanager {:mvn/version "814.2.1023.0" :aws/serviceFullName "AWS Network Manager"}
209 | com.cognitect.aws/nimble {:mvn/version "814.2.1023.0" :aws/serviceFullName "AmazonNimbleStudio"}
210 | com.cognitect.aws/opensearch {:mvn/version "814.2.991.0" :aws/serviceFullName "Amazon OpenSearch Service"}
211 | com.cognitect.aws/opsworks {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS OpsWorks"}
212 | com.cognitect.aws/opsworkscm {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS OpsWorks CM"}
213 | com.cognitect.aws/organizations {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Organizations"}
214 | com.cognitect.aws/outposts {:mvn/version "814.2.986.0" :aws/serviceFullName "AWS Outposts"}
215 | com.cognitect.aws/panorama {:mvn/version "814.2.1012.0" :aws/serviceFullName "AWS Panorama"}
216 | com.cognitect.aws/personalize {:mvn/version "811.2.958.0" :aws/serviceFullName "Amazon Personalize"}
217 | com.cognitect.aws/personalize-events {:mvn/version "811.2.934.0" :aws/serviceFullName "Amazon Personalize Events"}
218 | com.cognitect.aws/personalize-runtime {:mvn/version "810.2.817.0" :aws/serviceFullName "Amazon Personalize Runtime"}
219 | com.cognitect.aws/pi {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Performance Insights"}
220 | com.cognitect.aws/pinpoint {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Pinpoint"}
221 | com.cognitect.aws/pinpoint-email {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Pinpoint Email Service"}
222 | com.cognitect.aws/pinpoint-sms-voice {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Pinpoint SMS and Voice Service"}
223 | com.cognitect.aws/polly {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon Polly"}
224 | com.cognitect.aws/pricing {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Price List Service"}
225 | com.cognitect.aws/proton {:mvn/version "813.2.963.0" :aws/serviceFullName "AWS Proton"}
226 | com.cognitect.aws/qldb {:mvn/version "811.2.958.0" :aws/serviceFullName "Amazon QLDB"}
227 | com.cognitect.aws/qldb-session {:mvn/version "811.2.844.0" :aws/serviceFullName "Amazon QLDB Session"}
228 | com.cognitect.aws/quicksight {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon QuickSight"}
229 | com.cognitect.aws/ram {:mvn/version "814.2.986.0" :aws/serviceFullName "AWS Resource Access Manager"}
230 | com.cognitect.aws/rds {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Relational Database Service"}
231 | com.cognitect.aws/rds-data {:mvn/version "811.2.844.0" :aws/serviceFullName "AWS RDS DataService"}
232 | com.cognitect.aws/redshift {:mvn/version "813.2.963.0" :aws/serviceFullName "Amazon Redshift"}
233 | com.cognitect.aws/redshift-data {:mvn/version "811.2.958.0" :aws/serviceFullName "Redshift Data API Service"}
234 | com.cognitect.aws/rekognition {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Rekognition"}
235 | com.cognitect.aws/resiliencehub {:mvn/version "814.2.1028.0" :aws/serviceFullName "AWS Resilience Hub"}
236 | com.cognitect.aws/resource-groups {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Resource Groups"}
237 | com.cognitect.aws/resourcegroupstaggingapi {:mvn/version "814.2.1023.0" :aws/serviceFullName "AWS Resource Groups Tagging API"}
238 | com.cognitect.aws/robomaker {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS RoboMaker"}
239 | com.cognitect.aws/route53 {:mvn/version "813.2.972.0" :aws/serviceFullName "Amazon Route 53"}
240 | com.cognitect.aws/route53-recovery-cluster {:mvn/version "811.2.958.0" :aws/serviceFullName "Route53 Recovery Cluster"}
241 | com.cognitect.aws/route53-recovery-control-config {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Route53 Recovery Control Config"}
242 | com.cognitect.aws/route53-recovery-readiness {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Route53 Recovery Readiness"}
243 | com.cognitect.aws/route53domains {:mvn/version "796.2.660.0" :aws/serviceFullName "Amazon Route 53 Domains"}
244 | com.cognitect.aws/route53resolver {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Route 53 Resolver"}
245 | com.cognitect.aws/runtime-lex {:mvn/version "811.2.889.0" :aws/serviceFullName "Amazon Lex Runtime Service"}
246 | com.cognitect.aws/runtime-lex-v2 {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Lex Runtime V2"}
247 | com.cognitect.aws/runtime-sagemaker {:mvn/version "813.2.972.0" :aws/serviceFullName "Amazon SageMaker Runtime"}
248 | com.cognitect.aws/s3 {:mvn/version "814.2.991.0" :aws/serviceFullName "Amazon Simple Storage Service"}
249 | com.cognitect.aws/s3control {:mvn/version "814.2.986.0" :aws/serviceFullName "AWS S3 Control"}
250 | com.cognitect.aws/s3outposts {:mvn/version "811.2.958.0" :aws/serviceFullName "Amazon S3 on Outposts"}
251 | com.cognitect.aws/sagemaker {:mvn/version "814.2.1028.0" :aws/serviceFullName "Amazon SageMaker Service"}
252 | com.cognitect.aws/sagemaker-a2i-runtime {:mvn/version "811.2.934.0" :aws/serviceFullName "Amazon Augmented AI Runtime"}
253 | com.cognitect.aws/sagemaker-edge {:mvn/version "810.2.817.0" :aws/serviceFullName "Amazon Sagemaker Edge Manager"}
254 | com.cognitect.aws/sagemaker-featurestore-runtime {:mvn/version "811.2.934.0" :aws/serviceFullName "Amazon SageMaker Feature Store Runtime"}
255 | com.cognitect.aws/savingsplans {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Savings Plans"}
256 | com.cognitect.aws/schemas {:mvn/version "814.2.986.0" :aws/serviceFullName "Schemas"}
257 | com.cognitect.aws/sdb {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon SimpleDB"}
258 | com.cognitect.aws/secretsmanager {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Secrets Manager"}
259 | com.cognitect.aws/securityhub {:mvn/version "814.2.1012.0" :aws/serviceFullName "AWS SecurityHub"}
260 | com.cognitect.aws/serverlessrepo {:mvn/version "794.2.637.0" :aws/serviceFullName "AWSServerlessApplicationRepository"}
261 | com.cognitect.aws/service-quotas {:mvn/version "810.2.817.0" :aws/serviceFullName "Service Quotas"}
262 | com.cognitect.aws/servicecatalog {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Service Catalog"}
263 | com.cognitect.aws/servicediscovery {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Cloud Map"}
264 | com.cognitect.aws/sesv2 {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Simple Email Service"}
265 | com.cognitect.aws/shield {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Shield"}
266 | com.cognitect.aws/signer {:mvn/version "810.2.801.0" :aws/serviceFullName "AWS Signer"}
267 | com.cognitect.aws/sms {:mvn/version "807.2.729.0" :aws/serviceFullName "AWS Server Migration Service"}
268 | com.cognitect.aws/snow-device-management {:mvn/version "813.2.972.0" :aws/serviceFullName "AWS Snow Device Management"}
269 | com.cognitect.aws/snowball {:mvn/version "811.2.935.0" :aws/serviceFullName "Amazon Import/Export Snowball"}
270 | com.cognitect.aws/sns {:mvn/version "811.2.959.0" :aws/serviceFullName "Amazon Simple Notification Service"}
271 | com.cognitect.aws/sqs {:mvn/version "814.2.986.0" :aws/serviceFullName "Amazon Simple Queue Service"}
272 | com.cognitect.aws/ssm {:mvn/version "814.2.1028.0" :aws/serviceFullName "Amazon Simple Systems Manager (SSM)"}
273 | com.cognitect.aws/ssm-contacts {:mvn/version "814.2.986.0" :aws/serviceFullName "AWS Systems Manager Incident Manager Contacts"}
274 | com.cognitect.aws/ssm-incidents {:mvn/version "814.2.1023.0" :aws/serviceFullName "AWS Systems Manager Incident Manager"}
275 | com.cognitect.aws/sso {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS Single Sign-On"}
276 | com.cognitect.aws/sso-admin {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Single Sign-On Admin"}
277 | com.cognitect.aws/sso-oidc {:mvn/version "770.2.568.0" :aws/serviceFullName "AWS SSO OIDC"}
278 | com.cognitect.aws/states {:mvn/version "810.2.801.0" :aws/serviceFullName "AWS Step Functions"}
279 | com.cognitect.aws/storagegateway {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Storage Gateway"}
280 | com.cognitect.aws/streams-dynamodb {:mvn/version "809.2.784.0" :aws/serviceFullName "Amazon DynamoDB Streams"}
281 | com.cognitect.aws/sts {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Security Token Service"}
282 | com.cognitect.aws/support {:mvn/version "811.2.934.0" :aws/serviceFullName "AWS Support"}
283 | com.cognitect.aws/swf {:mvn/version "770.2.568.0" :aws/serviceFullName "Amazon Simple Workflow Service"}
284 | com.cognitect.aws/synthetics {:mvn/version "814.2.1008.0" :aws/serviceFullName "Synthetics"}
285 | com.cognitect.aws/textract {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Textract"}
286 | com.cognitect.aws/timestream-query {:mvn/version "810.2.801.0" :aws/serviceFullName "Amazon Timestream Query"}
287 | com.cognitect.aws/timestream-write {:mvn/version "810.2.801.0" :aws/serviceFullName "Amazon Timestream Write"}
288 | com.cognitect.aws/transcribe {:mvn/version "814.2.1023.0" :aws/serviceFullName "Amazon Transcribe Service"}
289 | com.cognitect.aws/transfer {:mvn/version "814.2.1008.0" :aws/serviceFullName "AWS Transfer Family"}
290 | com.cognitect.aws/translate {:mvn/version "814.2.1028.0" :aws/serviceFullName "Amazon Translate"}
291 | com.cognitect.aws/voice-id {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Voice ID"}
292 | com.cognitect.aws/waf {:mvn/version "796.2.666.0" :aws/serviceFullName "AWS WAF"}
293 | com.cognitect.aws/waf-regional {:mvn/version "796.2.666.0" :aws/serviceFullName "AWS WAF Regional"}
294 | com.cognitect.aws/wafv2 {:mvn/version "814.2.1028.0" :aws/serviceFullName "AWS WAFV2"}
295 | com.cognitect.aws/wellarchitected {:mvn/version "811.2.958.0" :aws/serviceFullName "AWS Well-Architected Tool"}
296 | com.cognitect.aws/wisdom {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon Connect Wisdom Service"}
297 | com.cognitect.aws/workdocs {:mvn/version "793.2.629.0" :aws/serviceFullName "Amazon WorkDocs"}
298 | com.cognitect.aws/worklink {:mvn/version "801.2.687.0" :aws/serviceFullName "Amazon WorkLink"}
299 | com.cognitect.aws/workmail {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon WorkMail"}
300 | com.cognitect.aws/workmailmessageflow {:mvn/version "811.2.844.0" :aws/serviceFullName "Amazon WorkMail Message Flow"}
301 | com.cognitect.aws/workspaces {:mvn/version "814.2.1008.0" :aws/serviceFullName "Amazon WorkSpaces"}
302 | com.cognitect.aws/xray {:mvn/version "814.2.986.0" :aws/serviceFullName "AWS X-Ray"}}}
303 |
--------------------------------------------------------------------------------
/deps.template.edn:
--------------------------------------------------------------------------------
1 | ;; NOTE: do not edit this directly. Edit deps.template.edn instead and run script/update-deps.edn.clj
2 | {:paths ["src" "resources"]
3 | :aliases {:native {:jvm-opts ["-Dclojure.compiler.direct-linking=true"]
4 | :extra-deps {org.clojure/clojure {:mvn/version "1.10.3"}
5 | com.github.clj-easy/graal-build-time {:mvn/version "0.1.3"}}}
6 | :build
7 | {:deps {io.github.clojure/tools.build {:tag "v0.6.5" :sha "a0c3ff6"}}
8 | :ns-default build}}
9 | :deps {com.cognitect/transit-clj {:mvn/version "1.0.324"}
10 | nrepl/bencode {:mvn/version "1.1.0"}
11 | babashka/pods {:git/url "https://github.com/babashka/pods"
12 | :sha "f360afa6135b8bd2d384d9ba4582c0de6fdac804"}
13 | ;; from https://raw.githubusercontent.com/cognitect-labs/aws-api/master/latest-releases.edn
14 | {{latest-releases.edn}}}}
15 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2.1'
2 |
3 | services:
4 | localstack:
5 | container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
6 | image: localstack/localstack
7 | network_mode: bridge
8 | ports:
9 | - "4566:4566"
10 | - "4571:4571"
11 | - "${PORT_WEB_UI-8080}:${PORT_WEB_UI-8080}"
12 | environment:
13 | - SERVICES=${SERVICES-s3,lambda}
14 | - DOCKER_HOST=unix:///var/run/docker.sock
15 | - HOST_TMP_FOLDER=${TMPDIR}
16 | volumes:
17 | - "${TMPDIR:-/tmp/localstack}:/tmp/localstack"
18 | - "/var/run/docker.sock:/var/run/docker.sock"
19 |
--------------------------------------------------------------------------------
/pod-babashka-aws.build_artifacts.txt:
--------------------------------------------------------------------------------
1 | [EXECUTABLE]
2 | pod-babashka-aws
3 |
4 |
--------------------------------------------------------------------------------
/reflection.json:
--------------------------------------------------------------------------------
1 | [
2 | {"name": "[Ljava.nio.HeapByteBuffer;"}
3 | ]
4 |
--------------------------------------------------------------------------------
/resources.json:
--------------------------------------------------------------------------------
1 | {
2 | "resources": [
3 | {"pattern":"\\Qcognitect_aws_http.edn\\E"},
4 | {"pattern":"cognitect/aws/.*/.*edn"},
5 | {"pattern":"cognitect/aws/endpoints.edn"}
6 | ]
7 | }
8 |
9 |
10 |
--------------------------------------------------------------------------------
/resources/POD_BABASHKA_AWS_VERSION:
--------------------------------------------------------------------------------
1 | 0.1.2
2 |
--------------------------------------------------------------------------------
/resources/aws-services.edn:
--------------------------------------------------------------------------------
1 | [:AWS242AppRegistry
2 | :AWSApplicationCostProfiler
3 | :AWSMigrationHub
4 | :accessanalyzer
5 | :account
6 | :acm
7 | :acm-pca
8 | :alexaforbusiness
9 | :amp
10 | :amplify
11 | :amplifybackend
12 | :api
13 | :apigateway
14 | :apigatewaymanagementapi
15 | :apigatewayv2
16 | :appconfig
17 | :appflow
18 | :appintegrations
19 | :application-autoscaling
20 | :application-insights
21 | :appmesh
22 | :apprunner
23 | :appstream
24 | :appsync
25 | :athena
26 | :auditmanager
27 | :autoscaling
28 | :autoscaling-plans
29 | :backup
30 | :batch
31 | :braket
32 | :budgets
33 | :ce
34 | :chime
35 | :chime-sdk-identity
36 | :chime-sdk-meetings
37 | :chime-sdk-messaging
38 | :cloud9
39 | :cloudcontrol
40 | :clouddirectory
41 | :cloudformation
42 | :cloudfront
43 | :cloudhsm
44 | :cloudhsmv2
45 | :cloudsearch
46 | :cloudsearchdomain
47 | :cloudtrail
48 | :codeartifact
49 | :codebuild
50 | :codecommit
51 | :codedeploy
52 | :codeguru-reviewer
53 | :codeguruprofiler
54 | :codepipeline
55 | :codestar
56 | :codestar-connections
57 | :codestar-notifications
58 | :cognito-identity
59 | :cognito-idp
60 | :cognito-sync
61 | :comprehend
62 | :comprehendmedical
63 | :compute-optimizer
64 | :config
65 | :connect
66 | :connect-contact-lens
67 | :connectparticipant
68 | :cur
69 | :customer-profiles
70 | :databrew
71 | :dataexchange
72 | :datapipeline
73 | :datasync
74 | :dax
75 | :detective
76 | :devicefarm
77 | :devices
78 | :devops-guru
79 | :directconnect
80 | :discovery
81 | :dlm
82 | :dms
83 | :docdb
84 | :ds
85 | :dynamodb
86 | :ebs
87 | :ec2
88 | :ec2-instance-connect
89 | :ecr
90 | :ecr-public
91 | :ecs
92 | :eks
93 | :elastic-inference
94 | :elasticache
95 | :elasticbeanstalk
96 | :elasticfilesystem
97 | :elasticloadbalancing
98 | :elasticloadbalancingv2
99 | :elasticmapreduce
100 | :elastictranscoder
101 | :email
102 | :emr-containers
103 | :endpoints
104 | :entitlement-marketplace
105 | :es
106 | :eventbridge
107 | :events
108 | :finspace
109 | :firehose
110 | :fis
111 | :fms
112 | :forecast
113 | :forecastquery
114 | :frauddetector
115 | :fsx
116 | :gamelift
117 | :glacier
118 | :globalaccelerator
119 | :glue
120 | :grafana
121 | :greengrass
122 | :greengrassv2
123 | :groundstation
124 | :guardduty
125 | :health
126 | :healthlake
127 | :honeycode
128 | :iam
129 | :identitystore
130 | :imagebuilder
131 | :importexport
132 | :inspector
133 | :iot
134 | :iot-data
135 | :iot-jobs-data
136 | :iot1click-projects
137 | :iotanalytics
138 | :iotdeviceadvisor
139 | :iotevents
140 | :iotevents-data
141 | :iotfleethub
142 | :iotsecuretunneling
143 | :iotsitewise
144 | :iotthingsgraph
145 | :iotwireless
146 | :ivs
147 | :kafka
148 | :kafkaconnect
149 | :kendra
150 | :kinesis
151 | :kinesis-video-archived-media
152 | :kinesis-video-media
153 | :kinesis-video-signaling
154 | :kinesisanalytics
155 | :kinesisanalyticsv2
156 | :kinesisvideo
157 | :kms
158 | :lakeformation
159 | :lambda
160 | :lex-models
161 | :license-manager
162 | :lightsail
163 | :location
164 | :logs
165 | :lookoutequipment
166 | :lookoutmetrics
167 | :lookoutvision
168 | :machinelearning
169 | :macie
170 | :macie2
171 | :managedblockchain
172 | :marketplace-catalog
173 | :marketplacecommerceanalytics
174 | :mediaconnect
175 | :mediaconvert
176 | :medialive
177 | :mediapackage
178 | :mediapackage-vod
179 | :mediastore
180 | :mediastore-data
181 | :mediatailor
182 | :memorydb
183 | :meteringmarketplace
184 | :mgn
185 | :migrationhub-config
186 | :mobile
187 | :mobileanalytics
188 | :models-lex-v2
189 | :monitoring
190 | :mq
191 | :mturk-requester
192 | :mwaa
193 | :neptune
194 | :network-firewall
195 | :networkmanager
196 | :nimble
197 | :opensearch
198 | :opsworks
199 | :opsworkscm
200 | :organizations
201 | :outposts
202 | :panorama
203 | :personalize
204 | :personalize-events
205 | :personalize-runtime
206 | :pi
207 | :pinpoint
208 | :pinpoint-email
209 | :pinpoint-sms-voice
210 | :polly
211 | :pricing
212 | :proton
213 | :qldb
214 | :qldb-session
215 | :quicksight
216 | :ram
217 | :rds
218 | :rds-data
219 | :redshift
220 | :redshift-data
221 | :rekognition
222 | :resiliencehub
223 | :resource-groups
224 | :resourcegroupstaggingapi
225 | :robomaker
226 | :route53
227 | :route53-recovery-cluster
228 | :route53-recovery-control-config
229 | :route53-recovery-readiness
230 | :route53domains
231 | :route53resolver
232 | :runtime-lex
233 | :runtime-lex-v2
234 | :runtime-sagemaker
235 | :s3
236 | :s3control
237 | :s3outposts
238 | :sagemaker
239 | :sagemaker-a2i-runtime
240 | :sagemaker-edge
241 | :sagemaker-featurestore-runtime
242 | :savingsplans
243 | :schemas
244 | :sdb
245 | :secretsmanager
246 | :securityhub
247 | :serverlessrepo
248 | :service-quotas
249 | :servicecatalog
250 | :servicediscovery
251 | :sesv2
252 | :shield
253 | :signer
254 | :sms
255 | :snow-device-management
256 | :snowball
257 | :sns
258 | :sqs
259 | :ssm
260 | :ssm-contacts
261 | :ssm-incidents
262 | :sso
263 | :sso-admin
264 | :sso-oidc
265 | :states
266 | :storagegateway
267 | :streams-dynamodb
268 | :sts
269 | :support
270 | :swf
271 | :synthetics
272 | :textract
273 | :timestream-query
274 | :timestream-write
275 | :transcribe
276 | :transfer
277 | :translate
278 | :voice-id
279 | :waf
280 | :waf-regional
281 | :wafv2
282 | :wellarchitected
283 | :wisdom
284 | :workdocs
285 | :worklink
286 | :workmail
287 | :workmailmessageflow
288 | :workspaces
289 | :xray]
290 |
--------------------------------------------------------------------------------
/resources/babashka.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/babashka/pod-babashka-aws/135470c3e582a6b1c03452d4d41dc33745bfc4ad/resources/babashka.png
--------------------------------------------------------------------------------
/script/changelog.clj:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bb
2 |
3 | (ns changelog
4 | (:require [clojure.string :as str]))
5 |
6 | (let [changelog (slurp "CHANGELOG.md")
7 | replaced (str/replace changelog
8 | #" #(\d+)"
9 | (fn [[_ issue after]]
10 | (format " [#%s](https://github.com/babashka/pod-babashka-aws/issues/%s)%s"
11 | issue issue (str after))))
12 | replaced (str/replace replaced
13 | #"@([a-zA-Z0-9-_]+)([, \.)])"
14 | (fn [[_ name after]]
15 | (format "[@%s](https://github.com/%s)%s"
16 | name name after)))]
17 | (spit "CHANGELOG.md" replaced))
18 |
--------------------------------------------------------------------------------
/script/compile:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -eo pipefail
4 |
5 | if [ -z "$GRAALVM_HOME" ]; then
6 | echo "Please set GRAALVM_HOME"
7 | exit 1
8 | fi
9 |
10 | clojure -T:build uber
11 |
12 | "$GRAALVM_HOME/bin/gu" install native-image
13 |
14 | args=(
15 | "-cp" "target/pod-babashka-aws.jar"
16 | "-H:Name=pod-babashka-aws"
17 | "-H:+ReportExceptionStackTraces"
18 | "-H:EnableURLProtocols=http,https,jar"
19 | "--enable-all-security-services"
20 | "--report-unsupported-elements-at-runtime"
21 | "--initialize-at-build-time=com.cognitect.transit"
22 | "--initialize-at-build-time=org.eclipse.jetty"
23 | "-H:ReflectionConfigurationFiles=reflection.json"
24 | "-H:ResourceConfigurationFiles=resources.json"
25 | "--verbose"
26 | "--no-fallback"
27 | "--no-server"
28 | "-J-Xmx3g"
29 | "pod.babashka.aws"
30 | )
31 |
32 | BABASHKA_STATIC=${BABASHKA_STATIC:-}
33 | BABASHKA_MUSL=${BABASHKA_MUSL:-}
34 |
35 | if [ "$BABASHKA_STATIC" = "true" ]; then
36 | args+=("--static")
37 | if [ "$BABASHKA_MUSL" = "true" ]; then
38 | args+=("--libc=musl"
39 | # see https://github.com/oracle/graal/issues/3398
40 | "-H:CCompilerOption=-Wl,-z,stack-size=2097152")
41 | else
42 | # see https://github.com/oracle/graal/issues/3737
43 | args+=("-H:+StaticExecutableWithDynamicLibC")
44 | fi
45 | fi
46 |
47 | "$GRAALVM_HOME/bin/native-image" "${args[@]}"
48 |
--------------------------------------------------------------------------------
/script/compile.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | if "%GRAALVM_HOME%"=="" (
4 | echo Please set GRAALVM_HOME
5 | exit /b
6 | )
7 |
8 | set JAVA_HOME=%GRAALVM_HOME%
9 | set PATH=%GRAALVM_HOME%\bin;%PATH%
10 |
11 | set /P VERSION=< resources\POD_BABASHKA_AWS_VERSION
12 | echo Building version %VERSION%
13 |
14 | if "%GRAALVM_HOME%"=="" (
15 | echo Please set GRAALVM_HOME
16 | exit /b
17 | )
18 |
19 | bb clojure -J-Dclojure.main.report=stderr -T:build uber
20 |
21 | call %GRAALVM_HOME%\bin\gu.cmd install native-image
22 |
23 | call %GRAALVM_HOME%\bin\native-image.cmd ^
24 | "-cp" "target/pod-babashka-aws.jar" ^
25 | "-H:Name=pod-babashka-aws" ^
26 | "-H:+ReportExceptionStackTraces" ^
27 | "-H:EnableURLProtocols=jar" ^
28 | "--report-unsupported-elements-at-runtime" ^
29 | "--initialize-at-build-time=org.eclipse.jetty" ^
30 | "--initialize-at-build-time=com.cognitect.transit" ^
31 | "-H:EnableURLProtocols=http,https,jar" ^
32 | "--enable-all-security-services" ^
33 | "-H:ReflectionConfigurationFiles=reflection.json" ^
34 | "-H:ResourceConfigurationFiles=resources.json" ^
35 | "--verbose" ^
36 | "--no-fallback" ^
37 | "--no-server" ^
38 | "-J-Xmx3g" ^
39 | "pod.babashka.aws"
40 |
41 | if %errorlevel% neq 0 exit /b %errorlevel%
42 |
43 | echo Creating zip archive
44 | jar -cMf pod-babashka-aws-%VERSION%-windows-amd64.zip pod-babashka-aws.exe
45 |
--------------------------------------------------------------------------------
/script/setup-musl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | if [[ -z "${BABASHKA_STATIC:-}" ]]; then
6 | echo "BABASHKA_STATIC wasn't set, skipping musl installation."
7 | exit 0
8 | fi
9 |
10 | if [[ -z "${BABASHKA_MUSL:-}" ]]; then
11 | echo "BABASHKA_MUSL wasn't set, skipping musl installation."
12 | exit 0
13 | fi
14 |
15 | if [[ "${BABASHKA_ARCH:-"x86_64"}" != "x86_64" ]]; then
16 | echo "GraalVM only supports building static binaries on x86_64."
17 | exit 1
18 | fi
19 |
20 | apt-get update -y && apt-get install musl-tools -y
21 |
22 | ZLIB_VERSION="1.2.11"
23 | ZLIB_SHA256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"
24 |
25 | # stable archive path
26 | curl -O -sL --fail --show-error "https://zlib.net/fossils/zlib-${ZLIB_VERSION}.tar.gz"
27 |
28 | echo "${ZLIB_SHA256} zlib-${ZLIB_VERSION}.tar.gz" | sha256sum --check
29 | tar xf "zlib-${ZLIB_VERSION}.tar.gz"
30 |
31 | arch=${BABASHKA_ARCH:-"x86_64"}
32 | echo "ARCH: $arch"
33 |
34 | cd "zlib-${ZLIB_VERSION}"
35 | CC=musl-gcc ./configure --static --prefix="/usr/local"
36 | make CC=musl-gcc
37 | make install
38 | cd ..
39 |
40 | # Install libz.a in the correct place so ldd can find it
41 | install -Dm644 "/usr/local/lib/libz.a" "/usr/lib/$arch-linux-musl/libz.a"
42 |
43 | ln -s /usr/bin/musl-gcc /usr/bin/x86_64-linux-musl-gcc
44 |
--------------------------------------------------------------------------------
/script/test:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [[ "$APP_TEST_ENV" == "native" ]]
4 | then
5 | bb test/script.clj
6 | unset AWS_ACCESS_KEY_ID
7 | unset AWS_ACCESS_KEY_ID
8 | unset AWS_REGION
9 | bb test/credentials_test.clj
10 | else
11 | clojure -M test/script.clj
12 | unset AWS_ACCESS_KEY_ID
13 | unset AWS_ACCESS_KEY_ID
14 | unset AWS_REGION
15 | clojure -M test/credentials_test.clj
16 | fi
17 |
--------------------------------------------------------------------------------
/script/update-deps.clj:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bb
2 |
3 | (def latest-releases-url "https://raw.githubusercontent.com/cognitect-labs/aws-api/master/latest-releases.edn")
4 |
5 | (require '[clojure.edn :as edn]
6 | '[clojure.pprint :refer [cl-format]])
7 |
8 | (def latest-releases
9 | (edn/read-string (slurp latest-releases-url)))
10 |
11 | (defn ^:private leftpad
12 | "If S is shorter than LEN, pad it with CH on the left."
13 | ([s len]
14 | (leftpad s len " "))
15 | ([s len ch]
16 | (cl-format nil
17 | (str "~" len ",'" ch "d")
18 | (str s))))
19 |
20 | (let [edn-template (slurp "deps.template.edn")
21 | deps-lines (->> latest-releases
22 | (map (fn [[k v]]
23 | (let [{:keys [aws/serviceFullName
24 | mvn/version]} v]
25 | [k version serviceFullName]))))
26 | max-column-size (->> deps-lines
27 | (map (fn [[k v n]]
28 | (-> k str count)))
29 | (apply max))
30 | available-services (->> latest-releases
31 | (map (comp keyword name key))
32 | (sort)
33 | (vec))]
34 | (spit "resources/aws-services.edn" (with-out-str (clojure.pprint/pprint available-services)))
35 |
36 | (as-> edn-template $
37 | (str/replace $ "{{latest-releases.edn}}"
38 | (->> (for [[api ver svc-name] (sort-by first deps-lines)
39 | :let [gap (- max-column-size (-> api str count))]]
40 | (format " %s %s {:mvn/version \"%s\" :aws/serviceFullName \"%s\"}"
41 | api
42 | (leftpad " " gap)
43 | ver
44 | (if svc-name svc-name "")))
45 | (str/join "\n")
46 | str/triml))
47 | (spit "deps.edn" $)))
48 |
--------------------------------------------------------------------------------
/src/pod/babashka/aws.clj:
--------------------------------------------------------------------------------
1 | (ns pod.babashka.aws
2 | (:refer-clojure :exclude [read read-string hash])
3 | (:require [bencode.core :as bencode]
4 | [clojure.java.io :as io]
5 | [clojure.spec.alpha]
6 | [clojure.string :as str]
7 | [clojure.walk :as walk]
8 | [cognitect.aws.config :as aws.config]
9 | [cognitect.transit :as transit]
10 | [pod.babashka.aws.impl.aws :as aws]
11 | [pod.babashka.aws.impl.aws.credentials :as credentials]
12 | [pod.babashka.aws.logging :as logging])
13 | (:import [java.io PushbackInputStream])
14 | (:gen-class))
15 |
16 | (set! *warn-on-reflection* true)
17 |
18 | (def stdin (PushbackInputStream. System/in))
19 | (def stdout System/out)
20 |
21 | (def debug? false)
22 |
23 | (defn debug [& strs]
24 | (when debug?
25 | (binding [*out* (io/writer System/err)]
26 | (apply prn strs))))
27 |
28 | (defn write
29 | ([v] (write stdout v))
30 | ([stream v]
31 | (debug :writing v)
32 | (bencode/write-bencode stream v)
33 | (flush)))
34 |
35 | (defn read-string [^"[B" v]
36 | (String. v))
37 |
38 | (defn read [stream]
39 | (bencode/read-bencode stream))
40 |
41 | (logging/set-level! :warn)
42 |
43 | (def lookup*
44 | {'pod.babashka.aws.credentials credentials/lookup-map
45 | 'pod.babashka.aws.config
46 | {'parse aws.config/parse}
47 | 'pod.babashka.aws
48 | {'-client aws/-client
49 | '-doc-str aws/-doc-str
50 | '-invoke aws/-invoke
51 | 'ops aws/ops}
52 | 'pod.babashka.aws.logging
53 | {'set-level! logging/set-level!}})
54 |
55 | (defn lookup [var]
56 | (let [var-ns (symbol (namespace var))
57 | var-name (symbol (name var))]
58 | (get-in lookup* [var-ns var-name])))
59 |
60 | (def invoke
61 | '(do (require (quote clojure.java.io) (quote clojure.walk))
62 | (defn invoke [client op]
63 | (let [op (clojure.walk/postwalk
64 | (fn [x]
65 | (cond
66 | (instance? java.io.InputStream x)
67 | (let [os (java.io.ByteArrayOutputStream.)]
68 | (clojure.java.io/copy x os)
69 | (.toByteArray os))
70 | (instance? java.io.File x)
71 | {:pod.babashka.aws/wrapped [:file (.getPath ^java.io.File x)]}
72 | :else x))
73 | op)
74 | response (-invoke client op)]
75 | (clojure.walk/postwalk
76 | (fn [x]
77 | (if-let [[t y] (:pod.babashka.aws/wrapped x)]
78 | (case t
79 | :bytes (clojure.java.io/input-stream y))
80 | x))
81 | response)))))
82 |
83 | (def throwable-key (str `throwable))
84 |
85 | (def throwable-write-handler
86 | (transit/write-handler throwable-key Throwable->map))
87 |
88 | (def class-key (str `class))
89 |
90 | (def class-write-handler
91 | (transit/write-handler class-key (fn [^Class x] (.getName x))))
92 |
93 | (def transit-writers-map
94 | {java.lang.Throwable throwable-write-handler
95 | java.lang.Class class-write-handler})
96 |
97 | (def whm (transit/write-handler-map transit-writers-map))
98 |
99 | (defn write-transit [v]
100 | (let [baos (java.io.ByteArrayOutputStream.)]
101 | (try (transit/write (transit/writer baos :json {:handlers whm}) v)
102 | (catch Exception e
103 | (binding [*out* *err*]
104 | (prn "ERROR: can't serialize to transit:" v))
105 | (throw e)))
106 | (.toString baos "utf-8")))
107 |
108 | (defn read-transit [^String v]
109 | (transit/read
110 | (transit/reader
111 | (java.io.ByteArrayInputStream. (.getBytes v "utf-8"))
112 | :json)))
113 |
114 | (def reg-transit-handlers
115 | (format "
116 | (require 'babashka.pods)
117 | (babashka.pods/add-transit-read-handler!
118 | \"%s\"
119 | identity)
120 |
121 | (babashka.pods/add-transit-read-handler!
122 | \"%s\"
123 | (fn [s] {:class (symbol s)}))"
124 | throwable-key class-key))
125 |
126 | (def describe-map
127 | (walk/postwalk
128 | (fn [v]
129 | (if (ident? v) (name v)
130 | v))
131 | `{:format :transit+json
132 | :namespaces
133 | [~credentials/describe-map
134 | {:name pod.babashka.aws.config
135 | :vars ~(mapv (fn [[k _]]
136 | {:name k})
137 | (get lookup* 'pod.babashka.aws.config))}
138 | {:name pod.babashka.aws
139 | :vars ~(conj (mapv (fn [[k _]]
140 | {:name k})
141 | (get lookup* 'pod.babashka.aws))
142 | {:name "client"
143 | :code
144 | (pr-str
145 | '(do
146 | (require '[pod.babashka.aws.credentials :as credentials])
147 | (defn client [{:keys [credentials-provider] :as config}]
148 | (let [credentials-provider (or credentials-provider
149 | (credentials/default-credentials-provider))]
150 | (-client (assoc config :credentials-provider credentials-provider))))))}
151 | {:name "doc"
152 | :code (pr-str '(defn doc [client op]
153 | (println (-doc-str client op))))}
154 | {:name "invoke"
155 | :code
156 | (pr-str invoke)}
157 | {:name "-reg-transit-handlers"
158 | :code reg-transit-handlers})}
159 | {:name pod.babashka.aws.logging
160 | :vars ~(mapv (fn [[k _]]
161 | {:name k})
162 | (get lookup* 'pod.babashka.aws.logging))}]}))
163 |
164 | (def musl?
165 | "Captured at compile time, to know if we are running inside a
166 | statically compiled executable with musl."
167 | (and (= "true" (System/getenv "BABASHKA_STATIC"))
168 | (= "true" (System/getenv "BABASHKA_MUSL"))))
169 |
170 | (defmacro run [expr]
171 | (if musl?
172 | ;; When running in musl-compiled static executable we lift execution of bb
173 | ;; inside a thread, so we have a larger than default stack size, set by an
174 | ;; argument to the linker. See https://github.com/oracle/graal/issues/3398
175 | `(let [v# (volatile! nil)
176 | f# (fn []
177 | (vreset! v# ~expr))]
178 | (doto (Thread. nil f# "main")
179 | (.start)
180 | (.join))
181 | @v#)
182 | `(do ~expr)))
183 |
184 | (defn -main [& _args]
185 | (run
186 | (loop []
187 | (let [message (try (read stdin)
188 | (catch java.io.EOFException _
189 | ::EOF))]
190 | (when-not (identical? ::EOF message)
191 | (let [op (get message "op")
192 | op (read-string op)
193 | op (keyword op)
194 | id (some-> (get message "id")
195 | read-string)
196 | id (or id "unknown")]
197 | (case op
198 | :describe (do (write stdout describe-map)
199 | (recur))
200 | :invoke (do (try
201 | (let [var (-> (get message "var")
202 | read-string
203 | symbol)
204 | args (get message "args")
205 | args (read-string args)
206 | args (read-transit args)]
207 | (if-let [f (lookup var)]
208 | (let [out-str (java.io.StringWriter.)
209 | value (binding [*out* out-str]
210 | (let [v (apply f args)]
211 | (write-transit v)))
212 | out-str (str out-str)
213 | reply (cond-> {"value" value
214 | "id" id
215 | "status" ["done"]}
216 | (not (str/blank? out-str))
217 | (assoc "out" out-str))]
218 | (write stdout reply))
219 | (throw (ex-info (str "Var not found: " var) {}))))
220 | (catch Throwable e
221 | (debug e)
222 | (let [reply {"ex-message" (ex-message e)
223 | "ex-data" (write-transit
224 | (assoc (ex-data e)
225 | :type (str (class e))))
226 | "id" id
227 | "status" ["done" "error"]}]
228 | (write stdout reply))))
229 | (recur))
230 | :shutdown (System/exit 0)
231 | (do
232 | (let [reply {"ex-message" "Unknown op"
233 | "ex-data" (pr-str {:op op})
234 | "id" id
235 | "status" ["done" "error"]}]
236 | (write stdout reply))
237 | (recur)))))))))
238 |
--------------------------------------------------------------------------------
/src/pod/babashka/aws/impl/aws.clj:
--------------------------------------------------------------------------------
1 | (ns pod.babashka.aws.impl.aws
2 | (:require
3 | [clojure.edn]
4 | [clojure.java.io :as io]
5 | [clojure.walk :as walk]
6 | [cognitect.aws.client.api :as aws]
7 | ;; these are dynamically loaded at runtime
8 | [cognitect.aws.http.cognitect]
9 | [cognitect.aws.protocols.common]
10 | [cognitect.aws.protocols.ec2]
11 | [cognitect.aws.protocols.json]
12 | [cognitect.aws.protocols.query]
13 | [cognitect.aws.protocols.rest]
14 | [cognitect.aws.protocols.rest-json]
15 | [cognitect.aws.protocols.rest-xml]))
16 |
17 | (set! *warn-on-reflection* true)
18 |
19 | (def http-client (delay (cognitect.aws.http.cognitect/create)))
20 |
21 | (def services (into (sorted-set) (clojure.edn/read-string (slurp (io/resource "aws-services.edn")))))
22 |
23 | (def *clients (atom {}))
24 |
25 | (defn get-client [config]
26 | (get @*clients (get config ::client-id)))
27 |
28 | (defn -client [{:keys [api] :as config}]
29 | (if-not (contains? services api)
30 | (throw (ex-info (str "api " api " not available") {:available services}))
31 | (let [config (assoc config
32 | :http-client @http-client)
33 | client (aws/client config)
34 | client-id (java.util.UUID/randomUUID)]
35 | (swap! *clients assoc client-id client)
36 | {::client-id client-id})))
37 |
38 | (defn ops [client]
39 | (aws/ops (get-client client)))
40 |
41 | (defn -doc-str [client op]
42 | (with-out-str
43 | (aws/doc (get-client client) op)))
44 |
45 | (defn ^bytes input-stream->byte-array [^java.io.InputStream is]
46 | (with-open [os (java.io.ByteArrayOutputStream.)]
47 | (io/copy is os)
48 | (.toByteArray os)))
49 |
50 | (defprotocol IWrapObject
51 | (wrap-object [x]))
52 |
53 | (extend-protocol IWrapObject
54 | nil
55 | (wrap-object [x] x)
56 |
57 | Object
58 | (wrap-object [x] x)
59 |
60 | java.io.InputStream
61 | (wrap-object [x]
62 | {:pod.babashka.aws/wrapped
63 | [:bytes (let [bytes (input-stream->byte-array x)]
64 | (.close ^java.io.InputStream x)
65 | bytes)]}))
66 |
67 | (defn -invoke [client op]
68 | (let [streams (atom [])
69 | unwrap (fn [x]
70 | (if (map? x)
71 | (if-let [v (:pod.babashka.aws/wrapped x)]
72 | (let [[k obj] v]
73 | (case k
74 | :file
75 | (let [stream (io/input-stream (io/file obj))]
76 | (swap! streams conj stream)
77 | stream)))
78 | x)
79 | x))
80 | op (walk/postwalk unwrap op)
81 | resp (aws/invoke (get-client client) op)]
82 | ;; clean up input-streams create for file reads
83 | (doseq [stream @streams]
84 | (.close ^java.io.InputStream stream))
85 | (walk/postwalk wrap-object resp)))
86 |
--------------------------------------------------------------------------------
/src/pod/babashka/aws/impl/aws/credentials.clj:
--------------------------------------------------------------------------------
1 | (ns pod.babashka.aws.impl.aws.credentials
2 | (:require
3 | [clojure.data.json :as json]
4 | [clojure.edn]
5 | [clojure.java.io :as io]
6 | [clojure.java.shell :as shell]
7 | [clojure.string :as str]
8 | [clojure.tools.logging :as log]
9 | [cognitect.aws.config :as config]
10 | [cognitect.aws.credentials :as creds]
11 | [cognitect.aws.util :as u]
12 | [pod.babashka.aws.impl.aws]))
13 |
14 | (set! *warn-on-reflection* true)
15 |
16 | ;;; Pod Backend
17 |
18 | (def *providers (atom {}))
19 |
20 | (defn create-provider [provider]
21 | (let [provider-id (java.util.UUID/randomUUID)]
22 | (swap! *providers assoc provider-id provider)
23 | {:provider-id provider-id}))
24 |
25 | (defmacro with-system-properties [props & body]
26 | `(let [props# (System/getProperties)]
27 | (try
28 | (doseq [[k# v#] ~props]
29 | (System/setProperty k# v#))
30 | ~@body
31 | (finally
32 | (System/setProperties props#)))))
33 |
34 | (defn get-provider [config]
35 | (get @*providers (get config :provider-id)))
36 |
37 | (defn -basic-credentials-provider [conf]
38 | (create-provider (creds/basic-credentials-provider conf)))
39 |
40 | (defn -environment-credentials-provider []
41 | (create-provider (creds/environment-credentials-provider)))
42 |
43 | (defn -system-property-credentials-provider [jvm-props]
44 | (with-system-properties jvm-props
45 | (create-provider (creds/system-property-credentials-provider))))
46 |
47 | (defn -profile-credentials-provider
48 | ([jvm-props]
49 | (with-system-properties jvm-props
50 | (create-provider (creds/profile-credentials-provider))))
51 |
52 | ([jvm-props profile-name]
53 | (with-system-properties jvm-props
54 | (create-provider (creds/profile-credentials-provider profile-name))))
55 |
56 | ([_jvm-props _profile-name ^java.io.File _f]
57 | (throw (ex-info "profile-credentials-provider with 2 arguments not supported yet" {}))))
58 |
59 | (def windows? (-> (System/getProperty "os.name")
60 | (str/lower-case)
61 | (str/includes? "win")))
62 |
63 | ;; parse-cmd accept the following formats:
64 | #_["\"foo bar\" a b c \"the d\""
65 | "\"foo \\\" bar\" a b c \"the d\""
66 | "echo '{\"AccessKeyId\":\"****\",\"SecretAccessKey\":\"***\",\"Version\":1}'"
67 | "echo 'foo bar'"]
68 |
69 | ;(with-test
70 | (defn parse-cmd
71 | "Split string to list of individual space separated arguments.
72 | If argument contains space you can wrap it with `'` or `\"`."
73 | [s]
74 | (loop [s (java.io.StringReader. s)
75 | in-double-quotes? false
76 | in-single-quotes? false
77 | buf (java.io.StringWriter.)
78 | parsed []]
79 | (let [c (.read s)]
80 | (cond
81 | (= -1 c) (if (pos? (count (str buf)))
82 | (conj parsed (str buf))
83 | parsed)
84 | (= 39 c) ;; single-quotes
85 | (if in-single-quotes?
86 | ;; exit single-quoted string
87 | (recur s in-double-quotes? false (java.io.StringWriter.) (conj parsed (str buf)))
88 | ;; enter single-quoted string
89 | (recur s in-double-quotes? true buf parsed))
90 |
91 | (= 92 c) ;; assume escaped quote
92 | (let [escaped (.read s)
93 | buf (doto buf (.write escaped))]
94 | (recur s in-double-quotes? in-single-quotes? buf parsed))
95 |
96 | (and (not in-single-quotes?) (= 34 c)) ;; double quote
97 | (if in-double-quotes?
98 | ;; exit double-quoted string
99 | (recur s false in-single-quotes? (java.io.StringWriter.) (conj parsed (str buf)))
100 | ;; enter double-quoted string
101 | (recur s true in-single-quotes? buf parsed))
102 |
103 | (and (not in-double-quotes?)
104 | (not in-single-quotes?)
105 | (Character/isWhitespace c))
106 | (recur s in-double-quotes? in-single-quotes? (java.io.StringWriter.)
107 | (let [bs (str buf)]
108 | (cond-> parsed
109 | (not (str/blank? bs)) (conj bs))))
110 | :else (do
111 | (.write buf c)
112 | (recur s in-double-quotes? in-single-quotes? buf parsed))))))
113 |
114 | ; (is (= [] (split-arguments-string "")))
115 | ; (is (= ["hello"] (split-arguments-string "hello")))
116 | ; (is (= ["hello" "world"] (split-arguments-string " hello world ")))
117 | ; (is (= ["foo bar" "a" "b" "c" "the d"] (split-arguments-string "\"foo bar\" a b c \"the d\"")))
118 | ; (is (= ["echo" "foo bar"] (split-arguments-string "echo 'foo bar'"))))
119 |
120 | (defn run-credential-process-cmd [cmd]
121 | (let [cmd (parse-cmd cmd)
122 | cmd (if windows?
123 | (mapv #(str/replace % "\"" "\\\"")
124 | cmd)
125 | cmd)
126 | ;; _ (binding [*out* *err*] (prn :cmd cmd))
127 | {:keys [exit out err]} (apply shell/sh cmd)]
128 | (if (zero? exit)
129 | out
130 | (throw (ex-info (str "Non-zero exit: " (pr-str err)) {})))))
131 |
132 | (defn get-credentials-via-cmd [cmd]
133 | (let [credential-map (json/read-str (run-credential-process-cmd cmd))
134 | {:strs [AccessKeyId SecretAccessKey SessionToken Expiration]} credential-map]
135 | (assert (and AccessKeyId SecretAccessKey))
136 | {"aws_access_key_id" AccessKeyId
137 | "aws_secret_access_key" SecretAccessKey
138 | "aws_session_token" SessionToken
139 | :Expiration Expiration}))
140 |
141 | (defn -credential-process-credentials-provider
142 | "Like profile-credentials-provider but with support for credential_process
143 |
144 | See https://github.com/cognitect-labs/aws-api/issues/73"
145 | ([jvm-props]
146 | (with-system-properties jvm-props
147 | (-credential-process-credentials-provider jvm-props (or (u/getenv "AWS_PROFILE")
148 | (u/getProperty "aws.profile")
149 | "default"))))
150 | ([jvm-props profile-name]
151 | (with-system-properties jvm-props
152 | (-credential-process-credentials-provider jvm-props profile-name (or (io/file (u/getenv "AWS_CREDENTIAL_PROFILES_FILE"))
153 | (io/file (u/getProperty "user.home") ".aws" "credentials")))))
154 | ([_jvm-props profile-name ^java.io.File f]
155 | (create-provider
156 | (creds/auto-refreshing-credentials
157 | (reify creds/CredentialsProvider
158 | (fetch [_]
159 | (when (.exists f)
160 | (try
161 | (let [profile (get (config/parse f) profile-name)
162 | profile (if-let [cmd (get profile "credential_process")]
163 | (merge profile (get-credentials-via-cmd cmd))
164 | profile)]
165 | (creds/valid-credentials
166 | {:aws/access-key-id (get profile "aws_access_key_id")
167 | :aws/secret-access-key (get profile "aws_secret_access_key")
168 | :aws/session-token (get profile "aws_session_token")
169 | ::creds/ttl (creds/calculate-ttl profile)}
170 | "aws profiles file"))
171 | (catch Throwable t
172 | (log/error t "Error fetching credentials from aws profiles file")
173 | {})))))))))
174 |
175 | (def http-client pod.babashka.aws.impl.aws/http-client)
176 |
177 | (defn -default-credentials-provider [jvm-props]
178 | (with-system-properties jvm-props
179 | (create-provider (creds/default-credentials-provider @http-client))))
180 |
181 | (extend-protocol creds/CredentialsProvider
182 | clojure.lang.PersistentArrayMap
183 | (fetch [m]
184 | (creds/fetch (get-provider m))))
185 |
186 | ;;; Pod Client
187 |
188 | (defn -fetch [provider]
189 | (when-let [provider (get-provider provider)]
190 | (creds/fetch provider)))
191 |
192 | (def lookup-map
193 | {'fetch -fetch
194 | '-basic-credentials-provider -basic-credentials-provider
195 | '-system-property-credentials-provider -system-property-credentials-provider
196 | '-profile-credentials-provider -profile-credentials-provider
197 | '-credential-process-credentials-provider -credential-process-credentials-provider
198 | '-default-credentials-provider -default-credentials-provider})
199 |
200 | (require 'cognitect.aws.ec2-metadata-utils)
201 |
202 | (def relevant-jvm-properties ["user.home"
203 | "aws.profile"
204 | "aws.accessKeyId"
205 | "aws.secretKey"
206 | "aws.sessionToken"
207 | "aws.region"
208 | cognitect.aws.ec2-metadata-utils/ec2-metadata-service-override-system-property])
209 |
210 | (def describe-map
211 | `{:name pod.babashka.aws.credentials
212 | :vars
213 | ~(conj (mapv (fn [[k _]]
214 | {:name k})
215 | lookup-map)
216 | {:name "-jvm-properties"
217 | :code (format
218 | "(defn -jvm-properties []
219 | (select-keys (System/getProperties) %s))" relevant-jvm-properties)}
220 |
221 | {:name "profile-credentials-provider"
222 | :code (pr-str
223 | '(defn profile-credentials-provider [& args]
224 | (apply -profile-credentials-provider (cons (-jvm-properties) args))))}
225 |
226 | {:name "credential-process-credentials-provider"
227 | :code (pr-str
228 | '(defn credential-process-credentials-provider [& args]
229 | (apply -credential-process-credentials-provider (cons (-jvm-properties) args))))}
230 |
231 | {:name "basic-credentials-provider"
232 | :code (pr-str
233 | '(defn basic-credentials-provider [conf]
234 | (-basic-credentials-provider conf)))}
235 |
236 | {:name "system-property-credentials-provider"
237 | :code (pr-str
238 | '(defn system-property-credentials-provider []
239 | (-system-property-credentials-provider (-jvm-properties))))}
240 |
241 | {:name "default-credentials-provider"
242 | :code (pr-str
243 | '(defn default-credentials-provider [& _]
244 | (-default-credentials-provider (-jvm-properties))))})})
245 |
--------------------------------------------------------------------------------
/src/pod/babashka/aws/logging.clj:
--------------------------------------------------------------------------------
1 | (ns pod.babashka.aws.logging
2 | (:require [clojure.string :as str]))
3 |
4 | (defn set-jul-level!
5 | "Sets the log level of a java.util.logging Logger.
6 |
7 | Sets a java.util.logging Logger to the java.util.logging.Level with
8 | the name `level`.
9 |
10 | Sets the level of the Logger with name `logger-name` if
11 | given. Otherwise sets the level of the global Logger."
12 | ([level]
13 | (set-jul-level! "" level))
14 | ([logger-name level]
15 | (some-> (.getLogger (java.util.logging.LogManager/getLogManager) logger-name)
16 | (.setLevel (java.util.logging.Level/parse level)))))
17 |
18 | (def jul-level
19 | {:trace "FINEST"
20 | :debug "FINE"
21 | :info "INFO"
22 | :warn "WARNING"
23 | :error "SEVERE"
24 | :fatal "SEVERE"})
25 |
26 | (defn set-level! [s]
27 | (let [k (keyword (str/lower-case (name s)))
28 | level (get jul-level k (str s))]
29 | (set-jul-level! level)))
30 |
--------------------------------------------------------------------------------
/test/credentials_test.clj:
--------------------------------------------------------------------------------
1 | (ns credentials-test
2 | (:require
3 | [babashka.pods :as pods]
4 | [clojure.java.io :as io]
5 | [clojure.test :as t :refer [deftest is]]))
6 |
7 | (defmethod clojure.test/report :begin-test-var [m]
8 | (println "===" (-> m :var meta :name))
9 | (println))
10 |
11 | (if (= "executable" (System/getProperty "org.graalvm.nativeimage.kind"))
12 | (do
13 | (println "Running native tests")
14 | (pods/load-pod "./pod-babashka-aws"))
15 | (do
16 | (println "Running JVM tests")
17 | (pods/load-pod ["clojure" "-M" "-m" "pod.babashka.aws"])))
18 |
19 | (require '[pod.babashka.aws.credentials :as creds])
20 |
21 | (defmacro with-system-properties [props & body]
22 | `(let [props# (System/getProperties)]
23 | (try
24 | (doseq [[k# v#] ~props]
25 | (System/setProperty k# v#))
26 | ~@body
27 | (finally
28 | (System/setProperties props#)))))
29 |
30 | (defn create-temp-dir [prefix]
31 | (str (java.nio.file.Files/createTempDirectory
32 | prefix
33 | (into-array java.nio.file.attribute.FileAttribute []))))
34 |
35 | (defn create-aws-credentials-file [content]
36 | (let [temp-dir (create-temp-dir "pod-babashka-aws")
37 | creds-file (clojure.java.io/file temp-dir ".aws/credentials")]
38 | (clojure.java.io/make-parents creds-file)
39 | (spit creds-file content)
40 | temp-dir))
41 |
42 | (deftest aws-credentials-test
43 | (is (= (creds/fetch (creds/basic-credentials-provider {:access-key-id "key"
44 | :secret-access-key "secret"}))
45 | #:aws{:access-key-id "key", :secret-access-key "secret"}))
46 |
47 | (with-system-properties {"aws.accessKeyId" "prop-key"
48 | "aws.secretKey" "prop-secret"
49 | "aws.sessionToken" "prop-session-token"}
50 | (is (= (creds/fetch (creds/system-property-credentials-provider))
51 | #:aws{:access-key-id "prop-key", :secret-access-key "prop-secret",
52 | :session-token "prop-session-token"})))
53 |
54 | (with-system-properties {"aws.accessKeyId" "default-prop-key"
55 | "aws.secretKey" "default-prop-secret"
56 | "aws.sessionToken" "default-session-token"}
57 | (is (= (creds/fetch (creds/default-credentials-provider))
58 | #:aws{:access-key-id "default-prop-key", :secret-access-key "default-prop-secret",
59 | :session-token "default-session-token"})))
60 |
61 | (is (= (creds/fetch (creds/basic-credentials-provider {:access-key-id "basic-key"
62 | :secret-access-key "basic-secret"}))
63 | #:aws{:access-key-id "basic-key", :secret-access-key "basic-secret"}))
64 |
65 | (let [home-dir (create-aws-credentials-file "[default]
66 | aws_access_key_id=creds-prop-key
67 | aws_secret_access_key=creds-prop-secret")]
68 | (with-system-properties {"user.home" home-dir}
69 | (is (= (creds/fetch (creds/profile-credentials-provider))
70 | #:aws{:access-key-id "creds-prop-key", :secret-access-key "creds-prop-secret"
71 | :session-token nil}))))
72 |
73 | (let [home-dir (create-aws-credentials-file "[custom]
74 | aws_access_key_id=creds-custom-prop-key
75 | aws_secret_access_key=creds-custom-prop-secret")]
76 | (with-system-properties {"user.home" home-dir
77 | "aws.profile" "custom"}
78 | (is (= (creds/fetch (creds/profile-credentials-provider))
79 | #:aws{:access-key-id "creds-custom-prop-key", :secret-access-key "creds-custom-prop-secret"
80 | :session-token nil}))))
81 |
82 |
83 | (let [expiration (str (.plus (java.time.Instant/now) 10 java.time.temporal.ChronoUnit/MINUTES))
84 | creds-file-content (format "[custom]
85 | credential_process = echo '{\"AccessKeyId\":\"creds+-custom-prop-key\",\"SecretAccessKey\":\"creds+-custom-prop-secret\",\"Version\":1,\"Expiration\":\"%s\"}'" expiration)
86 | home-dir (create-aws-credentials-file creds-file-content)]
87 | (with-system-properties {"user.home" home-dir
88 | "aws.profile" "custom"}
89 | (is (= (creds/fetch (creds/credential-process-credentials-provider))
90 | #:aws{:access-key-id "creds+-custom-prop-key",
91 | :secret-access-key "creds+-custom-prop-secret"
92 | :session-token nil
93 | :cognitect.aws.credentials/ttl (dec 300)}))))
94 |
95 |
96 | (let [expiration (str (.plus (java.time.Instant/now) 10 java.time.temporal.ChronoUnit/MINUTES))
97 | session-token "my-session-token"
98 | creds-file-content (format "[custom]
99 | credential_process = echo '{\"AccessKeyId\":\"creds+-custom-prop-key\",\"SecretAccessKey\":\"creds+-custom-prop-secret\",\"SessionToken\":\"%s\",\"Version\":1,\"Expiration\":\"%s\"}'"
100 | session-token
101 | expiration)
102 | home-dir (create-aws-credentials-file creds-file-content)]
103 | (with-system-properties {"user.home" home-dir
104 | "aws.profile" "custom"}
105 | (is (= (creds/fetch (creds/credential-process-credentials-provider))
106 | #:aws{:access-key-id "creds+-custom-prop-key",
107 | :secret-access-key "creds+-custom-prop-secret"
108 | :session-token session-token
109 | ;; Test runs within a second, so with flooring and the cutoff of 300, the ttl is 299
110 | :cognitect.aws.credentials/ttl 299})))))
111 |
112 | (require '[pod.babashka.aws.config :as config])
113 |
114 | (deftest aws-config-test
115 | (let [creds-file-content "[custom]
116 | aws_access_key_id=creds-custom-prop-key
117 | aws_secret_access_key=creds-custom-prop-secret"
118 | home-dir (create-aws-credentials-file creds-file-content)]
119 | (is (= (config/parse (str home-dir
120 |
121 | "/.aws/credentials"))
122 | {"custom" {"aws_access_key_id" "creds-custom-prop-key",
123 | "aws_secret_access_key" "creds-custom-prop-secret"}}))))
124 |
125 | (when-not (= "executable" (System/getProperty "org.graalvm.nativeimage.kind"))
126 | (shutdown-agents))
127 |
128 | (let [{:keys [:fail :error]} (t/run-tests)]
129 | (System/exit (+ fail error)))
130 |
--------------------------------------------------------------------------------
/test/script.clj:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bb
2 |
3 | (ns script
4 | (:require
5 | [babashka.pods :as pods]
6 | [clojure.edn :as edn]
7 | [clojure.java.io :as io]
8 | [clojure.string :as str]
9 | [clojure.test :as t :refer [deftest is testing]]))
10 |
11 | (defmethod clojure.test/report :begin-test-var [m]
12 | (println "===" (-> m :var meta :name))
13 | (println))
14 |
15 | (if (= "executable" (System/getProperty "org.graalvm.nativeimage.kind"))
16 | (do
17 | (println "Running native tests")
18 | (pods/load-pod "./pod-babashka-aws"))
19 | (do
20 | (println "Running JVM tests")
21 | (pods/load-pod ["clojure" "-M" "-m" "pod.babashka.aws"])))
22 |
23 | (require '[pod.babashka.aws :as aws])
24 |
25 | ;; TODO maybe less implicit config for this
26 | (defn localstack? []
27 | (= "test" (System/getenv "AWS_ACCESS_KEY_ID") (System/getenv "AWS_SECRET_ACCESS_KEY")))
28 |
29 | (def localstack-endpoint {:protocol :http :hostname "localhost" :port 4566})
30 |
31 | (def region (System/getenv "AWS_REGION"))
32 | (def s3 (aws/client (merge
33 | {:api :s3 :region (or region "eu-central-1") }
34 | (when (localstack?)
35 | {:endpoint-override localstack-endpoint}))))
36 |
37 | (def lambda (aws/client (merge
38 | {:api :lambda :region (or region "eu-central-1") }
39 | (when (localstack?)
40 | {:endpoint-override localstack-endpoint}))))
41 |
42 | (deftest aws-ops-test
43 | (is (contains? (aws/ops s3) :ListBuckets)))
44 |
45 | (deftest aws-doc-test
46 | (is (str/includes?
47 | (with-out-str (aws/doc s3 :ListBuckets))
48 | "Returns a list of all buckets")))
49 |
50 | (deftest aws-invoke-test
51 | ;; tests cannot be conditionally defined in bb currently, see #705, so moved
52 | ;; the conditions inside the test
53 | (if (and (System/getenv "AWS_ACCESS_KEY_ID")
54 | (System/getenv "AWS_SECRET_ACCESS_KEY")
55 | region)
56 | (do (is (= (keys (aws/invoke s3 {:op :ListBuckets})) [:Buckets :Owner]))
57 | (let [bucket-name (str "pod-bb-aws-test-" (java.util.UUID/randomUUID))
58 | png (java.nio.file.Files/readAllBytes
59 | (.toPath (io/file "resources" "babashka.png")))
60 | ;; ensure bucket, ignore error if it already exists
61 | _bucket-resp (aws/invoke
62 | s3
63 | {:op :CreateBucket
64 | :request {:Bucket bucket-name
65 | :CreateBucketConfiguration {:LocationConstraint region}}})
66 | put1 (aws/invoke s3 {:op :PutObject
67 | :request {:Bucket bucket-name
68 | :Key "logo.png"
69 | :Body png}})
70 | _ (is (not (:Error put1)))
71 | get1 (aws/invoke s3 {:op :GetObject
72 | :request {:Bucket bucket-name
73 | :Key "logo.png"}})
74 | read-bytes (fn [is]
75 | (let [baos (java.io.ByteArrayOutputStream.)]
76 | (io/copy is baos)
77 | (.toByteArray baos)))
78 | bytes (read-bytes (:Body get1))
79 | _ (is (= (count png) (count bytes)))
80 | put2 (testing "inputstream arg"
81 | (aws/invoke s3 {:op :PutObject
82 | :request {:Bucket bucket-name
83 | :Key "logo.png"
84 | :Body (io/input-stream
85 | (io/file "resources" "babashka.png"))}}))
86 | _ (is (not (:Error put2)))
87 | get2 (aws/invoke s3 {:op :GetObject
88 | :request {:Bucket bucket-name
89 | :Key "logo.png"}})
90 | bytes (read-bytes (:Body get2))
91 | _ (is (= (count png) (count bytes)))
92 | put3 (testing "file arg"
93 | (aws/invoke s3 {:op :PutObject
94 | :request {:Bucket bucket-name
95 | :Key "logo.png"
96 | :Body (io/file "resources" "babashka.png")}}))
97 | _ (is (not (:Error put3)))
98 | get3 (aws/invoke s3 {:op :GetObject
99 | :request {:Bucket bucket-name
100 | :Key "logo.png"}})
101 | bytes (read-bytes (:Body get3))
102 | _ (is (= (count png) (count bytes)))
103 | lambda-resp (aws/invoke lambda {:op :ListFunctions})
104 | _ (is (:Functions lambda-resp))
105 | _ (is (not (:Error (aws/invoke s3 {:op :DeleteObject
106 | :request {:Bucket bucket-name
107 | :Key "logo.png"}}))))
108 | _ (is (not (:Error (aws/invoke s3 {:op :DeleteBucket
109 | :request {:Bucket bucket-name}}))))]
110 | :the-end))
111 | (println "Skipping credential test")))
112 |
113 | (deftest no-such-service-test
114 | (is (thrown-with-msg?
115 | Exception #"api :some-typo not available"
116 | (aws/client {:api :some-typo}))))
117 |
118 | (def services (edn/read-string (slurp "resources/aws-services.edn")))
119 |
120 | (deftest all-services-test
121 | (testing "all clients of all available services"
122 | (doseq [service services]
123 | (is (= service (do (aws/client {:api service})
124 | service))))))
125 |
126 | (require '[pod.babashka.aws.logging :as logging])
127 |
128 | (deftest logging-test
129 | (logging/set-level! :info)
130 | (let [s3 (aws/client (merge
131 | {:api :s3 :region (or region "eu-central-1") }
132 | (when (localstack?)
133 | {:endpoint-override localstack-endpoint})))]
134 | (aws/invoke s3 {:op :ListBuckets}))
135 | (logging/set-level! :warn))
136 |
137 | (deftest throwable-test
138 | (let [s3 (aws/client (merge
139 | {:api :s3}
140 | (when (localstack?)
141 | {:endpoint-override localstack-endpoint})))]
142 | (is (aws/invoke s3 {:op :GetObject
143 | :request {:Bucket "pod-babashka-aws"
144 | :Key "logo.png"}}))))
145 |
146 | (when-not (= "executable" (System/getProperty "org.graalvm.nativeimage.kind"))
147 | (shutdown-agents))
148 |
149 | (let [{:keys [:fail :error]} (t/run-tests)]
150 | (System/exit (+ fail error)))
151 |
--------------------------------------------------------------------------------