{"id":37200984,"url":"https://github.com/babashka/pod-babashka-aws","last_synced_at":"2026-01-14T23:10:32.762Z","repository":{"id":37529625,"uuid":"325868827","full_name":"babashka/pod-babashka-aws","owner":"babashka","description":"Deprecated, use https://github.com/grzm/awyeah-api","archived":true,"fork":false,"pushed_at":"2022-10-06T15:04:21.000Z","size":214,"stargazers_count":60,"open_issues_count":6,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-06-19T09:41:38.662Z","etag":null,"topics":["aws","babashka","clojure"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/babashka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-31T20:27:32.000Z","updated_at":"2024-05-31T07:52:09.000Z","dependencies_parsed_at":"2023-01-19T11:34:20.304Z","dependency_job_id":null,"html_url":"https://github.com/babashka/pod-babashka-aws","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/babashka/pod-babashka-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babashka%2Fpod-babashka-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babashka%2Fpod-babashka-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babashka%2Fpod-babashka-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babashka%2Fpod-babashka-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babashka","download_url":"https://codeload.github.com/babashka/pod-babashka-aws/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babashka%2Fpod-babashka-aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28437933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","babashka","clojure"],"created_at":"2026-01-14T23:10:31.746Z","updated_at":"2026-01-14T23:10:32.679Z","avatar_url":"https://github.com/babashka.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e # pod-babashka-aws \u003csup\u003e* *deprecated*\u003c/sup\u003e\n\u003e\n\u003e **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)!\nThis means that this pod is no longer necessary, and will no longer be maintained.\nPlease use [Awyeah-api](https://github.com/grzm/awyeah-api).\n\nA [babashka](https://github.com/babashka/babashka)\n[pod](https://github.com/babashka/pods) wrapping the\n[aws-api](https://github.com/cognitect-labs/aws-api) library.\n\n## Status\n\nExperimental, awaiting your feedback.\n\n## API\n\nThe namespaces and functions in this pod reflect those in the official\n[aws-api](https://github.com/cognitect-labs/aws-api) library.\n\nAvailable namespaces and functions:\n\n- `pod.babashka.aws`: `client`, `doc`, `invoke`\n- `pod.babashka.aws.config`: `parse`\n- `pod.babashka.aws.credentials`: `credential-process-credentials-provider`,\n  `basic-credentials-provider`, `default-credentials-provider`,\n  `fetch`, `profile-credentials-provider`, `system-property-credentials-provider`\n- `pod.babashka.aws.logging`: `set-level!`\n\n## Examples\n\n### Single-file script\n\n``` clojure\n#!/usr/bin/env bb\n\n(require '[babashka.pods :as pods])\n\n(pods/load-pod 'org.babashka/aws \"0.1.2\")\n\n(require '[pod.babashka.aws :as aws])\n\n(def region \"eu-central-1\")\n\n(def s3-client\n  (aws/client {:api :s3 :region region}))\n\n(aws/doc s3-client :ListBuckets)\n\n(aws/invoke s3-client {:op :ListBuckets})\n\n(aws/invoke s3-client\n            {:op :CreateBucket\n             :request {:Bucket \"pod-babashka-aws\"\n                       :CreateBucketConfiguration {:LocationConstraint region}}})\n\n(require '[clojure.java.io :as io])\n\n(aws/invoke s3-client\n            {:op :PutObject\n             :request {:Bucket \"pod-babashka-aws\"\n                       :Key \"logo.png\"\n                       :Body (io/file \"resources\" \"babashka.png\")}})\n```\n\nSee [test/script.clj](test/script.clj) for an example script.\n\n### Project with a bb.edn file\n\n`bb.edn`:\n\n```clojure\n{:pods {org.babashka/aws {:version \"0.1.2\"}}} ; this will be loaded on demand\n```\n\nYour code:\n\n```clojure\n(ns my.code\n  (:require [pod.babashka.aws :as aws] ; required just like a normal Clojure library\n            [clojure.java.io :as io]))\n  \n(def region \"eu-central-1\")\n\n(def s3-client\n  (aws/client {:api :s3 :region region}))\n\n(aws/doc s3-client :ListBuckets)\n\n(aws/invoke s3-client {:op :ListBuckets})\n\n(aws/invoke s3-client\n            {:op :CreateBucket\n             :request {:Bucket \"pod-babashka-aws\"\n                       :CreateBucketConfiguration {:LocationConstraint region}}})\n\n(aws/invoke s3-client\n            {:op :PutObject\n             :request {:Bucket \"pod-babashka-aws\"\n                       :Key \"logo.png\"\n                       :Body (io/file \"resources\" \"babashka.png\")}})\n```\n\n## Differences with aws-api\n\n- Credentials: custom flows are supported, but not by extending CredentialsProvider interface. See \u003ca href=\"#credentials\"\u003eCredentials\u003c/a\u003e for options.\n- This pod doesn't require adding dependencies for each AWS service.\n- Async might be added in a later version.\n- For uploading (big) files (e.g. to S3), it is better for memory consumption to\n  pass a `java.io.File` directly, rather than an input-stream.\n\n## Credentials\n\nThe default behaviour for credentials is the same way as Cognitect's\n[`aws-api`](https://github.com/cognitect-labs/aws-api#credentials); meaning the\nclient implicitly looks up credentials the same way the [java SDK\ndoes](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html)\n.\n\nTo provide credentials explicitly, you can pass a `credentials-provider` to the\nclient constructor fn, e.g.:\n\n```clojure\n(require '[pod.babashka.aws :as aws])\n(require '[pod.babashka.aws.credentials :as credentials])\n\n(def s3 (aws/client {:api :s3\n                     :credentials-provider (credentials/basic-credentials-provider\n                                            {:access-key-id     \"ABC\"\n                                             :secret-access-key \"XYZ\"})}))\n```\n\nIn contrast to the `aws-api` library this pod does not support extending the\nCredentialsProvider interface. For more complex flows, e.g. temporary\ncredentials obtained by `AWS SSO`, one can use a `credential_process` entry in a\n`~/.aws/credentials` file, as documented [here](https://docs.aws.amazon.com/credref/latest/refdocs/setting-global-credential_process.html):\n\n```clojure\n(def s3 (aws/client {:api :s3\n                     :credentials-provider (credentials/credential-process-credentials-provider\n                                            \"custom-profile\")}))\n```\n\nwhere `~/.aws/credentials` could look like\n\n```\n[custom-profile]\n   credential_process = bb fetch_sso_credentials.clj\n```\n\nThe `credential_process` entry can be any program that prints the expected JSON data:\n\n```clojure\n#!/usr/bin/env bb\n\n(println \"{\\\"AccessKeyId\\\":\\\"***\\\",\\\"SecretAccessKey\\\":\\\"***\\\",\\\"SessionToken\\\":\\\"***\\\",\\\"Expiration\\\":\\\"2020-01-00T00:00:00Z\\\",\\\"Version\\\":1}\")\n```\n\n## Logging\n\nThe aws-api includes clojure.tools.logging using the default java.util.logging\nimplementation. Use `pod.babashka.aws.logging/set-level!` to change the level of\nlogging in the pod. The default log level in the pod is `:warn`. All possible\nlevels: `:trace`, `:debug`, `:info`, `:warn`, `:error` or `:fatal`.\n\nEach aws-api client has its own logger which adopts the logging level\nof the global logger at time it was instantiated.\n\n```clojure\nuser=\u003e (def sts-1 (aws/client {:api :sts}))\n2021-11-10 23:07:13.608:INFO::main: Logging initialized @30234ms to org.eclipse.jetty.util.log.StdErrLog\n#'user/sts-1\n\nuser=\u003e (keys (aws/invoke sts-1 {:op :GetCallerIdentity}))\n(:UserId :Account :Arn)\n\nuser=\u003e (require '[pod.babashka.aws.logging :as logging])\nnil\n\nuser=\u003e (logging/set-level! :info)\nnil\nuser=\u003e (def sts-2 (aws/client {:api :sts}))\n#'user/sts-2\n\nuser=\u003e (keys (aws/invoke sts-2 {:op :GetCallerIdentity}))\nNov 10, 2021 11:07:45 PM clojure.tools.logging$eval9973$fn__9976 invoke\nINFO: Unable to fetch credentials from environment variables.\nNov 10, 2021 11:07:45 PM clojure.tools.logging$eval9973$fn__9976 invoke\nINFO: Unable to fetch credentials from system properties.\n(:UserId :Account :Arn)\n\n;; The sts-1 client still has level :warn:\nuser=\u003e (keys (aws/invoke sts-1 {:op :GetCallerIdentity}))\n(:UserId :Account :Arn)\n```\n\n## Build\n\nRun `script/compile`. This requires `GRAALVM_HOME` to be set.\n\n## Update aws-api deps\n\nRun `script/update-deps.clj`.\n\n## Test\n\nRun `script/test`. This will run both the pod and tests (defined in\n`test/script.clj`) in two separate JVMs.\n\nTo test the native-image together with babashka, run the tests while setting\n`APP_TEST_ENV` to `native`:\n\n``` shell\nAPP_TEST_ENV=native script/test\n```\n\nTo test with [localstack](https://github.com/localstack/localstack):\n\n``` shell\n# Start localstack\ndocker-compose up -d\n\n# Set test credentials and run tests\nAWS_REGION=eu-north-1 AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test script/test\n```\n\nWhen 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.\n\n## License\n\nCopyright © 2020 Michiel Borkent, Jeroen van Dijk, Rahul De and Valtteri Harmainen.\n\nDistributed under the Apache License 2.0. See LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabashka%2Fpod-babashka-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabashka%2Fpod-babashka-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabashka%2Fpod-babashka-aws/lists"}