{"id":17681767,"url":"https://github.com/jgaskins/aws","last_synced_at":"2026-03-12T21:07:22.893Z","repository":{"id":143300788,"uuid":"282737492","full_name":"jgaskins/aws","owner":"jgaskins","description":"AWS Client for the Crystal programming language","archived":false,"fork":false,"pushed_at":"2024-07-12T21:12:53.000Z","size":40,"stargazers_count":12,"open_issues_count":9,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T09:48:01.326Z","etag":null,"topics":["aws","s3","sns","sqs"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgaskins.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-07-26T21:37:38.000Z","updated_at":"2024-08-10T12:39:41.000Z","dependencies_parsed_at":"2024-11-09T14:00:33.076Z","dependency_job_id":"adaca855-6ed8-4adb-9550-79bde4e0c7ff","html_url":"https://github.com/jgaskins/aws","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":0.3157894736842105,"last_synced_commit":"69ff77cd628971b05459449fd86dc884f600939e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jgaskins/aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Faws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Faws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Faws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Faws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgaskins","download_url":"https://codeload.github.com/jgaskins/aws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgaskins%2Faws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30444327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T20:23:30.529Z","status":"ssl_error","status_checked_at":"2026-03-12T20:23:14.027Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","s3","sns","sqs"],"created_at":"2024-10-24T09:12:08.786Z","updated_at":"2026-03-12T21:07:22.877Z","avatar_url":"https://github.com/jgaskins.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crystal AWS\n\nThis shard provides clients for various services on AWS. So far, clients implemented are:\n\n- S3\n- SQS\n- SNS\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     aws:\n       github: jgaskins/aws\n   ```\n\n2. Run `shards install`\n\n## Usage\n\nTo use each service client, you need to require that client specifically. This avoids loading the entire suite of clients just to use a single one. So for example, to use S3, you would use `require \"aws/s3\"`.\n\nAll AWS clients are instantiated with credentials and a service endpoint. The defaults can be set either programmatically or via environment variables. To set them programmatically, you can set them directly on the `AWS` namespace:\n\n```crystal\nAWS.access_key_id = \"AKIAOMGLOLWTFBBQ\"\nAWS.secret_access_key = \"this is a secret, don't tell anyone\"\nAWS.region = \"us-east-1\"\n```\n\nThere is no global default endpoint since those are specific to the service. If you wish to use a nonstandard endpoint (for example, to use DigitalOcean Spaces or a MinIO instance instead of S3), you must set it when instantiating the client.\n\nTo set the defaults via environment variables\n\n| Property | Environment Variable |\n|-|-|\n| `access_key_id` | `AWS_ACCESS_KEY_ID` |\n| `secret_access_key` | `AWS_SECRET_ACCESS_KEY` |\n| `region` | `AWS_REGION` |\n\nIndividual services and their APIs are documented below. All examples assume credentials are set globally and use default AWS endpoints for brevity.\n\nWhenever feasible, method and argument names are snake-cased versions of those of the AWS REST API for ease of translating docs to application code. For example, with SQS, the `ReceiveMessage` API takes `QueueUrl`, `MaxNumberOfMessages`, and `WaitTimeSeconds` arguments. Your application would call `sqs.receive_message(queue_url: url, max_number_of_messages: 10, wait_time_seconds: 20)`. Additional method overrides are planned to make some of these API calls easier to read.\n\n### S3\n\n```crystal\nrequire \"aws/s3\"\n\ns3 = AWS::S3::Client.new\n\ns3.list_buckets\ns3.list_objects(bucket_name: \"my-bucket\")\ns3.get_object(bucket_name: \"my-bucket\", key: \"my-object\")\ns3.head_object(bucket_name: \"my-bucket\", key: \"my-object\")\ns3.put_object(\n  bucket_name: \"my-bucket\",\n  key: \"my-object\",\n  headers: HTTP::Headers {\n    \"Content-Type\" =\u003e \"image/jpeg\",\n    \"Cache-Control\" =\u003e \"private, max-age=3600\",\n  },\n  body: body, # String | IO - if you provide an IO, it MUST be rewindable!\n)\ns3.delete_object(bucket_name: \"my-bucket\", key: \"my-object\")\n\n# Pre-signed URLs for direct uploads or serving \u003cimg/\u003e tags for user-uploaded objects\ns3.presigned_url(\"PUT\", \"my-bucket\", \"my-object\", ttl: 10.minutes)\n```\n\n### SNS\n\n```crystal\nrequire \"aws/sns\"\n\nsns = AWS::SNS::Client.new\n\ntopic = sns.create_topic(\"my-topic\")\n\n# Publishing a message - subject is optional\nsns.publish topic_arn: topic.arn, message: \"hello\"\nsns.publish topic_arn: topic.arn, message: \"hello\", subject: \"MySubject\"\n\n# This endpoint requires an SQS client and a queue instance from that client. If\n# you omit the client, it will create one for you.\nsns.subscribe topic: topic.arn, queue: queue, sqs: sqs\n```\n\n### SQS\n\n```crystal\nrequire \"aws/sqs\"\n\nsqs = AWS::SQS::Client.new\n\nqueue = sqs.create_queue(queue_name: \"my-queue\")\n\nsqs.send_message(\n  queue_url: queue.url,\n  message_body: \"hi\",\n)\nmsgs = sqs.receive_message(\n  queue_url: queue.url,\n  max_number_of_messages: 10,\n  wait_time_seconds: 20,\n)\nmsgs.each do |msg|\n  process msg\nend\n\nsqs.delete_message_batch msgs\n```\n\n## Connection pooling\n\nThis shard maintains its own connection pools, so you can assign clients directly to a constant for use throughout your application:\n\n```crystal\nrequire \"aws/s3\"\n\nS3 = AWS::S3::Client.new\n```\n\nYou can use this client anywhere in your application by calling the methods listed above directly on the constant. There is no worry about collisions due to concurrent access. The client manages that transparently.\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/jgaskins/aws/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Jamie Gaskins](https://github.com/jgaskins) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaskins%2Faws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgaskins%2Faws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgaskins%2Faws/lists"}