https://github.com/aws4s/aws4s
Non-blocking AWS SDK for Scala exposing strongly-typed APIs built on top of http4s, fs2 and cats
https://github.com/aws4s/aws4s
aws scala
Last synced: 5 months ago
JSON representation
Non-blocking AWS SDK for Scala exposing strongly-typed APIs built on top of http4s, fs2 and cats
- Host: GitHub
- URL: https://github.com/aws4s/aws4s
- Owner: aws4s
- License: mit
- Archived: true
- Created: 2017-12-03T14:49:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-20T20:31:43.000Z (about 8 years ago)
- Last Synced: 2024-05-02T11:13:06.646Z (about 2 years ago)
- Topics: aws, scala
- Language: Scala
- Homepage: http://aws4s.org
- Size: 173 KB
- Stars: 87
- Watchers: 6
- Forks: 12
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-scala - aws4s - Non-blocking AWS SDK for Scala exposing strongly-typed APIs built on top of http4s, fs2 and cats. (Misc)
README
# aws4s #
[](https://travis-ci.org/aws4s/aws4s)
[](https://maven-badges.herokuapp.com/maven-central/org.aws4s/aws4s_2.12)

> Non-blocking AWS SDK for Scala exposing strongly-typed APIs built on top of [http4s](http://http4s.org), [fs2](https://github.com/functional-streams-for-scala/fs2) and [cats](https://typelevel.org/cats/)
## Installation ##
```sbt
libraryDependencies ++= Seq(
"org.aws4s" %% "aws4s" % aws4sVersion,
)
```
## Service Support ##
- SQS: (`sendMessage`, `receiveMessage`, `deleteMessage`)
- S3: (`listBuckets`, `putObject`, `deleteObject`, `getObject`)
- KMS: (`encrypt`, `decrypt`, `createKey`, `scheduleKeyDeletion`)
- DynamoDB (`createTable`, `deleteTable`)
Missing a service or a certain functionality for a service? Create a [feature request](https://github.com/aws4s/aws4s/issues/new?labels=feature%20request). PRs are
also welcome.
## Usage Examples ##
```scala
import cats.effect.IO
import org.aws4s.Credentials
import org.aws4s.sqs.{DelaySeconds, MessageBody, Queue, Sqs}
import org.http4s.client.blaze.Http1Client // You'll need the `http4s-blaze-client` dependency for that
val credentials = () => Credentials("ACCESS_KEY_HERE", "SECRET_KEY_HERE")
val httpClient = Http1Client[IO]()
val sqs = Sqs(httpClient, credentials)
val queueUrl = "https://sqs.eu-central-1.amazonaws.com/FAKE_QUEUE_URL"
val q = Queue.unsafeFromString(queueUrl)
val action: IO[Unit] =
sqs.sendMessage(q, MessageBody("Yo!"), Some(DelaySeconds(5)))
.attempt
.map {
case Left(err) => System.err.println(err)
case Right(success) => println(success)
}
// Run final action to produce effects
println("Sending a message..")
action.unsafeRunSync()
```
## Versioning ##
Unstable API until `1.0.0`, then semantic versioning from there on.
## Acknowledgements ##
Request signing logic is adapted from the code in [this project](https://github.com/ticofab/aws-request-signer).