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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.9.tar.gz
Algorithm Hash digest
SHA256 bec9af08f041f73affb7579766164dfad4636d2ab4e09fffe6847392b9603b28
MD5 ac68420183f4d0a11023ade370111aaf
BLAKE2b-256 515d105c0cce51308b310c66e966cf2b72001fadfd693f640a6a7cd094e20222

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_iot_core_certificates_v3-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 cab1af75e28fff7324a06b3f4fb205ee9ee1b5659d1541ae02b969da709553de
MD5 6ef5ebfbb0b9e7ef7809d4308d805f37
BLAKE2b-256 1b83b1182197710e4a03935f0e8530e832dac3129a082bf956830cfe1e653655

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