aws-sqs

aws-sqs is the unofficial AWS SQS library for the Crystal.

Installation

  1. Add the dependency to your shard.yml:
dependencies:
  aws-sqs:
    github: maiha/aws-sqs.cr
  1. Run shards install

Usage

require "aws-sqs"

client = Aws::SQS::Client.new("us-east-2", "key", "secret")
client.send_message(queue_url: queue_url, message_body: "message")

# FIFO
client.send_message(queue_url: queue_url, message_body: "message", message_group_id: "g1", message_deduplication_id: "d1")

Samples

$ export AWS_DEFAULT_REGION=us-east-2
$ export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
$ export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

$ crystal samples/send_message.cr "https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue" "hello"

API

Development

$ crystal spec

Contributing

  1. Fork it (https://github.com/maiha/aws-sqs.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Thanks