'default', 'region' => 'us-east-1', 'version' => '2010-03-31' ]); $topic = 'arn:aws:sns:us-east-1:111122223333:MyTopic'; try { $result = $SnSclient->deleteTopic([ 'TopicArn' => $topic, ]); var_dump($result); } catch (AwsException $e) { // output error message if fails error_log($e->getMessage()); } // snippet-end:[sns.php.delete_topic.main] // snippet-end:[sns.php.delete_topic.complete] // snippet-sourcedescription:[DeleteTopic.php demonstrates how to delete a topic.] // 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-12-27] // snippet-sourceauthor:[jschwarzwalder]