Sending SNS to EndpointArn with a GET call to Amazon SNS API
Is it possible to call Amazon SNS API to send a PNS via URL? Currently I
am sending PNS via AWS PHP SDK 2. However, I would like to do exact thing
via structured GET request to Amazon SNS API.
Current Code:
require '/var/www/html/third-party/vendor/autoload.php';
use Aws\Sns\SnsClient;
$snsClient = SnsClient::factory(array(
'key' => 'ACCESS_KEY',
'secret' => 'SECRET_KEY',
'region' => 'us-west-2'
));
$snsSent = $snsClient->publish(array(
'TargetArn' => 'EndpointArn',
'Message' => "Hello World "
));
What I am looking for something like,
http://sns.us-east-1.amazonaws.com/
?Subject=My%20first%20message
&TopicArn=arn%3Aaws%3Asns%3Aus-east-1%3A698519295917%3AMy-Topic
&Message=Hello%20world%21
&Action=Publish
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2010-03-31T12%3A00%3A00.000Z
&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE
&Signature=9GZysQ4Jpnz%2BHklqM7VFTvEcjR2LIUtn6jW47054xxE%3D
I found this above request in Amazon SNS Documentation. However, this
doesn't mention any parameters such as secret key. Also this has Signature
param which is unknown to me.
Any help would be great.
No comments:
Post a Comment