Visit Grafana.com, click 'data sources' and then click 'Add new data source'.
Get plugin >> Amazon Athena >> Install Plugin
'Amazon Athena' plugin is added,
Return to AWS IAM settings, select the 'Users tab', and click 'Create User. '
Specify the user details and click 'Next'.
To set permissions, select 'Attach policies directly'.
Select from the existing policies.
Click 'Create user'
Create the Access Key.
Select 'Others' and click 'Next.'
Set Description tags if required, and click 'Create access key'.
Once the Access key is created, copy and save both the access and the secret access key, or download them as a .csv file and click 'Done'.
Now go back to Grafana to specify the Athena dashboard's settings and click 'Save and test.' Ensure that the output location is a folder in the S3 bucket.
Once the data source is tested, this message is displayed.
Click 'Dashboards', click 'New' and then click 'New dashboard'.
Click 'Add visualization'.
Select the data source.
This opens the basic dashboard screen.
Add your query and then click 'Run query'.
For example
Editable Format
SELECT $__timeGroup(time, $__interval)as Time,AVG("$__column")as AltFROM"$__table"WHERE $__timeFilter(time)GROUP BY $__timeGroup(time, $__interval)ORDER BY Time ASC