Air pollution continues to grow at an alarming rate, decreasing the quality of life around the world. As part of preventive measures, this paper presents the design and implementation of a secure and low-cost real-time air pollution monitoring system. In such sense, a three-layer architecture system was implemented. The first layer contains sensors connected to an Arduino platform towards the data processing node (Raspberry’s Pi), which through a wireless network sends messages, using the Message Queuing Telemetry Transport (MQTT) protocol. As a failback method, strings are stored within the data processing nodes within flat files, and sent via SSH File Transfer Protocol (SFTP) as a restore operation in case the MQTT message protocol fails. The application layer consists of a server published in the cloud infrastructure having an MQTT Broker service, which performs the gateway functions of the messages sent from the sensor layer. Information is then published within a control panel using the NODE-RED service, which allowed to draw communication flows and the use of the received information and its posterior storage in a No SQL database named “MongoDB”. Furthermore, a RESTFUL WEB service was shared in order to transmit the information for a posterior analysis. The client layer can be accessed from a Web browser, a PC or smartphone. The results demonstrate that the proposed message architecture is able to translate JSON strings sent by the Arduino-based sensor Nodes and the Raspberry Pi gateway node, information about several types of air contaminants have been effectively visualized using web services.