cdk-aws-iotfleetwise


Namecdk-aws-iotfleetwise JSON
Version 0.3.7 PyPI version JSON
download
home_pagehttps://github.com/aws-samples/cdk-aws-iotfleetwise.git
SummaryL2 CDK construct to provision AWS IoT Fleetwise
upload_time2024-05-30 14:46:09
maintainerNone
docs_urlNone
authorFrancesco Salamida<salamida@amazon.com>
requires_python~=3.8
licenseMIT-0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![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
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/aws-samples/cdk-aws-iotfleetwise.git",
    "name": "cdk-aws-iotfleetwise",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Francesco Salamida<salamida@amazon.com>",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/f8/9a/f1838883598b1fa82eab38b6643339e50ed8f1651de2a179fdc5e2640a0f/cdk-aws-iotfleetwise-0.3.7.tar.gz",
    "platform": null,
    "description": "[![NPM version](https://badge.fury.io/js/cdk-aws-iotfleetwise.svg)](https://badge.fury.io/js/cdk-aws-iotfleetwise)\n[![PyPI version](https://badge.fury.io/py/cdk-aws-iotfleetwise.svg)](https://badge.fury.io/py/cdk-aws-iotfleetwise)\n[![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)\n\n# cdk-aws-iotfleetwise\n\nL2 CDK construct to provision AWS IoT Fleetwise\n\n# Install\n\n### Typescript\n\n```sh\nnpm install cdk-aws-iotfleetwise\n```\n\n[API Reference](doc/api-typescript.md)\n\n#### Python\n\n```sh\npip install cdk-aws-iotfleetwise\n```\n\n[API Reference](doc/api-python.md)\n\n# Sample\n\n```python\nimport {\n  SignalCatalog,\n  VehicleModel,\n  Vehicle,\n  Campaign,\n  CanVehicleInterface,\n  CanVehicleSignal,\n  SignalCatalogBranch,\n  TimeBasedCollectionScheme,\n} from 'cdk-aws-iotfleetwise';\n\nconst signalCatalog = new SignalCatalog(stack, 'SignalCatalog', {\n  database: tsDatabaseConstruct,\n  table: tsHeartBeatTableConstruct,\n  nodes: [\n    new SignalCatalogBranch({\n      fullyQualifiedName: 'Vehicle',\n    }),\n    new SignalCatalogSensor({\n      fullyQualifiedName: 'Vehicle.EngineTorque',\n      dataType: 'DOUBLE',\n    }),\n  ],\n});\n\nconst model_a = new VehicleModel(stack, 'ModelA', {\n  signalCatalog,\n  name: 'modelA',\n  description: 'Model A vehicle',\n  networkInterfaces: [\n    new CanVehicleInterface({\n      interfaceId: '1',\n      name: 'vcan0',\n    }),\n  ],\n  signals: [\n    new CanVehicleSignal({\n      fullyQualifiedName: 'Vehicle.EngineTorque',\n      interfaceId: '1',\n      messageId: 401,\n      factor: 1.0,\n      isBigEndian: true,\n      isSigned: false,\n      length: 8,\n      offset: 0.0,\n      startBit: 0,\n    }),\n  ],\n});\n\nconst vin100 = new Vehicle(stack, 'vin100', {\n  vehicleName: 'vin100',\n  vehicleModel: model_a,\n  createIotThing: true,\n});\n\nnew Campaign(stack, 'Campaign', {\n  name: 'TimeBasedCampaign',\n  target: vin100,\n  collectionScheme: new TimeBasedCollectionScheme(cdk.Duration.seconds(10)),\n  signals: [new CampaignSignal('Vehicle.EngineTorque')],\n});\n```\n\n## Getting started\n\nTo deploy a simple end-to-end example you can use the following commands\n\n```sh\nyarn install\nnpx projen && npx projen compile\n# Define Amazon Timestream as fleetwise storage destination\nnpx cdk -a lib/integ.full.js deploy -c key_name=mykey\n# Define Amazon S3 as fleetwise storage destination\nnpx cdk -a lib/integ.full.js deploy -c key_name=mykey -c use_s3=true\n```\n\nWhere `mykey` is an existing keypair name present in your account.\nThe deploy takes about 15 mins mostly due to compilation of the IoT FleetWise agent in the\nEC2 instance that simulate the vehicle. Once deploy is finshed, data will start to show up in your Timestream table.\n\n## TODO\n\nWarning: this construct should be considered at alpha stage and is not feature complete.\n\n* Implement updates for all the custom resources\n* Conditional campaigns\n\n## Security\n\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more\ninformation.\n\n## License\n\nThis code is licensed under the MIT-0 License. See the LICENSE file.\n",
    "bugtrack_url": null,
    "license": "MIT-0",
    "summary": "L2 CDK construct to provision AWS IoT Fleetwise",
    "version": "0.3.7",
    "project_urls": {
        "Homepage": "https://github.com/aws-samples/cdk-aws-iotfleetwise.git",
        "Source": "https://github.com/aws-samples/cdk-aws-iotfleetwise.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7940d9a4f4bfeb0ecb2e66429b97bacd0dd9ee93428be60eb6adf5f9cddd6db1",
                "md5": "46931f69a28eff490d2c3c4205681eaa",
                "sha256": "0c0eef4c5ff2707bd283bc40762f574c1bbc90b21a7b2bab00ec151269e9d654"
            },
            "downloads": -1,
            "filename": "cdk_aws_iotfleetwise-0.3.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "46931f69a28eff490d2c3c4205681eaa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 11806739,
            "upload_time": "2024-05-30T14:46:06",
            "upload_time_iso_8601": "2024-05-30T14:46:06.916957Z",
            "url": "https://files.pythonhosted.org/packages/79/40/d9a4f4bfeb0ecb2e66429b97bacd0dd9ee93428be60eb6adf5f9cddd6db1/cdk_aws_iotfleetwise-0.3.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f89af1838883598b1fa82eab38b6643339e50ed8f1651de2a179fdc5e2640a0f",
                "md5": "2c9b7e1698cb4366f808374ce6898bf7",
                "sha256": "442a31d4b89bd0a2c9e399fa27f28bca99a220b64f757bc6369f455c5bbb97f4"
            },
            "downloads": -1,
            "filename": "cdk-aws-iotfleetwise-0.3.7.tar.gz",
            "has_sig": false,
            "md5_digest": "2c9b7e1698cb4366f808374ce6898bf7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 11808558,
            "upload_time": "2024-05-30T14:46:09",
            "upload_time_iso_8601": "2024-05-30T14:46:09.762708Z",
            "url": "https://files.pythonhosted.org/packages/f8/9a/f1838883598b1fa82eab38b6643339e50ed8f1651de2a179fdc5e2640a0f/cdk-aws-iotfleetwise-0.3.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-30 14:46:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aws-samples",
    "github_project": "cdk-aws-iotfleetwise",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cdk-aws-iotfleetwise"
}
        
Elapsed time: 0.33228s