echo $aux->get('EndpointArn').'<br>';*/
 $sns = new AwsSns();
 echo $sns->getEndpointArn('dp836ywq5ME:APA91bGhHu-imZjWrGQZoOqt-N5vthihQquLy0dQm6ENSDlNvFlk6nWnJwjPYnymF0PGmGiKNTWdIkpVo1GqEwZVMfZ4skjmYlngMo9k8iPuQVjTr4zUg7LSKUKKFmTQQJv9P9viWGqk');
 echo '<br><br>';
 // Get and display the platform applications
 print "List All Platform Applications:\n";
 $Model1 = $sns->listPlatformApplications();
 foreach ($Model1['PlatformApplications'] as $App) {
     print $App['PlatformApplicationArn'] . "\n";
 }
 print "\n";
 // Get the Arn of the first application
 $AppArn = $Model1['PlatformApplications'][0]['PlatformApplicationArn'];
 // Get the application's endpoints
 $Model2 = $sns->listEndpointsByPlatformApplication(array('PlatformApplicationArn' => $AppArn));
 // Display all of the endpoints for the first application
 print "List All Endpoints for First App:\n";
 //$Endpoint = [];
 foreach ($Model2['Endpoints'] as $Endpoint) {
     $EndpointArn = $Endpoint['EndpointArn'];
     print $EndpointArn . "\n";
 }
 print "\n";
 // Send a message to each endpoint
 print "Send Message to all Endpoints:\n";
 foreach ($Model2['Endpoints'] as $Endpoint) {
     $EndpointArn = $Endpoint['EndpointArn'];
     try {
         $sns->publish(array('Message' => 'Hello from PHP', 'TargetArn' => $EndpointArn));
         print $EndpointArn . " - Succeeded!\n";