Kallebhalf

Kallebhalf

Problem with auth in AWS

Hi! I am using Bamboo to send some emails with the SES Adapter (the email service from AWS).
To make authentication for the service the lib ex_aws is used, I use the default configuration for that, the environment variables for access_id and secret. But when I try to send an email I receive:

{:error,
 %Bamboo.ApiError{
   message: "{:http_error, 403, %{body: \"<ErrorResponse xmlns=\\\"http://ses.amazonaws.com/doc/2010-12-01/\\\">\\n  <Error>\\n    <Type>Sender</Type>\\n    <Code>SignatureDoesNotMatch</Code>\\n    <Message>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.\\n\\nThe Canonical String for this request should have been\\n'POST\\n/\\n\\ncontent-encoding:identity\\ncontent-type:application/x-www-form-urlencoded\\nhost:email.us-east-1.amazonaws.com\\nx-amz-date:20210414T180110Z\\n\\ncontent-encoding;content-type;host;x-amz-date\\n54d5034558ac42946873e79cc6419df4b7a69a32f7d5ea0882407624ce5e8eae'\\n\\nThe String-to-Sign should have been\\n'AWS4-HMAC-SHA256\\n20210414T180110Z\\n20210414/us-east-1/ses/aws4_request\\nbc72f280b3b6ac7682921ce7b6f8582ed3382be4d3dd93bf6ca0da7186378c61'\\n</Message>\\n  </Error>\\n  <RequestId>fdfa8be6-39f9-4482-b0d5-442b6471de0c</RequestId>\\n</ErrorResponse>\\n\", headers: [{\"Date\", \"Wed, 14 Apr 2021 18:01:11 GMT\"}, {\"Content-Type\", \"text/xml\"}, {\"Content-Length\", \"919\"}, {\"Connection\", \"keep-alive\"}, {\"x-amzn-RequestId\", \"fdfa8be6-39f9-4482-b0d5-442b6471de0c\"}], status_code: 403}}"
 }}

Note: When I use temp credentials from AWS the email is sent, but its temporary credentials, won’t long for production use.

Somebody who uses AWS’s services in Elixir had faced this?
Thanks in advance.

Where Next?

Popular in Questions Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
hpopp
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement