AWS FinOps icon

AWS FinOps

AWS Financial Operations and Cost Analysis

Overview

This node, named AWS FinOps, provides financial operations and cost analysis capabilities for AWS cloud resources. Specifically, the Get Unused Resources operation helps identify unused or underutilized AWS resources across specified regions. This is useful for optimizing cloud costs by detecting resources that can be safely terminated or downsized.

Typical use cases include:

  • Auditing AWS accounts to find stopped EC2 instances, unattached EBS volumes, unassociated Elastic IPs, and idle load balancers.
  • Identifying resources that incur costs but are not actively used, enabling cost savings.
  • Running periodic FinOps audits to maintain efficient resource usage.

For example, a cloud administrator can select multiple AWS regions and run this operation to get a detailed report of unused resources in each region, helping them decide which resources to clean up.

Properties

Name Meaning
Regions Select one or more AWS regions to scan for unused resources. Options:
- US East (N. Virginia) (us-east-1)
- US West (Oregon) (us-west-2)
- EU (Ireland) (eu-west-1)
- Asia Pacific (Singapore) (ap-southeast-1)

Output

The output JSON object for the Get Unused Resources operation has the following structure:

{
  "operation": "getUnusedResources",
  "regions": ["us-east-1", "us-west-2"],
  "resources": {
    "us-east-1": {
      "unusedEBSVolumes": [
        {
          "volumeId": "vol-1234567890abcdef0",
          "size": 100,
          "availabilityZone": "us-east-1a",
          "createTime": "2023-01-01T12:00:00Z"
        }
      ],
      "unattachedEIPs": [
        {
          "publicIp": "203.0.113.25",
          "allocationId": "eipalloc-12345678"
        }
      ],
      "idleLoadBalancers": [
        {
          "loadBalancerName": "my-idle-lb",
          "dnsName": "my-idle-lb-123456.us-east-1.elb.amazonaws.com",
          "createdTime": "2022-12-01T08:30:00Z",
          "state": "active",
          "type": "application"
        }
      ],
      "errors": []
    },
    "us-west-2": {
      "...": "..."
    }
  }
}

Explanation:

  • operation: The name of the operation performed.
  • regions: List of AWS regions scanned.
  • resources: An object keyed by region containing arrays of unused resource types:
    • unusedEBSVolumes: EBS volumes that are available but not attached to any instance.
    • unattachedEIPs: Elastic IP addresses allocated but not associated with any resource.
    • idleLoadBalancers: Load balancers with no active targets.
    • errors: Any errors encountered during the audit for that region.

The node does not output binary data.

Dependencies

  • Requires valid AWS credentials with permissions to describe EC2 instances, volumes, addresses, and Elastic Load Balancing resources.
  • Uses AWS SDK clients for Cost Explorer, EC2, and Elastic Load Balancing v2.
  • The node expects an API key credential configured in n8n for AWS access.

Troubleshooting

  • Common issues:

    • Insufficient AWS IAM permissions may cause failures when fetching resource details.
    • Network connectivity problems can prevent communication with AWS APIs.
    • Specifying unsupported or incorrect AWS regions will result in empty or error responses.
  • Error messages:

    • "Failed to fetch unused EBS volumes: <error message>" — Check IAM permissions for ec2:DescribeVolumes.
    • "Failed to fetch unattached EIPs: <error message>" — Verify permissions for ec2:DescribeAddresses.
    • "Failed to fetch idle Load Balancers: <error message>" — Ensure permissions for ELBv2 actions like elasticloadbalancing:DescribeLoadBalancers.
    • General audit errors indicate unexpected issues; reviewing AWS CloudTrail logs and network settings may help.
  • To resolve errors, verify the AWS credentials have the necessary read-only permissions for EC2 and ELB resources, and confirm the selected regions are valid.

Links and References

Discussion