fireproofsocks

fireproofsocks

I was wondering if there were any examples floating around for how to use ElasticMQ with Elixir’s ExAws and ExAws.SQS modules. There was one related post I found here: Use Broadway with ElasticMQ in docker but the usage was constrained to Broadway. Although I may end up using Broadway, I’d like to know how to manually insert and remove messages from queues in a local (i.e. Dockerized) instance of ElasticMQ.

Generally, I’d like to execute commands like this against the local ElasticMQ instance:

"123/my_q"
|> ExAws.SQS.create_queue()
|> ExAws.request()

This generates errors, however, depending on how I have my configuration set up, e.g.

03:03:50.385 erl_level=warning application=ex_aws domain=elixir file=lib/ex_aws/request.ex function=request_and_retry/7 line=80 mfa=ExAws.Request.request_and_retry/7 module=ExAws.Request pid=<0.487.0> [warning] ExAws: HTTP ERROR: :timeout for URL: "https:/" ATTEMPT: 1

or

You tried to access the AWS EC2 instance meta, but it could not be reached.
This happens most often when trying to access it from your local computer,
which happens when environment variables are not set correctly prompting
ExAws to fallback to the Instance Meta.

This is the configuration I have tried:

config :ex_aws,
  access_key_id: "x",
  security_token: "x",
  secret_access_key: "x",
  host: "localhost",
  port: "9324",
  scheme: "http://",
  region: "elasticmq"

I have not tried supplying a configuration file to the ElasticMQ instance.

If anyone has any pointers on how to access this service I would appreciate them!

Showing Posts 1 to 1

joaodubas

joaodubas

To access the elasticmq instace, I used the following configuration:

config :ex_aws,
  access_key_id: [{:system, "AWS_ACCESS_KEY_ID"}, :instance_role],
  secret_access_key: [{:system, "AWS_SECRET_ACCESS_KEY"}, :instance_role],
  region: "elasticmq"

config :ex_aws, :sqs,
  scheme: "http://",
  host: System.get_env("AWS_DOMAIN", "localhost"),
  port: 9324,
  region: "elasticmq"
— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
widianto
I think I’ve found a small improvement I could contribute to &lt;%= web_namespace %&gt;.CoreComponents (installer/templates/phx_web/compo...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews