Activate a Grafana Enterprise license from AWS Marketplace on ECS

If you have purchased a Grafana Enterprise subscription through AWS Marketplace, you must activate it in order to use Grafana Enterprise data source plugins and features in Grafana.

Before you begin

  • Purchase a subscription to Grafana Enterprise from AWS Marketplace.
  • Be sure that the IAM user that was used to purchase Grafana Enterprise has permission to manage subscriptions, create new IAM users and roles, and create access policies.

To activate your license, complete the following tasks.

Task 1: Deploy Grafana Enterprise on Amazon ECS

  1. Deploy Grafana Enterprise on Amazon ECS.

    For more information about deploying an application on Amazon ECS, refer to Creating an Amazon ECS service.

  2. As you create the Amazon ECS service, use the Grafana Enterprise version 8.3.0 or later container image.

    For example, enter grafana/grafana-enterprise:8.3.3.

    Only Grafana Enterprise versions 8.3.0 and later support licenses granted through AWS Marketplace.

Task 2: Configure Grafana for high availability

Grafana requires that you configure a database to hold dashboards, users, and other persistent data.

Before you begin

To configure Grafana for high availability:

  1. In AWS ECS, use environment variables to update the database parameters.

    For a list of database parameters, refer to Configuration.

  2. Create a revision of the task definition for the ECS Task that runs Grafana Enterprise.

    For more information about creating a task, refer to Updating a task definition using the classic console.

  3. Within the new revision, edit the Grafana Enterprise container for this task, and add the following environment variables to the container:

    1. GF_DATABASE_TYPE=[database type]
    2. GF_DATABASE_HOST=[database address and port]
    3. GF_DATABASE_NAME=[database name]
    4. GF_DATABASE_USER=[database username]
    5. GF_DATABASE_PASSWORD=[database password]

For more information about how to update your ECS service with an environment variable, refer to Updating a service using the new console.

Task 3: Configure Grafana Enterprise to validate its license with AWS

In this task you configure Grafana Enterprise to validate the license with AWS instead of Grafana Labs.

  1. In AWS IAM, create an access policy with the following permissions:

    • "license-manager:CheckoutLicense"
    • "license-manager:ListReceivedLicenses"
    • "license-manager:GetLicenseUsage"
    • "license-manager:CheckInLicense"

    For more information about creating an access policy, refer to Creating IAM policies (console).

    For more information about AWS license permissions, refer to Actions, resources, and condition keys for AWS License Manager.

  2. Create an Elastic Container Service task role and attach the policy you created in the previous step.

    For more information about creating a task role, refer to IAM Roles for Tasks.

  3. Create a revision of the task definition for the ECS Task that runs Grafana Enterprise.

    For more information about creating a revision of the task definition, refer to Updating a task definition using the classic console.

  4. Within the new revision, perform the following steps:

    a. Update the Task Role of your ECS Task to the role that you created, with permission to access license information.

    b. Edit the Grafana Enterprise container for this task, and add the following environment variable to the container:

    1. GF_ENTERPRISE_LICENSE_VALIDATION_TYPE=aws

    For more information about how to update your ECS service with an environment variable, refer to Updating a service using the new console.

Task 4: Start or restart Grafana

  1. To restart Grafana and activate your license, update the service running Grafana to use the latest revision of the task definition that you created.
  2. After you update the service, navigate to your Grafana instance, sign in with Grafana Admin credentials, and navigate to the Statistics and Licensing page to validate that your license is active.

For more information about validating that your license is active, refer to Determine the number of active users for each licensed role.