title: how to connect device to AWS greengrass
body: <p>I am using <a href="https://www.mokosmart.com/mokosmart-mkgw1-gateway-iot-cloud-platform/" rel="nofollow noreferrer">MOKOSMART_mkgw1</a> to collect data and send it to AWS IoT Core.
  for that, I need to set the following configurations,</p>
  
  <ol>
  <li>endpoint (aws iot endpoint)</li>
  <li>topic (any)</li>
  <li>device certificate and private key</li>
  <li>root ca.  </li>
  </ol>
  
  <p>I was able to connect and send data to aws iot core.</p>
  
  <h2>now I want to connect it to aws greengrass device instead of iot core directly.</h2>
  
  <p>i have greengrass running, on ip 192.196.1.12 on port 8883 (windows machine).
  i download Group CA using <a href="https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-discover-api.html" rel="nofollow noreferrer">basic discovery api</a>. so i used this mqtt settings for device:</p>
  
  <ol>
  <li>broker endpoint (192.168.1.12:8883)</li>
  <li>topic (same as registered in subscription in aws iot GG) </li>
  <li>device certificate and private key (the device is registered in aws iot GG)</li>
  <li>Group CA (downloaded by basic discovery sample application)</li>
  </ol>
  
  <p>but i am still not able to connect to aws gg?</p>
  
  <p>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 "<a href="https://github.com/aws/aws-iot-device-sdk-python" rel="nofollow noreferrer">basic discovery example</a>" do extra to be able to connect to aws gg ??</p>
  
  <hr>