Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Activate a Grafana Enterprise license from AWS on an instance deployed outside of AWS
While AWS Marketplace lists ECS and EKS as the supported environments for Grafana Enterprise, you can apply a Grafana Enterprise license from AWS Marketplace to any Grafana instance with network access to the AWS licensing service.
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 create access policies.
- Be sure there is network access between AWS and the environment where you intend to run Grafana. Network access is required because your Grafana instance communicates with the AWS License Manager endpoints and quotas to retrieve license and subscription information. Grafana instances with access to the public internet will have access to AWS license manager.
To activate a Grafana Enterprise license from AWS on a Grafana Enterprise instance deployed outside of AWS, complete the following tasks.
Task 1: Install Grafana Enterprise
To install Grafana, refer to the documentation specific to your implementation.
Task 2: Create an AWS IAM user with access to your Grafana Enterprise license
To retrieve your license, Grafana Enterprise requires access to your AWS account and license information. To grant access, create an IAM user in AWS with access to the license, and pass its credentials as environment variables on the host or container where Grafana is running. These environment variables allow Grafana to retrieve license details from AWS.
In the AWS License Manager service, create an IAM policy with the following permissions:
"license-manager:CheckoutLicense"
"license-manager:ListReceivedLicenses"
"license-manager:GetLicenseUsage"
"license-manager:CheckInLicense"
For more information about creating a policy in AWS, refer to Creating IAM policies.
For more information about AWS Identity and Access Management, refer to IAM users.
To limit the policy to obtain usage data just for Grafana Enterprise, in the Resources section of the policy, specify your license ARN.
You can find your license ID in the Granted Licenses section of AWS License Manager.
The policy JSON should look similar to the following example:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "license-manager:GetLicenseUsage", "Resource": "arn:aws:license-manager::[YOUR_ACCOUNT]:license:[YOUR_LICENSE_ID]" }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": [ "license-manager:CheckoutLicense", "license-manager:ListReceivedLicenses", "license-manager:CheckInLicense" ], "Resource": "*" } ] }
Create an IAM user and choose access key credentials as its authentication method.
For more information about creating an IAM user, refer to IAM users.
For more information about access key credentials, refer to Managing access keys for IAM users.
Attach the policy you created to the IAM user.
Add the following values as environment variables to the host or container running Grafana:
- AWS region
- IAM user’s access key ID
- IAM user’s secret access key
The environment variables should look similar to the following example:
AWS_ACCESS_KEY_ID=ABCD5E75FGHIJKTM7 AWS_SECRET_ACCESS_KEY=k8fhYAQVy+5NhCejhe6HeSjSphjRuy+12C06 AWS_REGION=us-east-1
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.
Choose one of the following options to update the license_validation_type configuration to aws
:
Option 1: In the
[enterprise]
section of the grafana.ini configuration file, addlicense_validation_type=aws
.For example:
[enterprise] license_validation_type=aws
Option 2: Add the following environment variable to the container or host:
GF_ENTERPRISE_LICENSE_VALIDATION_TYPE=aws
Task 4: Start or restart Grafana
To activate Grafana Enterprise features, start (or restart) Grafana.
For information about restarting Grafana, refer to Restart Grafana.