Skip to main content

CDK Construct for AWS IoT Core certificates and things

Project description

AWS IoT Core Thing with Certificate v3 construct

This is a CDK construct that creates an AWS IoT Core Thing with a certificate and policy using aws-sdk-js-v3.

elements

Cloudformation does not support creating a certificate for an IoT Thing, so this construct uses the AWS SDK to create a certificate and attach it to the Thing.

This construct is a modified version of this excellent construct (cdk-iot-core-certificate) to work with aws-sdk-js-v3.

View on Construct Hub Open in Visual Studio Code npm version Build Status Release Status License Downloads npm downloads

Installation

npm i cdk-iot-core-certificates-v3

Usage

import * as s3 from 'aws-cdk-lib/aws-s3';
import { ThingWithCert } from 'cdk-iot-core-certificates-v3';

declare const saveFileBucket: s3.IBucket;

const { thingArn, certId, certPem, privKey } = new ThingWithCert(this, 'MyThing', {
  // The name of the thing
  thingName: 'MyThing',
  // Whether to save the certificate and private key to the SSM Parameter Store
  saveToParamStore: true,
  // The prefix to use for the SSM Parameter Store parameters
  paramPrefix: 'test',
  // The bucket to save the certificate and private key to
  // Both files are saved at `{thingName}/{thingName}.private.key` and `{thingName}/{thingName}.cert.pem`
  // If not provided, the certificate and private key will not be saved
  saveFileBucket,
});

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk_iot_core_certificates_v3-0.0.8.tar.gz (14.4 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file cdk_iot_core_certificates_v3-0.0.8.tar.gz.

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.8.tar.gz
Algorithm Hash digest
SHA256 118a02ca66b2b8b9ec74e35227c4027e44355b2c22d5b7a9a8274b668991c639
MD5 55ed3b9c4a28a29856045a4912f2d2b0
BLAKE2b-256 1e45afcbde1ae88ac5730eab060cfab4ec334997227aefc9fc8e04d04b852c20

See more details on using hashes here.

File details

Details for the file cdk_iot_core_certificates_v3-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4794d226676e2fc0e5b9d16083e531272786ef6bb114cfa89e58e975211e0886
MD5 8350acfccab841701f5be24a7aae74fb
BLAKE2b-256 984df472c2d305529af75d9bd26d8b52cc115702db780f8e865f73a01346ebd7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page