Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Mailchimp 3.1.5 Minor update available for module mailchimp (3.1.5). Release: Commerce Shipping 3.0.5 Minor update available for module commerce_shipping (3.0.5). Release: GoogleTag Manager 2.0.1 Minor update available for module gtm (2.0.1). Usage Milestone: Easy Breadcrumb Module easy_breadcrumb crossed 100,000 active installs. Release: FlowDrop 1.6.1 Minor update available for module flowdrop (1.6.1). Release: MCP Sentinel 2.17.0 Minor update available for module mcp_sentinel (2.17.0). Release: Commerce ML Exchange 2.0.1 Minor update available for module cmlexchange (2.0.1). Release: Commerce ML Exchange 2.0.0 Major update available for module cmlexchange (2.0.0). Release: SynImport 2.0.0 Major update available for module synimport (2.0.0). Module Revived: Contextual Filter from Referer 1.0.2 Module contextual_filter_referer updated after 22 months of inactivity (1.0.2).

Amazon Simple Notification Service

132 sites Security covered Drupal 9–11
View on drupal.org

This module enables your Drupal site to receive notifications from Amazon SNS, allowing it to react to events like the completion of a background job. These notifications trigger Symfony events that custom modules or code can subscribe to for processing.

This module allows a Drupal site to respond to Amazon SNS notifications. For example, perhaps some upstream system is processing a long job and the Drupal site needs to update entity data when it's done. Instead of being forced to poll with queues and use a background Drush command, SNS can instead push a notification to Drupal. Each SNS message triggers a
Symfony Event that other modules or custom code can respond to. SNS itself handles redelivery and failure logging.

As this module requires the AWS SDK, sites using this module will need to use Composer to grab it and all other dependencies.

This module implements it's own API as an example for other modules. To learn how to create your own event subscribers, see amazon_sns.services.yml and \Drupal\amazon_sns\Event\SnsSubscriptionConfirmationSubscriber.

Setting up a subscription

This module expects all SNS notifications to be sent to /_amazon-sns/notify. To test basic functionality, you can create an SNS topic and send a test message using the Amazon Web Services console.

  1. Log in to AWS and open the SNS dashboard.
  2. Under Common Actions, create a topic.
  3. In the topic, click Create subscription.
    • Select HTTP or HTTPS as the protocol.
    • Enter https://example.com/_amazon-sns/notify as the endpoint. The URL
      must be accessible to Amazon for SNS to work. Consider setting up a proxy
      like ngrok or requestb.in for local environments or additional logging.
    • After saving, there should be a subscription confirmation logged in Drupal's logs.
  4. Use Publish to Topic to send a test message. The message will be logged. You're ready to write any custom code needed to react to the notification.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jan 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
8.x-1.3 Stable 9–11 Jan 9, 2025