🚨 Jul-25: Alerts migration are currently disabled with v0.1.9. See #19
🎉 Jul-19: Amazon Grafana supports now in-place update from v8.4 to v9.4
Amazon Managed Grafana Migrator is a CLI migration utility to migrate Grafana content (data sources, dashboards, folders and alert rules) to Amazon Managed Grafana. It supports the following migration scenarios:
- Migrating from and to Amazon Managed Grafana Workspace (eg. Moving to v9.4), although consider using the native functionality in the AWS Console
- Migrating from a Grafana server to an Amazon Managed Grafana Workspace
Build from latest release. This requires Go installed on your environement.
go install github.com/aws-observability/amazon-managed-grafana-migrator@latest
This command above will build the binary into your Go path ($HOME/go/bin)
.
Make sure to add your Go bin in your $PATH to run the command.
For Linux, this is usually export PATH=$PATH:$HOME/go/bin
.
You can also download the pre-compiled binary for your OS and CPU architecture from our GitHub releases.
amazon-managed-grafana-migrator discover --region eu-west-1
amazon-managed-grafana-migrator migrate \
--src g-abcdef1234.grafana-workspace.eu-central-1.amazonaws.com \
--dst g-abcdef5678.grafana-workspace.us-west-2.amazonaws.com
amazon-managed-grafana-migrator migrate \
--src-url https://grafana.example.com/
--src-api-key API_KEY_HERE
--dst g-abcdef5678.grafana-workspace.us-west-2.amazonaws.com
amazon-managed-grafana-migrator --help
# command specific help
amazon-managed-grafana-migrator migrate --help
To run this tool you need AWS permissions through IAM. Make sure you have the
AWS command line tool installed and have already run aws configure
before you
start. Below are the minimum permissions required by the tool:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"grafana:DeleteWorkspaceApiKey",
"grafana:DescribeWorkspace",
"grafana:CreateWorkspaceApiKey"
],
"Resource": "arn:aws:grafana:*:<ACCOUNT_ID>:/workspaces/<WORKSPACE_ID>"
},
{
"Effect": "Allow",
"Action": "grafana:ListWorkspaces",
"Resource": "*"
}
]
}
If you a migrating from a Grafana server, you will need an active API Key with "ADMIN" role.
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.