{"id":50886055,"url":"https://github.com/hops-ops/aws-cost-report","last_synced_at":"2026-06-15T17:02:22.660Z","repository":{"id":353249585,"uuid":"1206420896","full_name":"hops-ops/aws-cost-report","owner":"hops-ops","description":"Creates CUR export, Glue catalog, and Athena workgroup for cloud cost visibility via OpenCost. One per AWS account.","archived":false,"fork":false,"pushed_at":"2026-04-23T03:48:42.000Z","size":19,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-23T05:31:32.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go Template","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hops-ops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-09T22:39:36.000Z","updated_at":"2026-04-23T03:48:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hops-ops/aws-cost-report","commit_stats":null,"previous_names":["hops-ops/aws-cost-report"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hops-ops/aws-cost-report","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-cost-report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-cost-report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-cost-report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-cost-report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hops-ops","download_url":"https://codeload.github.com/hops-ops/aws-cost-report/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-cost-report/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34372130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-15T17:02:21.680Z","updated_at":"2026-06-15T17:02:22.653Z","avatar_url":"https://github.com/hops-ops.png","language":"Go Template","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-cost-report\n\nCreates a CUR export, Glue catalog, and Athena workgroup for full AWS cloud cost visibility via OpenCost. One per AWS account.\n\n## Why CUR/Athena?\n\n**Without CUR integration:**\n- OpenCost only sees on-demand and spot compute pricing\n- No visibility into reserved instance savings, savings plans, or data transfer costs\n- Cost allocation is incomplete — only ~60-70% of actual AWS spend\n\n**With CUR/Athena:**\n- OpenCost queries the full AWS bill via Athena\n- Accurate RI/SP amortization, data transfer, and service-level costs\n- Complete cost attribution across teams and workloads\n\n## What It Creates\n\n- **S3 Bucket** — Receives CUR export data (Parquet) and stores Athena query results\n- **BucketOwnershipControls** — Enforces bucket owner for all objects\n- **BucketPublicAccessBlock** — Blocks all public access\n- **BucketPolicy** — Allows AWS billing service (`billingreports.amazonaws.com`) to write CUR data\n- **CUR ReportDefinition** — Daily Parquet export with Athena integration\n- **IAM Role + Policy + RolePolicyAttachment** — Glue crawler credentials (S3 read + Glue catalog write)\n- **Glue CatalogDatabase** — Database for CUR tables\n- **Glue Crawler** — Auto-discovers CUR Parquet schema and creates Athena-queryable tables\n- **Athena Workgroup** — Query execution with results stored in the same S3 bucket\n\n## Quick Start\n\n```yaml\napiVersion: aws.hops.ops.com.ai/v1alpha1\nkind: CostReport\nmetadata:\n  name: hops-root-account\n  namespace: default\nspec:\n  accountId: \"123456789012\"\n  region: us-east-2\n```\n\nThis creates all resources with sensible defaults. The bucket is named `hops-root-account-cur`, the CUR report is `hops_root_account_cur`, and the Glue database matches.\n\n## Configuration\n\n### Required Fields\n\n| Field | Description |\n|-------|-------------|\n| `spec.accountId` | AWS Account ID |\n| `spec.region` | AWS region for S3, Glue, and Athena resources |\n\n### Optional Fields\n\n| Field | Default | Description |\n|-------|---------|-------------|\n| `spec.bucketName` | `{name}-cur` | S3 bucket name |\n| `spec.reportName` | `{name}_cur` | CUR report name (dashes auto-converted to underscores) |\n| `spec.databaseName` | `{name}_cur` | Glue database name (dashes auto-converted to underscores) |\n| `spec.providerConfigRef.name` | `\"default\"` | AWS ProviderConfig name |\n| `spec.tags` | hops defaults | Additional AWS resource tags |\n\n## Using with ObserveStack\n\nPoint your ObserveStack at the cost report resources to enable cloud cost integration in OpenCost:\n\n```yaml\napiVersion: aws.hops.ops.com.ai/v1alpha1\nkind: ObserveStack\nmetadata:\n  name: my-cluster\nspec:\n  clusterName: my-cluster\n  aws:\n    region: us-east-2\n  cloudCosts:\n    enabled: true\n    bucketName: hops-root-account-cur\n    accountId: \"123456789012\"\n    region: us-east-2\n    databaseName: hops_root_account_cur\n    tableName: hops_root_account_cur\n    workgroupName: hops-root-account-cur-workgroup\n```\n\nThis creates a `cloud-integration.json` secret, adds Athena/Glue/S3 IAM permissions to the OpenCost PodIdentity, and enables cloud cost reporting in the OpenCost Helm values.\n\n## Custom Names\n\n```yaml\napiVersion: aws.hops.ops.com.ai/v1alpha1\nkind: CostReport\nmetadata:\n  name: prod-billing\nspec:\n  accountId: \"123456789012\"\n  region: us-east-2\n  bucketName: my-org-cur-data\n  reportName: my_org_daily_cur\n  databaseName: my_org_billing\n  tags:\n    environment: production\n```\n\n## Importing Existing Resources\n\nIf you already have CUR infrastructure:\n\n```yaml\napiVersion: aws.hops.ops.com.ai/v1alpha1\nkind: CostReport\nmetadata:\n  name: existing\nspec:\n  accountId: \"123456789012\"\n  region: us-east-2\n  bucketName: existing-cur-bucket\n  managementPolicies: [Create, Update, Observe, LateInitialize]\n  bucket:\n    externalName: existing-cur-bucket\n  crawlerRole:\n    externalName: existing-crawler-role-name\n```\n\n## Status\n\n```yaml\nstatus:\n  ready: true\n  bucketName: hops-root-account-cur\n  bucketArn: arn:aws:s3:::hops-root-account-cur\n  databaseName: hops_root_account_cur\n  workgroupName: hops-root-account-cur-workgroup\n  crawlerRoleArn: arn:aws:iam::123456789012:role/hops-root-account-cur-crawler\n```\n\n## Important Notes\n\n- **One per account** — CUR is account-level; deploy one CostReport per AWS account\n- **CUR delivery delay** — AWS takes up to 24 hours to start delivering CUR data after the report is created\n- **Crawler scheduling** — The Glue crawler runs on-demand; you may need to trigger the first run manually after CUR data arrives\n- **Athena costs** — Athena charges ~$5/TB scanned; CUR Parquet data is compressed so typical queries cost pennies\n- **Name your XR meaningfully** — The XR name drives all resource naming (e.g., `hops-root-account` → `hops-root-account-cur`)\n\n## Development\n\n```bash\nmake render         # Render all examples\nmake test           # Run KCL composition tests\nmake e2e            # Run E2E tests (requires AWS credentials)\nmake validate       # Validate rendered output against schemas\n```\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhops-ops%2Faws-cost-report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhops-ops%2Faws-cost-report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhops-ops%2Faws-cost-report/lists"}