awslib_scala
awslib_scala copied to clipboard
An idiomatic Scala wrapper around the AWS Java SDK
Idiomatic Scala AWS Library
Starting with v1.1.18, Scala 2.12 is no longer supported, just Scala 2.13.
This project is sponsored by Micronautics Research Corporation,
the company behind Cadenza and
ScalaCourses.com.
Idiomatic Scala
This library provides a functional interface to the AWS Java library. The exposed API is much simpler to use than Amazon's Java API, however you can mix calls to this library with calls to the underlying AWS Java library.
Container classes such as CloudFront
, Comprehend
, IAM
, Polly
, Rekoginzer
, S3
, SNS
and SQS
are defined that
encapsulate top-level functionality.
The container classes are defined using composition instead of inheritance.
This library uses implicit values to simplify usage.
Some AWS Java classes have been enhanced using implicit classes so they appear to have extra capability.
Enhanced AWS classes include CloudFront's DistributionSummary
, S3's Bucket
and IAM's User
.
Most methods employ typed parameters so accidental mixing up of arguments cannot happen.
Programmers using this library are encouraged to use named parameters for the few remaining untyped parameters.
Building and Running
-
Java 8+ is required.
-
You need an AWS account. Separate AWS accounts for development and production are recommended.
-
Your AWS keys must either be defined in environment variables called
AWS_ACCESS_KEY
andAWS_SECRET_KEY
or you must have configured AWS CLI with your AWS authentication credentials. If environment variables and the AWS CLI configuration file are all available, the environment variables have precedence. -
Type the following into a bash console:
git clone https://github.com/mslinn/awslib_scala.git cd awslib_scala sbt test
Installation
Add this to your project's build.sbt
:
resolvers += "micronautics/scala on bintray" at "https://dl.bintray.com/micronautics/scala"
libraryDependencies += "com.micronautics" %% "awslib_scala" % "1.1.18" withSources()
Sample Code
See the unit tests for examples of how to use this library.