Skip to main content

AWS cost reduction recommendations

Enable detailed cost visibility

Enable two AWS cost allocation features so Glean can analyze infrastructure costs for your deployment and identify cost reduction opportunities:

  • EKS split cost allocation data: Attributes compute costs to Kubernetes namespaces, deployments, and pods
  • User-defined cost allocation tags: Attributes costs to Glean services, node groups, node pools, teams, and database roles

Both features are free, take about 5 minutes to configure, and can be turned off at any time. Data typically appears in the AWS Cost and Usage Report within 24–48 hours.

note

These features provide Glean with billing metadata only. They don't provide access to your application data, query logs, user information, workloads, or AWS environment. Your Glean deployment remains available if you don't enable these features, but Glean will have less information available to identify cost reduction opportunities.

You must complete these procedures from the AWS management or payer account. If you use AWS Organizations, enable all features in the organization before enabling EKS split cost allocation data. If another team or managed service provider administers the payer account, share these procedures with them.

Enable EKS split cost allocation data

  1. Sign in to the AWS Billing and Cost Management console from the management or payer account.
  2. Go to Cost Management preferences.
  3. Under General, find Split cost allocation data.
  4. Select Amazon Elastic Kubernetes Service (Amazon EKS).
  5. For the allocation method, select Resource requests.
  6. Click Save preferences.

Confirm that the existing Cost and Usage Report includes split cost allocation data:

  1. In the Billing and Cost Management console, go to Legacy Pages → Cost and Usage Reports.
  2. Edit the existing Cost and Usage Report.
  3. Under Report content, select Split cost allocation data.
  4. Save the report.

For more information, see Enabling split cost allocation data in the AWS documentation.

Activate user-defined cost allocation tags

  1. Sign in to the AWS Billing and Cost Management console from the management or payer account.

  2. Go to Cost allocation tags

  3. Search for and select the following tag keys:

    Tag keyPurpose
    NameAttributes costs across EC2, EBS, RDS, and other resources by their human-readable labels
    glean-productAttributes costs to a Glean product area
    glean-componentAttributes costs to a specific component or Kubernetes workload
    glean-teamAttributes costs to the responsible Glean team
    karpenter.sh/nodepoolAttributes Karpenter-managed capacity costs by node pool
    eks:nodegroup-nameAttributes Amazon EKS managed capacity costs by node group
    glean_config_indexAttributes Amazon RDS costs by database role
  4. Click Activate.

For more information, see User-defined cost allocation tags in the AWS documentation.

Turn off detailed cost visibility

You can turn off either feature without affecting the availability of your Glean deployment:

  • For split cost allocation data, return to Cost Management preferences and clear Amazon Elastic Kubernetes Service (Amazon EKS) under Split cost allocation data.
  • For cost allocation tags, return to Cost allocation tags, select the active tags, and click Deactivate.

Cost visibility FAQ

AWS Compute Costs

Glean extensively uses compute resources to run various workloads, and purchasing a savings plan can help reduce compute costs. Glean recommends Savings Plans over Reserved Instances, as the former is an AWS preference. Reference: Reserved Instances for Amazon EC2 overview—Amazon Elastic Compute Cloud.

To purchase a savings plan, you can follow: Purchasing a custom Savings Plan commitment

  1. In step 3, select "Compute Savings Plan"

  2. To find the hourly commitment, Glean recommends to follow these steps:

    1. Find the AWS recommended hourly commitment for the "Compute Savings Plan" based on usage for the last 30 days. Reference: Customizing Savings Plans recommendations
    2. Glean recommends customers to commit only for 70% of the AWS recommended hourly commitment because we actively work on reducing compute spend for our customers. Hence, you can multiply the value from above by 0.7 to arrive at the final hourly commitment.

    Example: if in step 2a, AWS recommends an hourly commitment of $3/hour, we recommend you to go with $2.1/hour (0.7 * $3/hour).

    1. You can use the "Savings Plan Purchase Analyzer" to get insights on estimated savings for the hourly commitment. Reference: Announcing Savings Plans Purchase Analyzer | AWS Cloud Financial Management

AWS RDS Database Costs

Glean customer-hosted deployments utilize Amazon RDS for database workloads. AWS now offers Savings Plans for Amazon RDS, which can help reduce database costs. Glean recommends Database Savings Plans as a way to achieve significant cost savings on predictable RDS usage.

To purchase an RDS Savings Plan, follow the AWS guide Purchasing a custom Savings Plan commitment and select Database Saving Plans.

Calculate your commitment

  1. To find the hourly commitment, Glean recommends to follow these steps:
    1. Find the AWS recommended hourly commitment for the Database Savings Plan based on usage for the last 30 days. For more information, see Customizing Savings Plans recommendations.

    2. Glean recommends customers to commit for 80% of the AWS recommended hourly commitment. RDS workloads in Glean deployments tend to be more stable than compute workloads, allowing for a higher commitment level. Hence, you can multiply the value from above by 0.8 to arrive at the final hourly commitment. For example, if AWS recommends an hourly commitment of $2/hour, we recommend you to go with $1.6/hour (0.8 * $2/hour).

    3. You can use Savings Plan Purchase Analyzer to get insights on estimated savings for the hourly commitment. For more information, see Announcing Savings Plans Purchase Analyzer | AWS Cloud Financial Management.

AWS Config Costs

AWS Config is an AWS feature for keeping an inventory of AWS resources and tracking their changes over time. Config is billed based on the quantity of configuration changes that are recorded. AWS Config is not required by Glean and can be disabled. AWS Config may be part of your organization's overall AWS policy, so it may be applied to the Glean environment as well. By keeping AWS Config enabled, the customer is choosing to bear the additional AWS costs not required or scoped by Glean.

  • Many resources in the Glean deployment change frequently, so if not tuned, a customer may see an expensive AWS Config bill.

  • To reduce costs, but still maintain the value that Config provides, Glean recommends that customers set AWS Config to: Record all resources except these:

    • AWS::Config::ResourceCompliance
    • AWS::EC2::EIP
    • AWS::EC2::Fleet
    • AWS::EC2::Instance
    • AWS::EC2::NetworkInterface
    • AWS::EC2::Volume
    • AWS::SSM::AssociationCompliance
    • AWS::SSM::ManagedInstanceInventory
    • AWS::SSM::PatchCompliance
  • Notes:

    • These resources can be noisy and often don't provide significant value in recording critical configuration change history. Ignoring the resources above should significantly reduce AWS Config costs.
    • There may be additional noisy resources that a CloudWatch dashboard should help identify. If desired, create a CloudWatch dashboard using the following to identify the noisiest AWS resources that Config records (ensure that the region below is updated with the region of Glean deployment):
{
"widgets": [
{
"type": "metric",
"x": 0,
"y": 0,
"width": 6,
"height": 6,
"properties": {
"metrics": [
[ { "expression": "SORT(SEARCH('{AWS/Config,ResourceType} MetricName=\"ConfigurationItemsRecorded\" NOT ResourceType=\"All\"',\"Sum\",86400),MAX, DESC, 10)", "label": "Config", "id": "config" } ]
],
"view": "timeSeries",
"stacked": false,
"region": "ADD-REGION-HERE",
"stat": "Average",
"period": 300,
"start": "-PT672H",
"title": "Config resource types"
}
}
]
}