AWS SNS Entity Publish
No security coverage
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
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
Release Timeline
Releases
| Version | Type | Core | Release date | |
|---|---|---|---|---|
| 1.0.0-alpha5 | Pre-release | Nov 3, 2023 | ||
| 1.0.0-alpha4 | Pre-release | Oct 3, 2023 | ||
| 1.0.0-alpha3 | Pre-release | Aug 23, 2023 | ||
| 1.0.0-alpha2 | Pre-release | Aug 22, 2023 | ||
| 1.0.x-dev | Dev | Aug 22, 2023 | ||
| 1.0.0-alpha1 | Pre-release | Aug 22, 2023 |