Troubleshoot Amazon Timestream data source issues
This document provides solutions to common issues you may encounter when configuring or using the Amazon Timestream data source. For configuration instructions, refer to Configure the Amazon Timestream data source.
Minimum Grafana version
The Amazon Timestream data source requires Grafana 10.4 or later. If you encounter unexpected errors, verify that your Grafana version meets this requirement.
Authentication errors
These errors occur when credentials are invalid, missing, or don’t have the required permissions.
“AccessDeniedException” or “Authorization failed”
Symptoms:
- Save & test fails with
AccessDeniedException. - Queries return access denied messages.
- Database, table, or measure drop-downs don’t load.
Possible causes and solutions:
“ExpiredTokenException” or “Token has expired”
Symptoms:
- Queries fail intermittently with token expiration errors.
- The data source works initially but stops after a period of time.
Solutions:
- If you use temporary credentials, verify that the session token is current.
- For assume role configurations, verify that the source identity has permission to call
sts:AssumeRole. - Check that the Grafana server clock is synchronized. Expired token errors can occur when the system clock drifts.
Connection errors
These errors occur when Grafana can’t reach the Timestream API endpoints.
“Connection refused” or timeout errors
Symptoms:
- Save & test times out.
- Queries fail with network errors.
- Intermittent connection failures.
Solutions:
- Verify network connectivity from the Grafana server to Timestream endpoints in the configured region.
- Check that firewall rules allow outbound HTTPS traffic on port 443.
- If you use a VPC endpoint, verify the endpoint is correctly configured and set the custom endpoint URL in the data source settings.
- For Grafana Cloud, configure Private data source connect if accessing private resources.
Custom endpoint issues
Symptoms:
- Queries fail after configuring a custom endpoint.
- 404 errors related to
DescribeEndpoints. - Errors related to endpoint discovery.
Solutions:
- Verify the custom endpoint URL is correct and reachable from the Grafana server.
- When a custom endpoint is configured (for example, a VPC endpoint), the plugin automatically disables AWS endpoint discovery. This prevents 404 errors from VPC endpoints that don’t implement the
DescribeEndpointsAPI. Verify that the endpoint URL points directly to the Timestream query endpoint. - If the VPC endpoint blocks egress to public AWS endpoints, ensure endpoint discovery is not being forced by another configuration.
- To revert to the default endpoint, clear the Default Endpoint field in the data source configuration.
Query errors
These errors occur when executing queries against Timestream.
“No data” or empty results
Symptoms:
- Queries run without error but return no data.
- Panels display a “No data” message.
Possible causes and solutions:
Query timeout
Symptoms:
- Queries run for a long time and then fail.
- Errors mention timeout or query limits.
Solutions:
- Narrow the dashboard time range to reduce the volume of data scanned.
- Add filters to the
WHEREclause to reduce the result set. - Use
bin(time, <interval>)with a larger interval to reduce the number of returned rows. - Break complex queries into smaller parts using multiple panels.
Macros not interpolating correctly
Symptoms:
- Query contains literal
$__timeFilteror$__timeFromtext instead of expanded values. - Time range filters don’t work after a Grafana upgrade.
${__from:date:iso}or other formatted time variables aren’t replaced.
Possible causes and solutions:
Alerting errors
These errors occur when using the Amazon Timestream data source with Grafana Alerting. For setup instructions, refer to Alerting.
“input data must be a wide series but got type long”
Symptoms:
- Alert rules fail with this error.
- The query works in dashboard panels but fails in alerting.
Solutions:
- Use the
CREATE_TIME_SERIESfunction to return data in wide time-series format. Refer to Alerting for examples. - Enable Wait for all queries in the query editor to ensure all result pages are processed before the alert evaluates.
Alert fails on string or non-numeric data
Symptoms:
- Alert rule returns an error about unsupported data types.
- Query returns string values like
"HEALTHY"or"RUNNING"that can’t be used as alert conditions.
Solutions:
- Use a
CASEexpression to convert string values to numeric values insideCREATE_TIME_SERIES. For example, map'UNHEALTHY'to1.0and'HEALTHY'to0.0, then set a threshold on the numeric result. - Refer to Alert on string values for a full example.
Pagination and incomplete results
Symptoms:
- Only a subset of expected results appears.
- Results differ between dashboard panels and alerting.
Solutions:
- Enable Wait for all queries in the query editor to fetch all result pages before returning data.
- If you don’t enable this option, the plugin streams pages incrementally. This works for dashboard panels but can cause incomplete results in alerting evaluations.
Template variable errors
These errors occur when using template variables with the data source.
Variables return no values
Symptoms:
- Variable drop-downs are empty.
- The variable preview shows no results when you click Run query.
Solutions:
- Verify the data source connection is working by running Save & test in the data source settings.
- Check that the variable query is valid SQL that returns at least one column.
- For cascading variables (where one depends on another), verify that the parent variable has a valid selection.
- Verify the IAM identity has permission to list databases, tables, or run the specific query used by the variable.
Variables are slow to load
Solutions:
- Set the variable refresh to On dashboard load instead of On time range change to avoid reloading on every time range adjustment.
- Simplify variable queries. For example, use
SHOW DATABASESinstead of a fullSELECT DISTINCTquery when listing databases. - Reduce the scope of variable queries by adding filters.
Performance and cost issues
These issues relate to slow queries, high AWS costs, or API limits. For detailed optimization guidance, refer to Optimize query performance and cost.
High query costs
Symptoms:
- Unexpectedly high AWS Timestream charges.
- Queries scan more data than expected.
Solutions:
- Always include a
measure_namefilter in queries. Timestream partitions data by measure name, so omitting this filter scans the entire table. - Narrow the dashboard time range to reduce the volume of data scanned.
- Use
bin()with$__interval_msto aggregate data instead of returning raw rows. - Reduce the dashboard auto-refresh frequency.
- Use the Dashboard data source to reuse query results across multiple panels instead of running duplicate queries.
- Enable query caching in Grafana Enterprise or Grafana Cloud.
API throttling or rate limit errors
Symptoms:
- “Rate exceeded” or throttling errors.
- Dashboard panels intermittently fail to load.
- Multiple panels fail simultaneously.
Solutions:
- Reduce the frequency of dashboard auto-refresh.
- Use larger time intervals in
bin()to reduce the number of data points per query. - Use the Dashboard data source to share query results across panels instead of running separate queries.
- Enable query caching in Grafana (available in Grafana Enterprise and Grafana Cloud).
- Request a quota increase from AWS through the Service Quotas console.
Enable debug logging
To capture detailed error information for troubleshooting:
Set the Grafana log level to
debugin the configuration file:[log] level = debugReview logs in
/var/log/grafana/grafana.logor your configured log location.Look for entries containing
timestreamfor request and response details.Reset the log level to
infoafter troubleshooting to avoid excessive log volume.
Get additional help
If you’ve tried these solutions and still encounter issues:
- Check the Grafana community forums for similar issues.
- Review the Timestream plugin GitHub issues for known bugs.
- Refer to the Amazon Timestream documentation for service-specific guidance.
- Contact Grafana Support if you’re a Cloud Pro, Cloud Advanced, or Enterprise user.
- When reporting issues, include:
- Grafana version and plugin version
- Error messages (redact sensitive information)
- Steps to reproduce
- Relevant configuration (redact credentials)


