AWS FinOps icon

AWS FinOps

AWS Financial Operations and Cost Analysis

Overview

This node provides AWS Financial Operations (FinOps) capabilities focused on cost analysis and resource optimization. Specifically, the "Run FinOps Audit" operation performs a comprehensive audit across specified AWS regions to identify cost-saving opportunities by detecting stopped instances, unattached volumes, unassociated Elastic IPs, underutilized instances, and idle load balancers.

Common scenarios where this node is beneficial include:

  • Regularly auditing AWS accounts to reduce unnecessary costs.
  • Identifying unused or underutilized resources that can be terminated or downsized.
  • Gaining insights into resource utilization across multiple regions for better financial governance.

For example, a cloud operations team can run this audit monthly across their primary AWS regions to generate reports highlighting resources that are candidates for cost optimization.

Properties

Name Meaning
Regions Select one or more AWS regions to run the FinOps audit against. Options:
- US East (N. Virginia)
- US West (Oregon)
- EU (Ireland)
- Asia Pacific (Singapore)

Output

The output JSON object for the "Run FinOps Audit" operation has the following structure:

{
  "operation": "runFinOpsAudit",
  "regions": ["us-east-1", "eu-west-1"],
  "findings": {
    "us-east-1": {
      "stoppedInstances": [
        {
          "instanceId": "i-0123456789abcdef0",
          "instanceType": "t3.medium",
          "launchTime": "2023-01-01T12:00:00Z",
          "platform": "Linux",
          "state": "stopped"
        }
      ],
      "unattachedVolumes": [
        {
          "volumeId": "vol-0abcd1234efgh5678",
          "size": 100,
          "volumeType": "gp2",
          "createTime": "2022-12-15T08:30:00Z",
          "encrypted": false
        }
      ],
      "unassociatedEIPs": [
        {
          "allocationId": "eipalloc-12345678",
          "publicIp": "203.0.113.25",
          "domain": "vpc"
        }
      ],
      "underutilizedInstances": [],
      "errors": []
    },
    "eu-west-1": {
      // Similar structure with findings for this region
    }
  }
}
  • stoppedInstances: List of EC2 instances currently stopped.
  • unattachedVolumes: EBS volumes available but not attached to any instance.
  • unassociatedEIPs: Elastic IP addresses allocated but not associated with any resource.
  • underutilizedInstances: Currently an empty array in this implementation (no logic populates it).
  • errors: Any errors encountered during data retrieval per region.

No binary data output is produced by this operation.

Dependencies

  • Requires valid AWS credentials with permissions to access EC2 and Elastic Load Balancing APIs.
  • Uses AWS SDK clients for Cost Explorer, EC2, and Elastic Load Balancing v2 services.
  • The node expects the user to configure AWS API credentials in n8n prior to execution.

Troubleshooting

  • Common issues:

    • Insufficient AWS IAM permissions may cause failures fetching EC2 or ELB data.
    • Network connectivity problems to AWS endpoints can result in timeouts or errors.
    • Selecting regions without resources may return empty findings arrays.
  • Error messages:

    • "Failed to fetch stopped instances: <error message>" indicates inability to retrieve stopped EC2 instances; verify EC2 read permissions.
    • "Failed to fetch unattached volumes: <error message>" signals issues accessing EBS volume information.
    • "Failed to fetch unassociated EIPs: <error message>" means Elastic IP data could not be retrieved.
    • "Failed to fetch idle Load Balancers: <error message>" points to problems querying ELB resources.
    • General error "General audit error: <error message>" covers unexpected exceptions during the audit.

To resolve these, ensure the AWS credentials have appropriate read-only permissions for EC2 and ELB services, and confirm network access to AWS APIs.

Links and References

Discussion