Is AWS IoT Device Gateway an MQTT broker? - amazon-web-services

I am trying to understand Amazon AWS IoT and I see there is a Device Gateway connected between Sensors/Actuators and AWS (Rules Engine). I understand Sensors/Actuators are MQTT Clients which can Publish/Subscribe to the topics.
Device Gateway also supports Publish/Subscribe pattern is that means
Device Gateway is also a MQTT Client ?
Then where is the MQTT broker?
OR Device Gateway is Broker + communication interface to AWS-IoTservices?
I have attached an Image Amazon presentation on AWS IoT for the reference:

The gateway is a MQTT broker, but not a fully compliant one. Some of the differences are:
no retained message support
no QOS2 support
no message persistence
Full details can be found here http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html

Related

MQTT to Google Cloud PubSub republishing solution design approach / pattern

Context
I am designing a solution where I need to ingest sensor data from different types of constrained devices into Google Cloud PubSub.
Pre-Conditions
These constrained devices only MQTT and only support MQTT over TCP. They do not support MQTT over TLS and can not do any sort of certificate based connection.
I do have the flexibility of picking the MQTT broker, however.
Given the context, pre-conditions, kindly suggest an approach where I can republish messages from MQTT to Google PubSub.
Thanks in advance!
Pretty much all MQTT brokers support bridging to other brokers.
So the devices would connect to your broker using raw MQTT, it would then create a single TLS authenticated connection to the Google IoT Broker using MQTT over TLS and forward all messages over that connection.
This means there is no need for a separate client to connect to both brokers and forward the messages.

AWS IoT: Possible to connect mobile devices

Is it possible to programmatically connect a mobile device to IoT in AWS?
Would the end-user need to do any configuration on their side for this to work?
It depends on the type of device that you have in hand. The device must have a device certificate, private key, and root CA certificate installed for communicating with AWS IoT Core.
There is a SDK that can help you programatically. The AWS IoT Device SDKs help you to connect your devices to AWS IoT. Here is a list of SDKs based on the platform that you are using.
Here is a good link for reference establishing connection with AWS IoT core service

Choosing AWS service for MQTT broker

I need to build IOT MQTT broker that should work on secure MQTT protocol. I also need to manage users that connects to this service and manage subscription access control. Idon't need MQTT via web socket.
At first glance I was planning to use EC2 service in order to create Ubuntu virtual machine and install Mosquitto service in it. But later I found Internet of Things section that contains set of services.
Is it possible to construct MQTT service according my requirements by using Internet of Things. By choosing Internet of Things I hope to get more specialized functionality.
You can use AWS IoT for this instead, they have a managed MQTT endpoint that you can add 'things' to it.
https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html
You'll be able to easily connect the endpoint to other services as this is part of their cloud solutions.
https://docs.aws.amazon.com/iot/latest/developerguide/iot-gs.html

how to connect device to AWS greengrass

I am using MOKOSMART_mkgw1 to collect data and send it to AWS IoT Core.
for that, I need to set the following configurations,
endpoint (aws iot endpoint)
topic (any)
device certificate and private key
root ca.
I was able to connect and send data to aws iot core.
now I want to connect it to aws greengrass device instead of iot core directly.
i have greengrass running, on ip 192.196.1.12 on port 8883 (windows machine).
i download Group CA using basic discovery api. so i used this mqtt settings for device:
broker endpoint (192.168.1.12:8883)
topic (same as registered in subscription in aws iot GG)
device certificate and private key (the device is registered in aws iot GG)
Group CA (downloaded by basic discovery sample application)
but i am still not able to connect to aws gg?
my understanding is aws GG also has a MQTT broker. so by providing a proper authentication and topic, i should be able to connect to it, whether or not I have aws device SDKs or not. am i wrong? what does "basic discovery example" do extra to be able to connect to aws gg ??
I am so sorry for wasting your time if you brainstorm on this question.
the issue was, I was passing a random clientID in MQTT.
instead, I passed "Device Name" as the client ID and it worked.
keep this question here if someone else falls in the same hole.

Is it possible to control my IoT device from outside my private network using Google IoT Cloud services?

Is it possible to control my IoT device from outside of my private network through Google IoT Cloud services. Especially when my IoT devices are offline.
Yes, you would set up a IoT Core Gateway device in addition to registering regular devices.
Assuming you can program your gateway, it would communicate with Cloud IoT Core via MQTT/HTTP. Then, you can use any protocol you want (zigbee, zwave, bluetooth, etc). The gateway device should be able to store private keys/sign JWTs which are used to authenticate itself to IoT Core, so that the devices themselves don't need to.
For more information, I would read the following: https://cloud.google.com/iot/docs/how-tos/gateways/