This project aims to deploy a resilient Grafana container on AWS Fargate using the Grafana Docker Image on DockerHub with no modifications/rebuilds of the container and minimal post deploy configuration of Grafana.

This project requires that you have already registered a domain and configured a hosted zone in Route 53. Once this is completed you will need the domainName, hostedZoneId and zoneName to continue the deployment.
git clone https://github.com/aws-samples/aws-cdk-grafana
cd aws-cdk-grafana
npm install
cdk deploy --context domainName="grafana.example.com" --context hostedZoneId="Z0123456789ABCDEFGHIJ" --context zoneName="example.com"
admin and use the password you retrieved from Secrets ManagerYou can test Grafana config persists past a reboot by simply terminating the task in ECS, let a new task launch (a few seconds) and then logging back into Grafana and all of your configuration of the Dashboards will have persisted.
Note changes to the Admin password in Secrets Manager will not be reflected in Grafana as this is set only once at initial deploy time.
PrivateLink endpoints can be added using the following command. This will incur additional cost for the endpoints, but will prevent CloudWatch, EFS (Elastic File System) and Secrets Manager traffic from traversing the public internet.
cdk deploy --context domainName="grafana.example.com" --context hostedZoneId="Z0123456789ABCDEFGHIJ" --context zoneName="example.com" --context enablePrivateLink=="true"
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.
$ claude mcp add aws-cdk-grafana \
-- python -m otcore.mcp_server <graph>