How to use the IotData function from aws-sdk

Find comprehensive JavaScript aws-sdk.IotData code examples handpicked from public code repositorys.

12
13
14
15
16
17
18
19
20
21
if(err) {
  console.log(err, err.stack);
  context.fail(event); 
}
else {
  iotdata = new AWS.IotData();
  params = {
    topic: 'ecutools/j2534/PassThruScanForDevices/response',
    payload: data.toString(),
    qos: 0
fork icon65
star icon181
watch icon31

32
33
34
35
36
37
38
39
40
41
  port: redisPort,
};

const redisClient = redis.createClient(redisOptions);

const iotdata = new AWS.IotData({ endpoint });

async function getQuestionNumberFromCache(topicKey) {
  const promise = new Promise((resolve, reject) => {
    try {
fork icon24
star icon0
watch icon1

60
61
62
63
64
65
66
67
68
69
const AWS = require('aws-sdk');

const iotEndpoint = process.env.IOT_ENDPOINT;
const iotTopic = process.env.IOT_TOPIC;

const iotdata = new AWS.IotData({
  endpoint: iotEndpoint
});

const colorMap = {
fork icon1
star icon1
watch icon1

27
28
29
30
31
32
33
34
35
36
  console.log('set IoT endpoint to: ' + endpoint.endpointAddress)
  gv.endpointAddress = endpoint.endpointAddress
}
endpointAddress = gv.endpointAddress

iotData = new AWS.IotData({
  iotdata: '2015-05-28',
  endpoint: endpointAddress,
  region: process.env.AWS_DEFAULT_REGION
})
fork icon0
star icon0
watch icon7