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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdk_iot_core_certificates_v3-0.0.12-py3-none-any.whl (14.5 MB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.12.tar.gz
Algorithm Hash digest
SHA256 a2370fde2d0d0bf6c63ab19e837fc80a40bc2acdfcbcb6f40724c453f7415f9d
MD5 1603a49a493916554f4ae222d9095e8d
BLAKE2b-256 bba6affd2c79b79e6f28ebde0a00e7e9cb4c5f109af2837bb115a4fa813bf5dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 45a5d29fde0ba8e3c10b4153d3eb6d98bb36eba70fa3a8380484c7a7455bf829
MD5 2411c26daa029457a383f3297aa2c117
BLAKE2b-256 92ab77d8e3dd5d62e5e5c9e259912a8d74635f8ee16bc38ba89ac4cbfb14924a

See more details on using hashes here.

Supported by

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