L2 CDK construct to provision AWS IoT Fleetwise
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
cdk-aws-iotfleetwise
L2 CDK construct to provision AWS IoT Fleetwise
Install
Typescript
npm install cdk-aws-iotfleetwise
Python
pip install cdk-aws-iotfleetwise
Sample
import {
SignalCatalog,
VehicleModel,
Vehicle,
Campaign,
CanVehicleInterface,
CanVehicleSignal,
SignalCatalogBranch,
TimeBasedCollectionScheme,
} from 'cdk-aws-iotfleetwise';
const signalCatalog = new SignalCatalog(stack, 'SignalCatalog', {
database: tsDatabaseConstruct,
table: tsHeartBeatTableConstruct,
nodes: [
new SignalCatalogBranch({
fullyQualifiedName: 'Vehicle',
}),
new SignalCatalogSensor({
fullyQualifiedName: 'Vehicle.EngineTorque',
dataType: 'DOUBLE',
}),
],
});
const model_a = new VehicleModel(stack, 'ModelA', {
signalCatalog,
name: 'modelA',
description: 'Model A vehicle',
networkInterfaces: [
new CanVehicleInterface({
interfaceId: '1',
name: 'vcan0',
}),
],
signals: [
new CanVehicleSignal({
fullyQualifiedName: 'Vehicle.EngineTorque',
interfaceId: '1',
messageId: 401,
factor: 1.0,
isBigEndian: true,
isSigned: false,
length: 8,
offset: 0.0,
startBit: 0,
}),
],
});
const vin100 = new Vehicle(stack, 'vin100', {
vehicleName: 'vin100',
vehicleModel: model_a,
createIotThing: true,
});
new Campaign(stack, 'Campaign', {
name: 'TimeBasedCampaign',
target: vin100,
collectionScheme: new TimeBasedCollectionScheme(cdk.Duration.seconds(10)),
signals: [new CampaignSignal('Vehicle.EngineTorque')],
});
Getting started
To deploy a simple end-to-end example you can use the following commands
yarn install
npx projen && npx projen compile
# Define Amazon Timestream as fleetwise storage destination
npx cdk -a lib/integ.full.js deploy -c key_name=mykey
# Define Amazon S3 as fleetwise storage destination
npx cdk -a lib/integ.full.js deploy -c key_name=mykey -c use_s3=true
Where mykey is an existing keypair name present in your account.
The deploy takes about 15 mins mostly due to compilation of the IoT FleetWise agent in the
EC2 instance that simulate the vehicle. Once deploy is finshed, data will start to show up in your Timestream table.
TODO
Warning: this construct should be considered at alpha stage and is not feature complete.
- Implement updates for all the custom resources
- Conditional campaigns
Security
See CONTRIBUTING for more information.
License
This code is licensed under the MIT-0 License. See the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cdk-aws-iotfleetwise-0.3.7.tar.gz.
File metadata
- Download URL: cdk-aws-iotfleetwise-0.3.7.tar.gz
- Upload date:
- Size: 11.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
442a31d4b89bd0a2c9e399fa27f28bca99a220b64f757bc6369f455c5bbb97f4
|
|
| MD5 |
2c9b7e1698cb4366f808374ce6898bf7
|
|
| BLAKE2b-256 |
f89af1838883598b1fa82eab38b6643339e50ed8f1651de2a179fdc5e2640a0f
|
File details
Details for the file cdk_aws_iotfleetwise-0.3.7-py3-none-any.whl.
File metadata
- Download URL: cdk_aws_iotfleetwise-0.3.7-py3-none-any.whl
- Upload date:
- Size: 11.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c0eef4c5ff2707bd283bc40762f574c1bbc90b21a7b2bab00ec151269e9d654
|
|
| MD5 |
46931f69a28eff490d2c3c4205681eaa
|
|
| BLAKE2b-256 |
7940d9a4f4bfeb0ecb2e66429b97bacd0dd9ee93428be60eb6adf5f9cddd6db1
|