1.0.1 • Published 4 years ago

aws-ses-connector v1.0.1

Weekly downloads
-
License
GPL-3.0
Repository
gitlab
Last release
4 years ago

AWS SES Connector

AWS SES Connector Plugin for the Reekoh IoT Platform. Integrates a Reekoh instance with AWS SES Service to send emails/notifications.

Description

This plugin sends emails/notifications based on devices data connected to the Reekoh Instance to AWS SES.

Configuration

To configure this plugin, an Amazon AWS account is needed to provide the following:

  • Access Key ID - AWS Access Key ID to use.
  • Secret Access Key - AWS Secret Access Key to use.
  • Region - AWS Region to use.
  • API Version - AWS API Version to use.
  • Default HTML Message - The HTML version of the message to be sent (to be used if the email client supports HTML).-
  • Default Text Message - The Text version of the message to be sent (to be used if the email client does not support HTML).
  • Default Sender - The default sender to be used (please note that this email should be added and verified in AWS SES console).
  • Default Receiver - The default receiver in which the email will be sent.

npm.io

These parameters are then injected to the plugin from the platform.

Send Data

In order to simulate sending data, You will need a Gateway Plugin to send the data to AWS SES Connector Plugin. In the screenshot below, it uses HTTP Gateway Plugin. Note: Look for the documentation on how to use this plugin.

npm.io

Make sure your plugins and pipeline are successfully deployed.

Using POST MAN as HTTP Client simulator, you can now simulate sending data.

npm.io

These parameters are then injected to the plugin from the platform.

Sample input data

The HTTP Gateway only accepts data in JSON format. Also, a "device" field is required to be in the request body. This device field should contain a device ID which is registered in Reekoh's Devices Management. The example below is data to be sent. If the sample has no data then the default data will be executed.

{
    "device":"Device100",
    "sender" : "adinglasan@reekoh.com",
    "receiver" : ["jhon.alcala@reekoh.com"],
    "messageText" : "This is a test email from AWS SES Connector Plugin.",
    "messageHtml" : "<h1>This is a test email from 
    AWS SES Connector Plugin.</h1> <a              href='http://reekoh.com/'>Reekoh Website</a>",
    "bcc" : [],
    "cc" : [],
    "subject" : "Test email"
}

Verify Data

The data will be ingested by the HTTP Gateway plugin, which will be forwarded to all the other plugins that are connected to it in the pipeline.

To verify if the data is ingested properly in the pipeline, you need to check the LOGS tab in every plugin in the pipeline. All the data that have passed through the plugin will be logged in the LOGS tab. If an error occurs, an error exception will be logged in the EXCEPTIONS tab.

npm.io

You can also verify if the data ingested properly by checking at the reciever Email.

npm.io