Skip to content
This repository was archived by the owner on Feb 4, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 0 additions & 117 deletions doc/api-python.md
Original file line number Diff line number Diff line change
@@ -1,120 +1,3 @@
[![NPM version](https://badge.fury.io/js/cdk-aws-iotfleetwise.svg)](https://badge.fury.io/js/cdk-aws-iotfleetwise)
[![PyPI version](https://badge.fury.io/py/cdk-aws-iotfleetwise.svg)](https://badge.fury.io/py/cdk-aws-iotfleetwise)
[![release](https://github.com/aws-samples/cdk-aws-iotfleetwise/actions/workflows/release.yml/badge.svg)](https://github.com/aws-samples/cdk-aws-iotfleetwise/actions/workflows/release.yml)

# cdk-aws-iotfleetwise

L2 CDK construct to provision AWS IoT Fleetwise

# Install

### Typescript

```sh
npm install cdk-aws-iotfleetwise
```

[API Reference](doc/api-typescript.md)

#### Python

```sh
pip install cdk-aws-iotfleetwise
```

[API Reference](doc/api-python.md)

# Sample

```python
# Example automatically generated from non-compiling source. May contain errors.
from cdk_aws_iotfleetwise import SignalCatalog, VehicleModel, Vehicle, Campaign, CanVehicleInterface, CanVehicleSignal, SignalCatalogBranch, TimeBasedCollectionScheme

signal_catalog = SignalCatalog(stack, "SignalCatalog",
database=ts_database_construct,
table=ts_heart_beat_table_construct,
nodes=[
SignalCatalogBranch(
fully_qualified_name="Vehicle"
),
SignalCatalogSensor(
fully_qualified_name="Vehicle.EngineTorque",
data_type="DOUBLE"
)
]
)

model_a = VehicleModel(stack, "ModelA",
signal_catalog=signal_catalog,
name="modelA",
description="Model A vehicle",
network_interfaces=[
CanVehicleInterface(
interface_id="1",
name="vcan0"
)
],
signals=[
CanVehicleSignal(
fully_qualified_name="Vehicle.EngineTorque",
interface_id="1",
message_id=401,
factor=1,
is_big_endian=True,
is_signed=False,
length=8,
offset=0,
start_bit=0
)
]
)

vin100 = Vehicle(stack, "vin100",
vehicle_name="vin100",
vehicle_model=model_a,
create_iot_thing=True
)

Campaign(stack, "Campaign",
name="TimeBasedCampaign",
target=vin100,
collection_scheme=TimeBasedCollectionScheme(cdk.Duration.seconds(10)),
signals=[CampaignSignal("Vehicle.EngineTorque")]
)
```

## Getting started

To deploy a simple end-to-end example you can use the following commands

```sh
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](CONTRIBUTING.md#security-issue-notifications) for more
information.

## License

This code is licensed under the MIT-0 License. See the LICENSE file.
# API Reference <a name="API Reference" id="api-reference"></a>

## Constructs <a name="Constructs" id="Constructs"></a>
Expand Down
125 changes: 0 additions & 125 deletions doc/api-typescript.md
Original file line number Diff line number Diff line change
@@ -1,128 +1,3 @@
[![NPM version](https://badge.fury.io/js/cdk-aws-iotfleetwise.svg)](https://badge.fury.io/js/cdk-aws-iotfleetwise)
[![PyPI version](https://badge.fury.io/py/cdk-aws-iotfleetwise.svg)](https://badge.fury.io/py/cdk-aws-iotfleetwise)
[![release](https://github.com/aws-samples/cdk-aws-iotfleetwise/actions/workflows/release.yml/badge.svg)](https://github.com/aws-samples/cdk-aws-iotfleetwise/actions/workflows/release.yml)

# cdk-aws-iotfleetwise

L2 CDK construct to provision AWS IoT Fleetwise

# Install

### Typescript

```sh
npm install cdk-aws-iotfleetwise
```

[API Reference](doc/api-typescript.md)

#### Python

```sh
pip install cdk-aws-iotfleetwise
```

[API Reference](doc/api-python.md)

# Sample

```ts
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

```sh
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](CONTRIBUTING.md#security-issue-notifications) for more
information.

## License

This code is licensed under the MIT-0 License. See the LICENSE file.
# API Reference <a name="API Reference" id="api-reference"></a>

## Constructs <a name="Constructs" id="Constructs"></a>
Expand Down
Loading