## 3 Message Transmission and Notification
### Aws  
As indicated in Section 2 of this article, we utilized the AWS cloud computing platform to handle message notifications and generate responses for transmission to a secondary device. AWS served as our primary storage solution for these notifications, which were sent to specified email addresses. An example of how notifications were received across multiple email addresses is illustrated in Figure 8. The figure shows that each notification included details such as the device type, as well as the date and time when the message was sent. Additionally, the notifications, whether sent via email or potentially other channels, followed a specific format that we could adjust as needed. We manually developed the AWS interface using several key AWS services that are accessible and free for the public. Specifically, we employed Lambda to execute a code, DynamoDB to manage our database, and an API Gateway to maintain, monitor, and secure REST API endpoints. The Amazon Simple Email Service (SES) is used to store the list of email addresses to which the message about new data will be sent. AWS Lambda is a serverless computing service that allows us to run a code in response to events without managing the underlying infrastructure. DynamoDB is a fully managed NoSQL database service that offers fast and predictable performance with automatic scaling. An API Gateway is a fully managed service that facilitates the creation, publication, maintenance, monitoring, and security of APIs at any scale. REST, or Representational State  
Figure 8: Example of new message receiving in the form of email notification. This includes device type, date, and time of the message being sent. Transfer, is an architectural style for designing networked applications where resources are accessed and manipulated using standard HTTP methods. In our implementation, we focused on developing Lambda functions to integrate seamlessly with other AWS services. The primary function, _processNewMsgFromSwarm_, was written in Python Version 3.8 --one of the many programming languages supported by AWS Lambda (which was an individual choice (there are many choices of programming languages to choose from to write Lambda functions, such as Java (Version 17), Go (Version 2), PowerShell (Version 4), Node.js (Version 16), C# (Version 10), Python (Version 3.8), and Ruby (Version 3.1) code [37])). This function interacted with DynamoDB to process incoming messages and generated email outputs based on the status of each message. The code is written in Python and is implemented within a Lambda function. In our implementation, we began by importing the necessary libraries and modules, such as _json 6.2_ and _boto3 (Python 3.8 Kit)_, to facilitate interactions with AWS services and handle data. We referenced DynamoDB as our primary resource for managing message data and creating tables to store messages and their counts. The code is structured into two main parts, each with its own set of subparts. The first part of the code focuses on setting up email functionality. This includes specifying the email destinations, defining the types of messages to be sent, and configuring the format of the email notifications. We implemented the _send-email_ (_Amazon Simple Email Service (SES) V2_) function to construct and send emails, ensuring that the notification includes relevant details such as the device ID and message content. The Python code is designed to operate as an AWS Lambda function that processes incoming messages and integrates with various services. It starts by handling email notifications using the Amazon Simple Email Service (SES) V2. The _send-email_ function formats the message details and sends an email to the specified recipients. This function constructs an informative email body and uses SES to deliver the message, providing an interface for sending notifications about new messages. The second part encompasses the core of functionality--the Lambda function, _lambda-handler_, which performs several critical tasks.