Create assets programmatically

You have created several assets in the AWS IoT SiteWise console. Resources are created through the SiteWise API.

If you want to automate CRUD (Create/Update/Delete) of resources you might want to do this programmatically in larger environments or because you prefer the command line or SDK over a GUI.

In this exercise you will create the generators 4 and 8, associate data streams with asset properties and associate the generators with power plants.

You will use Jupyter notebooks with Python and the Boto3 library the AWS SDK for Python.

Notebooks for this exercise:

  • 01_SW_Config.ipynb
  • 02_SW_Resources.ipynb

Access Jupyter notebooks on your SageMaker instance

  1. Go to outputs section for your stack SiteWiseWorkshop in the AWS CloudFormation console
  2. SageMakerInstance: Click the associated link
  3. Double-click sitewise
  4. Work through the notebooks (double-click to open) 01_SW_Config.ipynb and 02_SW_Resources.ipynb

Feel free to experiment with the notebooks, improve the code, try something new.