{"id":26553577,"url":"https://github.com/maginepro/http4s-aws","last_synced_at":"2025-07-23T18:07:31.341Z","repository":{"id":282291768,"uuid":"947912370","full_name":"maginepro/http4s-aws","owner":"maginepro","description":"Signed AWS API requests for http4s :lock:","archived":false,"fork":false,"pushed_at":"2025-06-09T07:22:40.000Z","size":217,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-09T08:28:49.153Z","etag":null,"topics":["aws","http4s","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maginepro.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-13T12:52:51.000Z","updated_at":"2025-06-09T07:22:42.000Z","dependencies_parsed_at":"2025-05-08T14:20:46.707Z","dependency_job_id":"885ef617-86d4-4e41-b393-4a63225b68c4","html_url":"https://github.com/maginepro/http4s-aws","commit_stats":null,"previous_names":["maginepro/http4s-aws"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/maginepro/http4s-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maginepro%2Fhttp4s-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maginepro%2Fhttp4s-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maginepro%2Fhttp4s-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maginepro%2Fhttp4s-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maginepro","download_url":"https://codeload.github.com/maginepro/http4s-aws/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maginepro%2Fhttp4s-aws/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266726679,"owners_count":23974928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","http4s","scala"],"created_at":"2025-03-22T09:24:28.105Z","updated_at":"2025-07-23T18:07:31.336Z","avatar_url":"https://github.com/maginepro.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :lock: http4s-aws\n\nProvides [http4s](https://http4s.org) request authentication using [AWS Signature Version 4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html) signing.\u003cbr\u003e\nThe library is inspired by [filosganga/http4s-aws](https://github.com/filosganga/http4s-aws) but with significant differences.\n\n## Usage\n\nYou can add the following line to `build.sbt` to use the library.\n\n```scala\nlibraryDependencies += \"com.magine\" %% \"http4s-aws\" % http4sAwsVersion\n```\n\nMake sure to replace `http4sAwsVersion` with a [release version](https://github.com/maginepro/http4s-aws/releases).\u003cbr\u003e\nReplace `%%` with `%%%` if you are using [Scala.js](https://www.scala-js.org).\n\n## Quick Example\n\nCreate a `CredentialsProvider` and use `AwsSigningClient` to wrap an existing client.\n\n```scala\nimport cats.effect.IO\nimport cats.effect.IOApp\nimport com.magine.aws.Region\nimport com.magine.http4s.aws.AwsServiceName\nimport com.magine.http4s.aws.AwsSigningClient\nimport com.magine.http4s.aws.CredentialsProvider\nimport org.http4s.ember.client.EmberClientBuilder\nimport org.http4s.Request\n\nobject Main extends IOApp.Simple {\n  def run: IO[Unit] = {\n    val client =\n      for {\n        client \u003c- EmberClientBuilder.default[IO].build\n        provider \u003c- CredentialsProvider.default(client)\n        region = Region.EU_WEST_1\n        serviceName = AwsServiceName.Elasticsearch\n        signingClient = AwsSigningClient(provider, region, serviceName)(client)\n      } yield signingClient\n\n    val request: Request[IO] =\n      Request()\n\n    client.use(_.expect[Unit](request))\n  }\n}\n```\n\nIf pre-signing of requests is necessary, instead use `AwsPresigning`.\n\n```scala\nimport cats.effect.IO\nimport cats.effect.IOApp\nimport com.magine.aws.Region\nimport com.magine.http4s.aws.AwsPresigning\nimport com.magine.http4s.aws.AwsServiceName\nimport com.magine.http4s.aws.CredentialsProvider\nimport org.http4s.ember.client.EmberClientBuilder\nimport org.http4s.Request\nimport scala.concurrent.duration._\n\nobject Main extends IOApp.Simple {\n  def run: IO[Unit] = {\n    val presigning =\n      for {\n        client \u003c- EmberClientBuilder.default[IO].build\n        provider \u003c- CredentialsProvider.default(client)\n        region = Region.EU_WEST_1\n        serviceName = AwsServiceName.S3\n        expiry = 5.minutes\n        presigning = AwsPresigning(provider, region, serviceName, expiry)\n      } yield presigning\n\n    val request: Request[IO] =\n      Request()\n\n    presigning\n      .use(_.presign(request))\n      .map(_.uri.renderString)\n      .flatMap(IO.println)\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaginepro%2Fhttp4s-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaginepro%2Fhttp4s-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaginepro%2Fhttp4s-aws/lists"}