{"id":13507561,"url":"https://github.com/aws-beam/aws-elixir","last_synced_at":"2025-05-14T01:03:04.848Z","repository":{"id":37663953,"uuid":"120816355","full_name":"aws-beam/aws-elixir","owner":"aws-beam","description":"AWS clients for Elixir","archived":false,"fork":false,"pushed_at":"2025-04-12T02:08:13.000Z","size":28771,"stargazers_count":576,"open_issues_count":12,"forks_count":137,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-13T20:17:34.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/aws-beam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-02-08T20:50:10.000Z","updated_at":"2025-04-12T02:08:17.000Z","dependencies_parsed_at":"2023-12-27T02:28:50.675Z","dependency_job_id":"15b725a5-7781-4dbd-822e-7f9626264a4b","html_url":"https://github.com/aws-beam/aws-elixir","commit_stats":{"total_commits":525,"total_committers":37,"mean_commits":14.18918918918919,"dds":0.52,"last_synced_commit":"a53888d2c6db81a9a1a7c22956102d056b7c6deb"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-beam%2Faws-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-beam%2Faws-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-beam%2Faws-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-beam%2Faws-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws-beam","download_url":"https://codeload.github.com/aws-beam/aws-elixir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248774961,"owners_count":21159534,"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","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":[],"created_at":"2024-08-01T02:00:36.164Z","updated_at":"2025-04-13T20:17:44.344Z","avatar_url":"https://github.com/aws-beam.png","language":"Elixir","funding_links":[],"categories":["Cloud Infrastructure and Management","Elixir","\u003ca name=\"Elixir\"\u003e\u003c/a\u003eElixir"],"sub_categories":[],"readme":"# AWS clients for Elixir\n\n[![Actions Status](https://github.com/aws-beam/aws-elixir/workflows/Build/badge.svg)](https://github.com/aws-beam/aws-elixir/actions)\n[![Module Version](https://img.shields.io/hexpm/v/aws.svg)](https://hex.pm/packages/aws)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/aws/)\n[![Total Download](https://img.shields.io/hexpm/dt/aws.svg)](https://hex.pm/packages/aws)\n[![License](https://img.shields.io/hexpm/l/aws.svg)](https://github.com/aws-beam/aws-elixir/blob/master/LICENSE.md)\n[![Last Updated](https://img.shields.io/github/last-commit/aws-beam/aws-elixir.svg)](https://github.com/aws-beam/aws-elixir/commits/master)\n\n🌳 With this library you can have access to almost all AWS services without hassle. ⚡\n\n## Features\n\n* A clean API separated per service. Each module has a correspondent service.\n* Support for most of AWS services.\n* Configurable HTTP client and JSON parser.\n* Generated by [aws-codegen](https://github.com/aws-beam/aws-codegen) using the\n  same JSON descriptions of AWS services used to build the\n  [AWS SDK for Go V2](https://github.com/aws/aws-sdk-go-v2/tree/main/codegen/sdk-codegen/aws-models).\n* Documentation is updated from the official AWS docs.\n\n## Usage\n\nHere is an example of listing Amazon Kinesis streams. First you need to start a\nconsole with `iex -S mix`.\n\nAfter that, type the following:\n\n```elixir\niex\u003e client = AWS.Client.create(\"your-access-key-id\", \"your-secret-access-key\", \"us-east-1\")\niex\u003e {:ok, result, resp} = AWS.Kinesis.list_streams(client, %{})\niex\u003e IO.inspect(result)\n%{\"HasMoreStreams\" =\u003e false, \"StreamNames\" =\u003e []}\n```\n\nIf you are using `AWS.S3`, you can upload a file with integrity check doing:\n\n```elixir\niex\u003e client = AWS.Client.create(\"your-access-key-id\", \"your-secret-access-key\", \"us-east-1\")\niex\u003e file = File.read!(\"./tmp/your-file.txt\")\niex\u003e md5 = :crypto.hash(:md5, file) |\u003e Base.encode64()\niex\u003e AWS.S3.put_object(client, \"your-bucket-name\", \"foo/your-file-on-s3.txt\",\n  %{\"Body\" =\u003e file, \"ContentMD5\" =\u003e md5})\n```\n\nNote that you may need to specify the `ContentType` attribute when calling `AWS.S3.put_object/4`.\nThis is because S3 will use that to store the MIME type of the file.\n\nYou can also upload to S3 as multipart. If you're facing timeout issues, this strategy is\nrecommended:\n\n```elixir\nclient = AWS.Client.create(\"your-access-key-id\", \"your-secret-access-key\", \"us-east-1\")\nbucket = \"your-bucket-name\"\nfilename = \"./your-big-file.wav\"\n# AWS minimum chunk size is 5MB\nchunk_size = 5_242_880\n\n# Create the multipart request\n{:ok,\n %{\n   \"InitiateMultipartUploadResult\" =\u003e %{\n     \"UploadId\" =\u003e upload_id\n   }\n }, _} = AWS.S3.create_multipart_upload(client, bucket, filename, %{})\n\nfile = File.read!(filename)\n\n# Send the file's binary in parts\nparts =\n  file\n  |\u003e String.codepoints()\n  |\u003e Stream.chunk_every(chunk_size)\n  |\u003e Stream.with_index(1)\n  |\u003e Enum.map(fn {chunk, i} -\u003e\n    chunk = Enum.join(chunk)\n\n    {:ok, nil, %{headers: headers, status_code: 200}} =\n      AWS.S3.upload_part(client, bucket, filename, %{\n        \"Body\" =\u003e chunk,\n        \"PartNumber\" =\u003e i,\n        \"UploadId\" =\u003e upload_id\n      })\n\n    {_, etag} = Enum.find(headers, fn {header, _} -\u003e header == \"ETag\" end)\n\n    %{\"ETag\" =\u003e etag, \"PartNumber\" =\u003e i}\n  end)\n\n\ninput = %{\"CompleteMultipartUpload\" =\u003e %{\"Part\" =\u003e parts}, \"UploadId\" =\u003e upload_id}\n\n# Complete the multipart request\nAWS.S3.complete_multipart_upload(aws_client, bucket, filename, input)\n```\n\nYou can also list objects in a bucket:\n\n```elixir\n# create the client just like the example above\niex\u003e AWS.S3.list_objects_v2(client, \"bucket-name-here\")\n```\n\nAnd download a specific object:\n\n```elixir\n# create the client just like the example above\n# object key is the \"file path\" in the S3 bucket\niex\u003e AWS.S3.get_object(client, \"bucket-name-here\", \"object-key-here\")\n```\n\nCheck all S3 related functions [in the docs here](https://hexdocs.pm/aws/AWS.S3.html).\n\nRemember to check the operation documentation for details:\n[https://docs.aws.amazon.com/](https://docs.aws.amazon.com/)\n\n## Installation\n\nAdd `:aws` to your list of dependencies in `mix.exs`. It also requires\n[hackney](https://github.com/benoitc/hackney) for the default HTTP client.\nOptionally, you can implement your own (Check `AWS.Client` docs).\n\n```elixir\ndef deps do\n  [\n    {:aws, \"~\u003e 1.0.0\"},\n    {:hackney, \"~\u003e 1.18\"}\n  ]\nend\n```\n\nRun `mix deps.get` to install.\n\n## Development\n\nMost of the code is generated using the\n[aws-codegen](https://github.com/aws-beam/aws-codegen) library from the JSON\ndescriptions of AWS services provided by Amazon. They can be found in\n`lib/aws/generated`.\n\nCode outside `lib/aws/generated` is manually written and used as support for\nthe generated code.\n\n## Documentation\n\nOnline\n* [Hex Docs](https://hexdocs.pm/aws)\n\nLocal\n* Run `mix docs`\n* Open `docs/index.html`\n\n__Note:__ Arguments, errors and response structure can be found by viewing the model schemas used to generate this module at `aws-sdk-go/models/apis/\u003caws-service\u003e/\u003cversion\u003e/`.\n\nAn example is [`aws-sdk-go/models/apis/rekognition/2016-06-27/api-2.json`](https://github.com/aws/aws-sdk-go/blob/master/models/apis/rekognition/2016-06-27/api-2.json).\nAlternatively you can access the documentation for the service you want at [AWS docs page](https://docs.aws.amazon.com/).\n\n## Tests\n\n```\n$ mix test\n```\n\n## Release\n\n* Make sure the `CHANGELOG.md` is up-to-date and reflects the changes for\n  the new version.\n* Bump the version here in the `README.md` and in `mix.exs`.\n* Run `git tag v$VERSION` to tag the version that was just published.\n* Run `git push --tags origin master` to push tags to Github.\n* Run `mix hex.publish` to publish the new version.\n\n## Copyright \u0026 License\n\nCopyright (c) 2015 Jamshed Kakar \u003cjkakar@kakar.ca\u003e\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-beam%2Faws-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws-beam%2Faws-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-beam%2Faws-elixir/lists"}