Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to send request directly to Amazon SQS from http (javascript client)?

Is it possible to send a messaging request to Amazon's SQS directly from javascript? I'm trying to create a logging system and would love to bypass sending the request to a middleman server. Also, does anybody know of any alternatives to this solution that I may leverage?

like image 282
VinnyD Avatar asked Dec 06 '11 00:12

VinnyD


2 Answers

SQS(and as a matter of fact all aws services) expose REST based apis. You can directly make a http request to the SQS REST api through javascript code. The api documentation id given here.

like image 188
randomuser Avatar answered Oct 22 '22 10:10

randomuser


Unless you load your Javascript from the same SQS domain as you're trying to send to then no, due the clients/Javascript Same-Origin Policy you wont be able to cross post to SQS.

Your best bet is to use a middle-man server of your own.

like image 3
Cody Caughlan Avatar answered Oct 22 '22 12:10

Cody Caughlan