'default', 'region' => 'us-east-1', 'version' => '2010-03-31' ]); $protocol = 'https'; $endpoint = 'https://'; $topic = 'arn:aws:sns:us-east-1:111122223333:MyTopic'; try { $result = $SnSclient->subscribe([ 'Protocol' => $protocol, 'Endpoint' => $endpoint, 'ReturnSubscriptionArn' => true, 'TopicArn' => $topic, ]); var_dump($result); } catch (AwsException $e) { // output error message if fails error_log($e->getMessage()); } // snippet-end:[sns.php.subscribe_HTTPS.main] // snippet-end:[sns.php.subscribe_HTTPS.complete] // snippet-sourcedescription:[SubscribeHTTPS.php demonstrates how to send a confirmation message to a URL.] // snippet-keyword:[PHP] // snippet-sourcesyntax:[php] // snippet-keyword:[AWS SDK for PHP v3] // snippet-keyword:[Code Sample] // snippet-keyword:[Amazon Simple Notification Service] // snippet-service:[sns] // snippet-sourcetype:[full-example] // snippet-sourcedate:[2018-09-20] // snippet-sourceauthor:[jschwarzwalder]