Grafana Cloud Enterprise Open source
Last reviewed: April 28, 2026

Amazon Timestream annotations

Annotations allow you to overlay event information on graphs, providing context for metric changes. The Amazon Timestream data source supports annotation queries that pull event data directly from your Timestream tables.

For general information about annotations in Grafana, refer to Annotate visualizations.

Before you begin

Create an annotation query

To add a Timestream annotation to a dashboard:

  1. Click Dashboard settings (gear icon).
  2. Click Annotations.
  3. Click Add annotation query.
  4. Select your Amazon Timestream data source.
  5. Enter a SQL query that returns the required columns.
  6. Click Apply.

Required columns

Your annotation query must return at least a time column. Grafana automatically maps the following column names to annotation properties.

ColumnRequiredDescription
timeYesThe timestamp for the annotation.
timeEndNoThe end timestamp for range annotations. When present, the annotation spans from time to timeEnd.
textNoThe annotation body text displayed on hover.
titleNoA title for the annotation.
tagsNoComma-separated tags used to filter annotations.

Annotation query examples

The following examples demonstrate common annotation query patterns. Annotation queries support the same macros and template variables as regular queries.

Mark point-in-time events

The following query retrieves deployment events and displays them as point annotations:

SQL
SELECT
  time,
  measure_value::varchar AS text
FROM $__database.deployment_events
WHERE $__timeFilter
  AND measure_name = 'deployment'
ORDER BY time ASC

Categorize annotations with tags

Add a tags column to categorize annotations and filter them in the dashboard:

SQL
SELECT
  time,
  measure_value::varchar AS text,
  environment AS tags
FROM $__database.deployment_events
WHERE $__timeFilter
  AND measure_name = 'deployment'
ORDER BY time ASC

Mark time ranges

Use timeEnd to create range annotations that highlight a span of time, such as a maintenance window:

SQL
SELECT
  time,
  timeEnd,
  measure_value::varchar AS text
FROM $__database.maintenance_windows
WHERE $__timeFilter
  AND measure_name = 'maintenance'
ORDER BY time ASC