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.11.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.11-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.11.tar.gz.

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.11.tar.gz
Algorithm Hash digest
SHA256 55e1028ce6867dad9f84d9b7b590cd4532165196f619a7d04176bd8c633ea73b
MD5 c0805bd363fc8055942a59f57c451457
BLAKE2b-256 80eeda758eee7ca7d60abf46aa69a415b7a1128a67a50f4966f0e8c8258b3ffe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 248a80459eef0f09b19a388cbb578473902fef52b59ff641a1bbe6df4448fcaf
MD5 07c6fc4d1c49aaec00be1ef14609e2fc
BLAKE2b-256 026f706d6c35c23ec57ce51c17779de913945449751f829d2e2d6fc30527c80e

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