-
Notifications
You must be signed in to change notification settings - Fork 9
Description
In the http.R file and its sesPost() function, there need to be two different region variables, one for the AWS region of the user's instance, which is incorporated into the credentials, and one for the region of the user's Amazon SES server, which is incorporated into the URL that the request gets sent to, If both are in us-east-1 the code as currently written works fine. In my case, my instance is in us-east-2 and my SES server is in us-east-1, so the code fails.
When region is set to us-east-1, my error is: In sesPOST(body = query, ...) : Forbidden (HTTP 403). which I'm guessing means a bad signature.
When region is set to us-east-2, my error is Could not resolve host: email.us-east-2.amazonaws.com
Amazon only has SES servers in three regions: us-east-1, us-west-2, and eu-west-1, while it has at least 15 user regions, so the code is likely to fail for many. You can select which of the three regions you want to use in the SES Console (look in the upper-right corner).
I have never successfully formed an AWS signature on my own, so I really appreciate this package. But, for example, in creating the Sig at line 44 (of http.R), I think the region variable at line 46 needs to be the region of the user's instance, and the region variable in line 51 needs to be the region of the user's SES server.
Tom