/cognitect-aws-api

Example of using the Cognitect aws-api library from Clojure

Primary LanguageClojureEclipse Public License 1.0EPL-1.0

Demo Project for Cognect AWS-API library

title says it all

Running Unit Tests

> lein clean
> lein test

Verify AWS Install

> which aws
/usr/local/bin/aws

> aws --version
aws-cli/2.4.6 Python/3.9.9 Darwin/21.3.0 source/x86_64 prompt/off

Verify Clojure Install

> java --version
java 17.0.1 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

> lein --version
Leiningen 2.9.8 on Java 17.0.1 Java HotSpot(TM) 64-Bit Server VM

Config & Credential files

After running aws configure we see our credential and config files:

> cat ~/.aws/credentials
[default]
aws_access_key_id=AKIAWAXXXXXXXXXXX7FX
aws_secret_access_key=V6pI/f3XXXXXXXXXXXXXXXXXXXXXXs63HirtM1WZ

> cat ~/.aws/config
[default]
region=us-west-1
output=json
Note
spaces in the above files around the = can cause failures!

Also, be aware that you can override the values in the above files by setting environment variables:

export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=us-west-2

License

Copyright © 2022 Alan Thompson

Distributed under the Eclipse Public License, the same as Clojure.