Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
aws-iot-device-sdk-v2
Advanced tools
Next generation AWS IoT Client SDK for Javascript.
This project is in GENERAL AVAILABILITY. If you have any issues or feature requests, please file an issue or pull request.
This SDK is built on the AWS Common Runtime, a collection of libraries (1, 2, 3, 4, 5 ...) written in C to be cross-platform, high-performance, secure, and reliable. The libraries are bound to JS by the awscrt package.
The aws-crt package can be installed via npm
npm install aws-crt
Integration with AWS IoT Services such as Device Shadow and Jobs is provided by code that been generated from a model of the service.
npm install aws-iot-device-sdk-v2
npm install
This sample uses the Message Broker for AWS IoT to send and receive messages through an MQTT connection. On startup, the device connects to the server, subscribes to a topic, and begins publishing messages to that topic. The device should receive those same messages back from the message broker, since it is subscribed to that same topic. Status updates are continually printed to the console.
Source: samples/node/pub_sub
Run the sample like this:
npm install
node dist/index.js --endpoint <endpoint> --root-ca <file> --cert <file> --key <file>
Your Thing's Policy must provide privileges for this sample to connect, subscribe, publish, and receive.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iot:Publish", "iot:Receive" ], "Resource": [ "arn:aws:iot:region:account:topic/samples/test" ] }, { "Effect": "Allow", "Action": [ "iot:Subscribe" ], "Resource": [ "arn:aws:iot:region:account:topicfilter/samples/test" ] }, { "Effect": "Allow", "Action": [ "iot:Connect" ], "Resource": [ "arn:aws:iot:region:account:client/samples-client-id" ] } ] }
This sample intended for use directly with the Getting Started with AWS IoT Greengrass guide.
This sample uses the AWS IoT Fleet provisioning to provision devices using either a CSR or KeysAndcertificate and subsequently calls RegisterThing.
On startup, the script subscribes to topics based on the request type of either CSR or Keys topics, publishes the request to corresponding topic and calls RegisterThing.
Source: samples/node/fleet_provisioning
Run the sample using CreateKeysAndCertificate:
cd ~/samples/node/fleet_provisioning
npm install
node ./index.js --endpoint <endpoint> --ca_file <file> --cert <file> --key <file> --template_name <template name> --template_parameters <template parameters>
Run the sample using CreateCertificateFromCsr:
cd ~/samples/node/fleet_provisioning
npm install
node ./index.js --endpoint <endpoint> --ca_file <file> --cert <file> --key <file> --template_name <template name> --template_parameters <template parameters> --csr_file <csr file>
Your Thing's Policy must provide privileges for this sample to connect, subscribe, publish, and receive.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iot:Publish" ], "Resource": [ "arn:aws:iot:region:account:topic/$aws/certificates/create/json", "arn:aws:iot:region:account:topic/$aws/certificates/create-from-csr/json", "arn:aws:iot:region:account:topic/$aws/provisioning-templates/templatename/provision/json" ] }, { "Effect": "Allow", "Action": [ "iot:Receive", "iot:Subscribe" ], "Resource": [ "arn:aws:iot:region:account:topic/$aws/certificates/create/json/accepted", "arn:aws:iot:region:account:topic/$aws/certificates/create/json/rejected", "arn:aws:iot:region:account:topic/$aws/certificates/create-from-csr/json/accepted", "arn:aws:iot:region:account:topic/$aws/certificates/create-from-csr/json/rejected", "arn:aws:iot:region:account:topic/$aws/provisioning-templates/templatename/provision/json/accepted", "arn:aws:iot:region:account:topic/$aws/provisioning-templates/templatename/provision/json/rejected" ] }, { "Effect": "Allow", "Action": "iot:Connect", "Resource": "arn:aws:iot:region:account:client/samples-client-id" } ] }
This library is licensed under the Apache 2.0 License.
FAQs
NodeJS API for the AWS IoT service
The npm package aws-iot-device-sdk-v2 receives a total of 32,309 weekly downloads. As such, aws-iot-device-sdk-v2 popularity was classified as popular.
We found that aws-iot-device-sdk-v2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.