npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aws_iot_js_simple

v1.0.4

Published

This is an attempt to easily perform basic tasks for aws iot core - things. It uses aws-iot-device-sdk-v2 . For more details check [aws-sdk](https://github.com/aws/aws-iot-device-sdk-js-v2) ## Installation

Readme

aws_iot_js_simple

This is an attempt to easily perform basic tasks for aws iot core - things. It uses aws-iot-device-sdk-v2 . For more details check aws-sdk

Installation

Use npm to install aws_iot_js_simple.

npm install aws_iot_js_simple

Prerequesties

Make sure your policy allows node js sdk and topics used by you.eg(topic is sensor here):

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "iot:Publish",
        "iot:Receive"
      ],
      "Resource": [
        "arn:aws:iot:ap-south-1:77********36:client/sdk-nodejs-*",
        "arn:aws:iot:ap-south-1:77********36:topic/sensor"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "iot:Subscribe"
      ],
      "Resource": [
        "arn:aws:iot:ap-south-1:77********36:client/sdk-nodejs-*",
        "arn:aws:iot:ap-south-1:77********36:topicfilter/sensor"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "iot:Connect"
      ],
      "Resource": [
        "arn:aws:iot:ap-south-1:77********36:client/sdk-nodejs-*"
      ]
    }
  ]
}

Assuming your thing name is thing1.
You will get files like root-CA.Crt , thing1.cert.pem, thing1.private.pem, thing1.public.key and start.sh .
Create a folder called files and put all above files(except start.sh) there.
Create a config.json (in the same folder as your code) mentioning below fields(easily find endpoint and client_id in start.sh) and file paths.eg:

{
    "endpoint":"a*************-ats.iot.ap-*****-1.amazonaws.com",
    "root_ca_cert":"files/root-CA.crt",
    "pem_cert": "files/thing1.cert.pem",
    "private_key":"files/thing1.private.key",
    "client_id":"sdk-nodejs-b*******-4***-4***-a***-1**********b"
}

Usage

import {create_connection,on_publish,publish} from 'aws_iot_js_simple'

async function connect(){
    const connection = await create_connection()
    await connection.connect();
    console.log("connected")
    await connection.subscribe('sensor', 1, on_publish);
    publish('sensor',connection,{'Temperature':23.5})
}
connect()

Warning

It will not work using require , you have to use ES6 module.

License

MIT