helloworld-go-mqtt-awsiot

command module
v0.0.0-...-f9331be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

README

helloworld-go-mqtt-awsiot

Steps

  1. install golang

  2. create thing, cert & policy in AWS IoT and download certificate and private key

  3. create config file (conf.json)

    {
        "host": "YOUR-AWS-IOT-ENDPOINT-HERE-ats.iot.eu-west-1.amazonaws.com",
        "port": 8883,
        "caCert": "AmazonRootCA1.pem",
        "clientCert": "YOUR-CERT-HERE-certificate.pem.crt",
        "privateKey": "YOUR-PRIVATE-KEY-HERE-e7c08dd12d-private.pem.key"
    }
    
  4. build

    go build
    
  5. run (you might want to create test subscription to "go-mqtt/sample" in the AWS IoT web console)

    ./helloworld-go-mqtt-awsiot -conf conf.json -client-id testclient
    

Sources partially "borrowed" from here

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL