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.10.tar.gz (14.4 MB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.10.tar.gz
Algorithm Hash digest
SHA256 05e7d8637caff2ab0b450015de8e3e60327f915d64c4c2a9cc933572cdee1e15
MD5 f8792b407e605ba8890d58d8a0468e8d
BLAKE2b-256 2646f280888b525ab439023560cca6a35c6133f0ba5c16a6818a673da3594eaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c3411042d43161fd9835345c9b3f15ce8688589795e7afb22eceee903473ec80
MD5 a0fd2a1fda0a4ea96e507f8aabac0ce4
BLAKE2b-256 07854d6b49d674ed946546bc817b1d1f2aa0f72c91f818ea9269f5b49820675d

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