How to use the Iot function from aws-sdk

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

34
35
36
37
38
39
40
41
42
43
    
    // Get the AWS account ID
    accountId = event.awsAccountId.toString().trim();

// Create the Iot object
    iot = new AWS.Iot({'region': region, apiVersion: '2015-05-28'});
    certificateId = event.certificateId.toString().trim();

// Construct the ARN for the Thing certificate
    certificateARN = `arn:aws:iot:${region}:${accountId}:cert/${certificateId}`;
fork icon12
star icon18
watch icon20

2
3
4
5
6
7
8
9
10
11
var AWS = require('aws-sdk');
var memoize = require('./lib/util/memoizeWithOptions');
var promisifyAll = require('./lib/util/promisifyAll');

function iot(options) {
  return promisifyAll(new AWS.Iot(options));
}

/**
 * Returns an instance of AWS.Iot which has Promise methods
fork icon10
star icon26
watch icon8

9
10
11
12
13
14
15
16
17
18
'use strict';
const lambda = new aws.Lambda({ region: awsRegion }),
        logs = new aws.CloudWatchLogs({ region: awsRegion }),
        apiGatewayPromise = retriableWrap(new aws.APIGateway({ region: awsRegion })),
        s3 = new aws.S3(),
        iot = new aws.Iot({ region: awsRegion }),
        sns = new aws.SNS({ region: awsRegion }),
        events = new aws.CloudWatchEvents({ region: awsRegion }),
        cognitoIdentityServiceProvider = new aws.CognitoIdentityServiceProvider({ region: awsRegion }),
        destroyRule = function (ruleName) {
fork icon290
star icon0
watch icon3

3
4
5
6
7
8
9
10
11
  enrollCert: null,
  enrollKey: null,
  endpointAddress: null
}

const iot = new AWS.Iot({
  iot: '2015-05-28',
  region: process.env.AWS_DEFAULT_REGION
})
fork icon0
star icon0
watch icon7