Traditional cloud resource recommendations are typically prescriptive, often providing limited options for fine-tuning. But what if you needed a recommendation for a niche product that's not widely used in your organization? Or maybe you want to heavily customize each parameter or introduce another dimension, like network throughput, into the recommendation process? Unfortunately, there's no straightforward way to achieve this without writing custom scripts.
Custom Recommendations powered by Cloud Asset Governance enables you to create a tailor-made recommendation with just a simple YAML. The Harness AI Development Assistant (Aida™) automatically generates these YAML policies. Custom recommendations leverage the power of policy-as-code and the simplicity of recommendation workflows to simplify lifecycle management.
Recommendations go beyond cost optimization, extending to various use cases such as security, compliance, and tag automation. For example, if you wanted to create a custom recommendation to optimize the startup performance of Lambda functions, you could use a straightforward policy that identifies candidates for SnapStart, generating a list of these candidates as a custom recommendation. Here’s an example policy for the use case mentioned:
policies:
- name: aws-lambda-java-snaptstart-off
resource: lambda
description: |
Lambda SnapStart for Java can improve startup performance for latency-sensitive applications by up to 10x at no extra cost, typically with no changes to your function code. The largest contributor to startup latency (often referred to as cold start time) is the time that Lambda spends initializing the function, which includes loading the function's code, starting the runtime, and initializing the function code. With SnapStart, Lambda initializes your function when you publish a function version. Lambda takes a Firecracker microVM snapshot of the memory and disk state of the initialized execution environment, encrypts the snapshot, and caches it for low-latency access. When you invoke the function version for the first time, and as the invocations scale up, Lambda resumes new execution environments from the cached snapshot instead of initializing them from scratch, improving startup latency. You can use SnapStart only on published function versions and aliases that point to versions.You can't use SnapStart on a function's unpublished version ($LATEST).
filters:
- type: value
key: Runtime
op: regex
value: '^Java.*'
- type: value
key: Snapstart.OptimizationStatus
op: eq
value: Off
- not:
- type: value
key: Version
op: eq
value: "$LATEST"
By building Cloud Asset Governance on top of the open-source Cloud Custodian, we can leverage its extensive existing coverage and seamlessly integrate new capabilities as they emerge. This approach allows us to support all major cloud assets across leading cloud providers, enabling us to offer recommendations that are tailor-made to any cloud resource.
AWS resource coverage includes EC2 instances, S3 buckets, Lambda functions, RDS instances, and CloudFormation stacks. (Comprehensive list)
Azure Resource Coverage includes Virtual Machines (VMs), Storage accounts, App services, Cosmos DB accounts, and Key Vaults. (Comprehensive list)
GCP Resource Coverage includes Compute Engine instances, Cloud Storage buckets, App Engine applications, Cloud SQL instances, and Cloud IAM policies. (Comprehensive list)
policies:
- name: delete-underutilized-redshift-cluster
resource: redshift
filters:
- type: metrics
name: CPUUtilization
days: 7
period: 86400
value: 5
op: less-than
actions:
- delete
If your Redshift costs are skyrocketing, a quick way to reduce them is by identifying and eliminating underutilized instances. Begin by looking at instances where the CPU usage has been less than 5% over the last seven days. These low-performing instances are prime candidates for deletion. You can leverage a YAML based policy to define the tuning parameters and translate the rule into a custom recommendation with a simple toggle.
The engine will pick this up, generate recommendations across the estate, and surface them to the user. You can leverage recommendation workflows to get users to take action by leveraging ticketing integrations and moving recommendations across various states of active, ignored, and completed.
As cloud adoption continues to accelerate, intelligent cost optimization has become essential. At Harness, we recognize that effective cost management requires knowledge tailored to each team, department, and organization. To support this, Harness Cloud Cost Management (CCM) equips enterprises with the tools needed to manage recommendations with a high degree of control, fostering democratization across the board.
Visit the Harness CCM web page or book a demo today to discover how custom recommendations can shift your team's perspective on incorporating cost as a crucial dimension for optimization.