How to set endpoint for local development using AWS Sns? - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Monday, September 4, 2023

How to set endpoint for local development using AWS Sns?

I use a library aws-sdk/client-s3 and mock for AWS sqs and sns: github Admiral-Piett/goaws

`require 'vendor/autoload.php';

use Aws\Exception\AwsException;

$endpointSite = 'http://localhost:4100/';

$client = new \Aws\Sns\SnsClient(['profile' => 'default','region' => 'us-east-1','version' => '2010-03-31']);

$topicName = 'refer'; $result = $client->createTopic(['Name' => $topicName,]);`

For SQS i use such code with Queue url and it works for me: $queueUrl = 'http://localhost:4100/100010001000/refer'; 'QueueUrl' $queueUrl,

How to set endpoint using SNS? Could you write some example

I am expecting send a request to local AWS mock URL: http://localhost:4100



source https://stackoverflow.com/questions/77033834/how-to-set-endpoint-for-local-development-using-aws-sns

No comments:

Post a Comment