Closed kafkadev111 closed 1 year ago
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
Solution: $endpointSite = 'http://localhost:4100/';
$client = new \Aws\Sns\SnsClient([ 'profile' => 'default', 'region' => 'us-east-1', 'version' => '2010-03-31', 'endpoint' => $endpointSite, ]);
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