AWS API Library from Cognitect: cognitect-labs/aws-api
- Authentication
- S3 User
- IAM user
- Operations
- Documentation
- AWS SDKs often include extra functionality that's not in the library itself
- Clojure-native library as opposed to Amazonica, which maps the Java AWS library into Clojure
- Outgrowth of datomic cloud – need a data-driven AWS library
- You don't need to use as many Java-isms (don't need to create maps and interface with a builder)
- Use if you want to easily explore the different AWS endpoints without having to look at docs and intuiting functions
- Downsides – need to make your own helper libraries
- Smaller than Amazonica library; better for AWS Lambda functions
- More modular
- API library has the concept of clients
- In your namespace, just pull in
client.api
- Evan also made an
iam
ands3
namespace to simplify invocation
- 2 primary dependencies
- com.cognitect.aws.api
- com.cognitect.aws.endpoints
- Then every service has its own specific namespace (s3, iam, etc)
- API finds credentials just like other SDKs
(aws/invoke client {map})
- Ordinarily uses your keys, just like AWS CLI
- Can create new secret keys
basic-credentials-provider
(\rightarrow) allows you to use other keys, possibly keys created on the fly- Can use multiple sets of creds in the same session
- Creating a user and giving the user permissions are separate actions
- Create the user first, then add them to a group
- When you invoke an AWS operation, the first argument is always the client which has the credentials that you want to use
- lowercase keywords are library specific
- PascalCase keywoards are AWS specific
(aws/doc <client> <function>)
- S3 takes in a byte array – need to convert your stream into a stream of bytes or read a byte array
- This seems more fun than terraform
- Almost better than the default AWS CLI