Skip to content

zio-mesh/zio-aws-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zio-aws-s3

Welcome to ZIO AWS S3 !

This project aims to ease ZIO integration with AWS S3, providing a clean, simple and efficient API.

Major features

  • AWS S3 Java v2 2.10.42
  • ZIO Task wrapper for all AWS methods
  • Module Pattern implementation
  • ZIO Test integration

Usage

With ZIO Test library, you can use this as simple as:

    testM("list all keys, related to a specific prefix") {      
      val res = for {
        s3  <- aws.service.createClient(region, endpoint).mapError(_ => new IOException("S3 client creation failed"))
        out <- aws.service.listObjectsKeys(bucket, prefix)(s3)
        _   = println(out)
      } yield out

      assertM(res.foldM(_ => ZIO.fail("failed"), _ => ZIO.succeed("ok")), equalTo("ok"))
    } @@ timeout(10.seconds)
  )

Check ZTest specs for more details

About

ZIO integration with AWS S3 SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published