drupal-to-sns
aws-sns-configuration
aws-sns-test-connection
aws-sns-payload

This project is not covered by Drupal’s security advisory policy.

AWS SNS Entity Publish is a module to publish any entities like (node, paragraphs, media, etc..) as JSON data to Amazon SNS Topic.

How to use. ( Drupal 9 & 10 )

  • Download module and enable.
  • Make sure aws-sdk-php is installed.
  • It is recommended to install this module using composer. So that it will download all dependencies altogether.

This module will provide a feature to check the test connection after configuring the endpoints in the backend by visiting this URL : http://xxxxxxxxxx/admin/config/aws-sns-entity-publish/test

Use module by service.

use Drupal\Core\Entity\EntityInterface;

/**
 * Implements hook_entity_update().
 */
function aws_sns_entity_publish_entity_update(EntityInterface $entity) {
  $config = \Drupal::service('config.factory')->get('aws_sns_entity_publish.awsconfig');
  $bundle_name = $entity->bundle();
  if ($bundle_name == 'YOUR_CONTENT_TYPE_NAME') {
    $asp_service = \Drupal::service('aws_sns_entity_publish.asp_services');
    // serialize the entity response.
    $payload = \Drupal::service('serializer')->serialize($entity, 'json');
    $subject = t('Updating @bundleName content.', ['@bundleName' => $bundle_name]);
    $topic = $config->get('aws_sns_default_topic_arn');
    $asp_service->entityPublishToAwsSns($subject, $payload, $topic);
  }
}
For More Information: Please refer the README.md
Supporting organizations: 

Project information

Releases