Troubleshooting
Overview
Section titled “Overview”This guide addresses common issues encountered when using FinFocus, including installation problems, AWS credential errors, cost calculation issues, and E2E test failures.
Table of Contents
Section titled “Table of Contents”- Installation Failures
- AWS Credential Problems
- Cost Calculation Errors
- E2E Test Timeouts
- Resource Cleanup Issues
Installation Failures
Section titled “Installation Failures”Plugin Installation Fails
Section titled “Plugin Installation Fails”Symptom: finfocus plugin install returns an error or hangs.
Solutions:
- Network: Check your internet connection. Plugins are downloaded from GitHub Releases.
- Rate Limits: GitHub API rate limits may apply. Try setting
GITHUB_TOKEN. - Permissions: Ensure the
~/.finfocus/plugins/directory is writable.
mkdir -p ~/.finfocus/pluginschmod -R 755 ~/.finfocus/pluginsBinary Not Found
Section titled “Binary Not Found”Symptom: command not found: finfocus
Solution: Add the installation directory to your PATH.
export PATH=$PATH:$HOME/go/bin# or where you installed itAWS Credential Problems
Section titled “AWS Credential Problems”Access Denied
Section titled “Access Denied”Symptom: AccessDeniedException when running actual cost queries.
Solution:
The configured AWS credentials must have ce:GetCostAndUsage permission. Ensure your IAM policy includes:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["ce:GetCostAndUsage", "ce:GetDimensionValues", "ce:GetTags"], "Resource": "*" } ]}See AWS Cost Explorer API Permissions for additional guidance on Cost Explorer access and IAM policy best practices.
Profile Not Found
Section titled “Profile Not Found”Symptom: Profile 'default' not found
Solution:
Check ~/.aws/credentials or export credentials directly:
export AWS_PROFILE=my-profileCost Calculation Errors
Section titled “Cost Calculation Errors”Zero Costs Reported
Section titled “Zero Costs Reported”Symptom: Projected costs show $0.00 for supported resources.
Causes:
- Unsupported Region: The resource is in a region not supported by the embedded database.
- Missing Properties: Required properties (like
instanceType) are missing from the Pulumi plan. - Plugin Issue: The
aws-publicplugin might not be installed or discovered.
Debug:
Run with debug logging to see plugin selection:
finfocus --debug cost projected --pulumi-json plan.jsonMismatch Between Projected and Actual
Section titled “Mismatch Between Projected and Actual”Symptom: Actual costs are significantly higher than projected.
Explanation:
- Taxes/Credits: Actual costs include taxes and credits; projected do not.
- Data Transfer: Data transfer costs are hard to predict and are usually excluded from projections.
- Storage: S3 API requests and tiered storage costs accumulate over time.
E2E Test Timeouts
Section titled “E2E Test Timeouts”Test Suite Hangs
Section titled “Test Suite Hangs”Symptom: make test-e2e runs for >20 minutes.
Solution:
-
Check Resources: Cloud resource creation (e.g., RDS) can be slow.
-
Increase Timeout:
Terminal window go test -timeout 30m ./test/e2e/... -
Region Latency: Switch
AWS_REGIONto a closer region (e.g.,us-east-1->us-west-2).
Resource Cleanup Issues
Section titled “Resource Cleanup Issues”Leftover Resources
Section titled “Leftover Resources”Symptom: E2E tests failed but resources remain in AWS.
Solution:
Use the cleanup utility or manually delete resources tagged with finfocus-e2e.
# Example manual cleanupaws ec2 terminate-instances --instance-ids i-xxxx