Best practices for Amazon IoT Events - Amazon IoT Events
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Best practices for Amazon IoT Events

Follow these best practices to get the maximum benefit from Amazon IoT Events.

Enable Amazon CloudWatch logging when developing Amazon IoT Events detector models

Amazon CloudWatch monitors your Amazon resources and the applications that you run on Amazon in real time. With CloudWatch, you gain system-wide visibility into resource use, application performance, and operational health. When you develop or debug an Amazon IoT Events detector model, CloudWatch helps you know what Amazon IoT Events is doing, and any errors that it encounters.

To enable CloudWatch
  1. If you haven't already, follow the steps in Setting up permissions for Amazon IoT Events to create a role with an attached policy that grants permission to create and manage CloudWatch logs for Amazon IoT Events.

  2. Go to the Amazon IoT Events console.

  3. In the navigation pane, choose Settings.

  4. On the Settings page, choose Edit.

  5. On the Edit logging options page, in the Logging options section, do the following:

    1. For Level of verbosity, select an option.

    2. For Select role, select a role with sufficient permissions to perform the logging actions that you chose.

    3. (Optional) If you chose Debug for the Level of verbosity, you can add Debug targets by doing the following:

      1. Under Debug targets, choose Add Model Option.

      2. Enter a Detector Model Name and (optional) KeyValue to specify the detector models and specific detectors (instances) to log.

  6. Choose Update.

Your logging options are successfully updated.

Publish regularly to save your detector model when working in the Amazon IoT Events console

When you use the Amazon IoT Events console, your work in progress is saved locally in your browser. However, you must choose Publish to save your detector model to Amazon IoT Events. After you publish a detector model, your published work will become available in any browser that you use to access your account.

Note

If you don't publish your work, it will not be saved. After you publish a detector model, you can't change its name. However, you can continue modifying its definition.

Store your Amazon IoT Events data to avoid possible data loss due to a long period of inactivity

If you don't use Amazon IoT Events for a significant period of time, your data, including your detector models, might be deleted automatically. A significant period of time could mean, for example, you don't incur charges and don't create detector models. However, we won't delete data or detector models without providing you with at least a 30 day notice prior. If you need to store data for an extended period of time, consider using Amazon storage services.