docs/sources/administration/enterprise-licensing/activate-aws-marketplace-license/activate-license-on-instance-outside-aws/index.md
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.
To activate a Grafana Enterprise license from AWS on a Grafana Enterprise instance deployed outside of AWS, complete the following tasks.
To install Grafana, refer to the documentation specific to your implementation.
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:
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
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, add license_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
To activate Grafana Enterprise features, start (or restart) Grafana.
For information about restarting Grafana, refer to Restart Grafana.