# aws-iot-greengrass-discovery

> aws iot greengrass discovery module

Latest version **1.0.1** (published 2018-07-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install aws-iot-greengrass-discovery
pnpm add aws-iot-greengrass-discovery
yarn add aws-iot-greengrass-discovery
bun add aws-iot-greengrass-discovery
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-07-10 |
| First published | 2018-07-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniele Brugnara |
| Maintainers | brugnara |

## Links

- npm: https://www.npmjs.com/package/aws-iot-greengrass-discovery
- Repository: https://github.com/brugnara/aws-iot-greengrass-discovery
- Homepage: https://github.com/brugnara/aws-iot-greengrass-discovery#readme
- Issues: https://github.com/brugnara/aws-iot-greengrass-discovery/issues
- npm.io page: https://npm.io/package/aws-iot-greengrass-discovery

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) 3.1.0
- [superagent](https://npm.io/package/superagent.md) 3.8.3

## Recent versions

- 1.0.1 (latest) — 2018-07-10
- 1.0.0 — 2018-07-09

## README

# aws-iot-greengrass-discovery
> 09/07/18

```bash
aws iot describe-endpoint
{
    "endpointAddress": "a1b2c3d4e5f6g7.iot.us-west-2.amazonaws.com"
}
DEBUG=* node example.js thingName $endpointAddress
```

Include this module and use as stated into the `example.js` file.

```js
const discovery = require('aws-iot-greengrass-discovery');
const options1 = {
  thingName: 'device1',
  awsIotEndPoint: '123456.iot.eu-central-1.amazonaws.com',
  ca: fs.readFileSync('./root-CA.pem', 'utf8'),
  cert: fs.readFileSync(`./device1.crt`, 'utf8'),
  key: fs.readFileSync(`./device1.key`, 'utf8'),
};
const options2 = {
  thingName: 'device2',
  awsIotEndPoint: '123456.iot.eu-central-1.amazonaws.com',
  ca: fs.readFileSync('./root-CA.pem', 'utf8'),
  cert: fs.readFileSync(`./device2.crt`, 'utf8'),
  key: fs.readFileSync(`./device2.key`, 'utf8'),
};

// get info
const deviceInfo = await discovery(options1);
const deviceInfo2 = await discovery(options2);

// using callback
discovery(options1, console.log.bind(console));
```

## AWS Official doc

https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-discover-api.html#gg-discover-auth

---
_Source: https://npm.io/package/aws-iot-greengrass-discovery · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
