{"id":2410,"date":"2019-02-23T11:46:59","date_gmt":"2019-02-23T11:46:59","guid":{"rendered":"https:\/\/infyblog.zluck.in\/?p=2410"},"modified":"2024-08-14T10:17:02","modified_gmt":"2024-08-14T10:17:02","slug":"integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages","status":"publish","type":"post","link":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/","title":{"rendered":"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"2410\" class=\"elementor elementor-2410\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-25f91da elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"25f91da\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-038b361\" data-id=\"038b361\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\n\t\t<div class=\"elementor-element elementor-element-6672361 elementor-widget elementor-widget-text-editor\" data-id=\"6672361\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>We used <a href=\"https:\/\/aws.amazon.com\/sns\/\">Amazon SNS<\/a> into one of our project where we need to receive instant updates to the various different microservices from other microservices. I was not able to find any good article which highlights everything about SNS integration into PHP or Laravel. This can be most confusing who is working with SNS for the first time. so I decided to write one which can help others. Following things are really important before we get started.<\/p><ul><li>What exactly SNS is?<\/li><li>Where\/When you can use it?<\/li><li>How does it work?<\/li><li>How to integrate it with PHP?<\/li><\/ul><p>I will try to explain in a little bit brief here about SNS and will focus more on integration and problem that we tried to solve.<\/p><h2>1. What exactly AWS SNS is?<\/h2><p>AWS SNS stands for Amazon Simple Notification Service. It&#8217;s a distributed pub\/sub messaging system for microservices. Where publishers can publish a message to different subscribers with various kinds of subscribers including SMS, HTTP Endpoints or Webhooks, Amazon SQS, Lambda, Mobile Push etc. We will cover HTTP only subscribers in this post.<\/p><p>Kind of pub\/sub where the publisher can publish a message and multiple interested subscribers can subscribe to that. You can read more on the AWS Website <a href=\"https:\/\/aws.amazon.com\/sns\/features\/\">Here<\/a>.<\/p><h2>2. When you need AWS SNS?<\/h2><p>When your project is distributed into various microservices and if you need to communicate from one or multiple microservices to other microservices then SNS comes to play a really good role.<\/p><h3>Our Problem:<\/h3><p>In our case, our project contains 3 different systems, where authentication + user management is handled by one central system. But each system has its local users table, where minimal users data is cached for fast data retrieval and table joins. so it doesn&#8217;t need to query the central user system for each and every query.<\/p><p>If any new user is created by Admin on a central user management system, we need to notify other systems that a new user is created and they update their local users table.<\/p><h2>3. How does it work?<\/h2><p>Amazon SNS provides topics. You need to create a Topic and then define subscribers either programmatically or manually from Amazon Console. It depends on your use case. If you want to dynamically add subscribers then go that way or if you have some fixed microservices then you can define it from the console directly. This process works as follows:<\/p><ul><li>Create a Topic in AWS Console<\/li><li>Create an HTTP subscriber<\/li><li>SNS will send a SubscriptionConfirmation message to your HTTP Webhook<\/li><li>Your microservice needs to call SubscribeURL<\/li><li>Your subscription will be confirmed<\/li><\/ul><p>This is the initial setup process. Once this is done. Everytime when any new message is published to Topic, it will call your webhook with that Message.<\/p><h2>4. How to integrate it with PHP (Or any other PHP Frameworks like Laravel)?<\/h2><p>Amazon has a very good PHP Library for their AWS products. Recently for SNS they have created another light-weight library to handle SNS Messages.<\/p><p>So we will use the following libraries in our integration.<\/p><ul><li><a href=\"https:\/\/github.com\/aws\/aws-sdk-php\">aws\/aws-sdk-php<\/a> &#8211; We will use this to publish a message<\/li><li><a href=\"https:\/\/github.com\/aws\/aws-php-sns-message-validator\">aws\/aws-php-sns-message-validator<\/a> &#8211; To Recieve\/Handle incoming message<\/li><\/ul><h3>Solution:<\/h3><p>I will try to highlight the solution that we used to fix the above-mentioned problem. Check the following diagram:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1861623 elementor-widget elementor-widget-image\" data-id=\"1861623\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"772\" height=\"484\" src=\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/amazon-sns-solution.png\" class=\"attachment-large size-large wp-image-2421\" alt=\"How to integrate it with PHP\" srcset=\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/amazon-sns-solution.png 772w, https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/amazon-sns-solution-300x188.png 300w, https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/amazon-sns-solution-768x481.png 768w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8085add elementor-widget elementor-widget-text-editor\" data-id=\"8085add\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>As you can see, we set up an SNS Topic and created two HTTP\/HTTPS subscribers for two different microservices. When an admin user creates a new user into the system, we publish a message to SNS Topic which sends an update to both different microservices.<\/p><p>Now, let&#8217;s jump into the code.<\/p><h2>Publishing a message:<\/h2><p>You need to add <a href=\"https:\/\/github.com\/aws\/aws-sdk-php\">aws\/aws-sdk-php<\/a> into your project. You can find installation steps on Github Repo. Also, you need to be familiar with AWS authentication process. These things are explained pretty well <a href=\"https:\/\/docs.aws.amazon.com\/sdk-for-php\/v3\/developer-guide\/welcome.html\">here<\/a>. Collect all the things you need in terms of credentials.<\/p><ul><li>Key<\/li><li>Secret<\/li><li>Region<\/li><li>Topic ARN<\/li><\/ul><p>\u00a0<\/p><p>Following code hooked up into our central auth system. You can do this from wherever you want to publish your message. Create a client and then publish a message. You can pass two things into the SNS Message. Subject &amp; Message body. Message body has several options. We will use a pure JSON string way for simplification.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e0ea131 elementor-widget elementor-widget-code-highlight\" data-id=\"e0ea131\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>use Aws\\Credentials\\Credentials; \nuse Aws\\Sns\\SnsClient; \n$client = new SnsClient([     \n      'version' => '2010-03-31',     \n      'region' => $amazonRegion,    \n      'credentials' => new Credentials(         \n            $awsKey,         \n            $awsSecret     \n          ) \n      ]); \n      $subject = 'You got a new SNS Message'; \n      $message = json_encode([\n      'message' => 'this is my first message via SNS Topic'\n]); \n      $client->publish([    \n      'TopicArn' => 'your-sns-topic-arn-here',     \n      'Message' => $message,    \n      'Subject' => $subject \n]); <\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a91b887 elementor-widget elementor-widget-text-editor\" data-id=\"a91b887\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Generally, in our integration, what we did was, we used <strong><em>Subject<\/em><\/strong> to specify the type of event. Like Users.create, Users.update, Users.delete and <strong><em>Message<\/em><\/strong> used to contain user information. You can customize it based on your use-case.<\/p><p>That&#8217;s it. Your message is published to a topic.<\/p><h2>Handle Incoming SNS Message:<\/h2><p>To handle SNS messages we need to integrate\u00a0<a href=\"https:\/\/github.com\/aws\/aws-php-sns-message-validator\" target=\"_blank\" rel=\"noopener\">aws\/aws-php-sns-message-validator<\/a>\u00a0into our project.<\/p><p>SNS will call our webhook for multiple kinds of events. It comes with Type param into the message body.<\/p><ul><li>SubscriptionConfirmation<\/li><li>Message<\/li><li>UnsubscriptionConfirmation<\/li><\/ul><div>\u00a0<\/div><p>Based on the <strong><em>Type<\/em><\/strong> parameter, we need to take relevant action. We have used the following code into our microservice webhook handlers.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9e03a80 elementor-widget elementor-widget-code-highlight\" data-id=\"9e03a80\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>use Aws\\Sns\\Message; \nuse Aws\\Sns\\MessageValidator; \n\ntry {     \n\/\/ Retrieve the message     \n$message = Message::fromRawPostData();   \n\n\/\/ make validator instance     \n$validator = new MessageValidator();   \n\n\/\/ Validate the message     \nif ($validator->isValid($message)) {         \n      if ($message['Type'] == 'SubscriptionConfirmation') {  \n\n\/\/ if it's subscription or unsubscribe event then call SubscribeURL             \n      file_get_contents($message['SubscribeURL']);         \n} elseif ($message['Type'] === 'Notification') {             \n      $subject = $message['Subject'];             \n      $messageData = json_decode($message['Message']);   \n\n\/\/ use $subject and $messageData and take relevant action         \n         }\n     }\n } catch (Exception $e) {     \/\/ Handle exception .\n} <\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c5ce1de elementor-widget elementor-widget-text-editor\" data-id=\"c5ce1de\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>As you can see, based on Type, we are performing different operations.<\/p><p>\u00a0<\/p><p>This way, all our microservice can communicate in a very effective and highly available way to each other. Hope this helps :).<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>How to integrate Amazon SNS in the laravel app to send and receive messages via publishing and&#8230;<\/p>\n","protected":false},"author":2,"featured_media":6000,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"postBodyCss":"","postBodyMargin":[],"postBodyPadding":[],"postBodyBackground":{"backgroundType":"classic","gradient":""},"two_page_speed":[],"footnotes":""},"categories":[9],"tags":[57,35],"class_list":["post-2410","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-amazon-sns","tag-laravel-application"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Integrate Amazon SNS into PHP Laravel to Send and Receive Messages<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages\" \/>\n<meta property=\"og:description\" content=\"How to integrate Amazon SNS in the laravel app to send and receive messages via publishing and...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog | InfyOm Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/infyom\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-23T11:46:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-14T10:17:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png\" \/>\n\t<meta property=\"og:image:width\" content=\"772\" \/>\n\t<meta property=\"og:image:height\" content=\"484\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"InfyOm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InfyOm\" \/>\n<meta name=\"twitter:site\" content=\"@InfyOm\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InfyOm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/\"},\"author\":{\"name\":\"InfyOm\",\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/person\/659bfc844c333d041221e83c5f5ec754\"},\"headline\":\"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages\",\"datePublished\":\"2019-02-23T11:46:59+00:00\",\"dateModified\":\"2024-08-14T10:17:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/\"},\"wordCount\":857,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/infyom.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png\",\"keywords\":[\"Amazon SNS\",\"Laravel Application\"],\"articleSection\":[\"Laravel\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/\",\"url\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/\",\"name\":\"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages\",\"isPartOf\":{\"@id\":\"https:\/\/infyom.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png\",\"datePublished\":\"2019-02-23T11:46:59+00:00\",\"dateModified\":\"2024-08-14T10:17:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#primaryimage\",\"url\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png\",\"contentUrl\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png\",\"width\":772,\"height\":484,\"caption\":\"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/infyom.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/infyom.com\/blog\/#website\",\"url\":\"https:\/\/infyom.com\/blog\/\",\"name\":\"Blog | InfyOm Technologies\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/infyom.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/infyom.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/infyom.com\/blog\/#organization\",\"name\":\"InfyOm Technologies\",\"url\":\"https:\/\/infyom.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/InfyOm-Logo.png\",\"contentUrl\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/InfyOm-Logo.png\",\"width\":88,\"height\":41,\"caption\":\"InfyOm Technologies\"},\"image\":{\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/infyom\",\"https:\/\/x.com\/InfyOm\",\"https:\/\/www.instagram.com\/infyomtechnologies\/\",\"https:\/\/in.linkedin.com\/company\/infyom-technologies\",\"https:\/\/github.com\/infyomlabs\",\"https:\/\/x.com\/infyom\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/person\/659bfc844c333d041221e83c5f5ec754\",\"name\":\"InfyOm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1ad162864d8d33c04ea9e6d0333cc483?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1ad162864d8d33c04ea9e6d0333cc483?s=96&d=mm&r=g\",\"caption\":\"InfyOm\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/","og_locale":"en_US","og_type":"article","og_title":"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages","og_description":"How to integrate Amazon SNS in the laravel app to send and receive messages via publishing and...","og_url":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/","og_site_name":"Blog | InfyOm Technologies","article_publisher":"https:\/\/www.facebook.com\/infyom","article_published_time":"2019-02-23T11:46:59+00:00","article_modified_time":"2024-08-14T10:17:02+00:00","og_image":[{"width":772,"height":484,"url":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png","type":"image\/png"}],"author":"InfyOm","twitter_card":"summary_large_image","twitter_creator":"@InfyOm","twitter_site":"@InfyOm","twitter_misc":{"Written by":"InfyOm","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#article","isPartOf":{"@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/"},"author":{"name":"InfyOm","@id":"https:\/\/infyom.com\/blog\/#\/schema\/person\/659bfc844c333d041221e83c5f5ec754"},"headline":"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages","datePublished":"2019-02-23T11:46:59+00:00","dateModified":"2024-08-14T10:17:02+00:00","mainEntityOfPage":{"@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/"},"wordCount":857,"commentCount":0,"publisher":{"@id":"https:\/\/infyom.com\/blog\/#organization"},"image":{"@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#primaryimage"},"thumbnailUrl":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png","keywords":["Amazon SNS","Laravel Application"],"articleSection":["Laravel"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/","url":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/","name":"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages","isPartOf":{"@id":"https:\/\/infyom.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#primaryimage"},"image":{"@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#primaryimage"},"thumbnailUrl":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png","datePublished":"2019-02-23T11:46:59+00:00","dateModified":"2024-08-14T10:17:02+00:00","breadcrumb":{"@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#primaryimage","url":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png","contentUrl":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2019\/02\/amazon-sns-solution.png","width":772,"height":484,"caption":"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages"},{"@type":"BreadcrumbList","@id":"https:\/\/infyom.com\/blog\/integrate-amazon-sns-into-php-laravel-to-send-and-receive-messages\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/infyom.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Integrate Amazon SNS into PHP Laravel to Send and Receive Messages"}]},{"@type":"WebSite","@id":"https:\/\/infyom.com\/blog\/#website","url":"https:\/\/infyom.com\/blog\/","name":"Blog | InfyOm Technologies","description":"","publisher":{"@id":"https:\/\/infyom.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/infyom.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/infyom.com\/blog\/#organization","name":"InfyOm Technologies","url":"https:\/\/infyom.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/infyom.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/InfyOm-Logo.png","contentUrl":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/InfyOm-Logo.png","width":88,"height":41,"caption":"InfyOm Technologies"},"image":{"@id":"https:\/\/infyom.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/infyom","https:\/\/x.com\/InfyOm","https:\/\/www.instagram.com\/infyomtechnologies\/","https:\/\/in.linkedin.com\/company\/infyom-technologies","https:\/\/github.com\/infyomlabs","https:\/\/x.com\/infyom"]},{"@type":"Person","@id":"https:\/\/infyom.com\/blog\/#\/schema\/person\/659bfc844c333d041221e83c5f5ec754","name":"InfyOm","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/infyom.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1ad162864d8d33c04ea9e6d0333cc483?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ad162864d8d33c04ea9e6d0333cc483?s=96&d=mm&r=g","caption":"InfyOm"}}]}},"_links":{"self":[{"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/posts\/2410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/comments?post=2410"}],"version-history":[{"count":13,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/posts\/2410\/revisions"}],"predecessor-version":[{"id":6004,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/posts\/2410\/revisions\/6004"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/media\/6000"}],"wp:attachment":[{"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/media?parent=2410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/categories?post=2410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/tags?post=2410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}