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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.7.tar.gz
Algorithm Hash digest
SHA256 8b3205e72cefe8f5846cd62f58f1e80467251a52b84faf506853ec8ad01df7ef
MD5 b6bd42d144bf7175d72984b5d7ec0abb
BLAKE2b-256 f1b635fddc8c85d3a8487cd97f9d4cf9816bef98b243a0e4f4d9e7ae494b6b8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8ff32745f4b6a7c9011c6ea1b0587ee24961c75924c2e0d56f6ab7fd2b662827
MD5 201a7501b4fe9cf81a8c40515773a42c
BLAKE2b-256 5acf26c76db83a455cb88c13f5b658336e24ebc9a2a63fc5f2bbcf7b201451bd

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