Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@uhuru/awsiot-thing-creator
Advanced tools
- `npm install @uhuru/awsiot-thing-creator` - `yarn add @uhuru/awsiot-thing-creator`
npm install @uhuru/awsiot-thing-creator
yarn add @uhuru/awsiot-thing-creator
Supported environment variables:
ENV DESCRIPTION
AWS_ACCESS_KEY_ID AWS access key ID
AWS_SECRET_ACCESS_KEY AWS secret access key
AWS_IOT_REGION AWS IoT region
AWS_IOT_THING_NAME The name of the AWS IoT thing to be created
This library can be called by npm-start command.
$ npm start -- --aws-access-key-id=hoge --aws-secret-access-key=foo --aws-iot-region=bar --aws-iot-thing-name=buzz --thing-attribute-payload={\"attributes\":{\"string1\":\"string2\"}} --thing-type-name=Device
Note that you need to build this package before running npm start.
$ npm run build
Argument | Required | Description | Example |
---|---|---|---|
--aws-access-key-id | Yes | AWS access key ID | AKIAJWWCHDEPQJD456PQ |
--aws-secret-access-key | Yes | AWS secret access key | 6qtl9JJ90ue5CMeHSJKm1I4iRRwKOQKLCpzt9Y94 |
--aws-iot-region | Yes | AWS IoT region | us-west-2 |
--aws-iot-thing-name | Yes | The name of the AWS IoT thing to be created | enebular-agent-test |
--thing-attribute-payload | No | The attribute payload | {\"attributes\":{\"string1\":\"string2\"} |
--thing-type-name | No | The name of the thing type | Device |
For more details about above arguments, please refer to AWS document
IoT Client - AWS SDK for JavaScript v3
This library can also be used as ECMAScript Module.
import { AWSIoTThingCreator } from '@uhuru/awsiot-thing-creator';
const attributePayload = {
atrributes: {
key: "value"
}
}
const config = {
awsAccessKeyId: process.env.AWS_ACCESS_KEY_ID,
awsSecretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
awsIotRegion: process.env.AWS_IOT_REGION,
thingName: "enebular-agent-test",
thingTypeName: "Device",
thingAttributePayload: attributePayload
}
// Check required variables
if (
!config.awsAccessKeyId ||
!config.awsIotRegion ||
!config.awsSecretAccessKey ||
!config.thingName
) {
throw new Error(`
A configuration is required.
Verify that these required environment variables are set:
- AWS_ACCESS_KEY_ID
- AWS_IOT_REGION
- AWS_SECRET_ACCESS_KEY
- awsIotThingName
`)
}
const creator = new AWSIoTThingCreator(config)
const result = await creator.createThing().catch((error) => {
console.error(error.message)
throw new Error('Failed to create thing.')
})
return {
config: result.config,
rootPem: result.rootPem,
clientPem: result.clientPem,
privateKey: result.privateKey
}
FAQs
- `npm install @uhuru/awsiot-thing-creator` - `yarn add @uhuru/awsiot-thing-creator`
The npm package @uhuru/awsiot-thing-creator receives a total of 13 weekly downloads. As such, @uhuru/awsiot-thing-creator popularity was classified as not popular.
We found that @uhuru/awsiot-thing-creator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.