{"id":50886049,"url":"https://github.com/hops-ops/aws-spot-feed","last_synced_at":"2026-06-15T17:02:22.152Z","repository":{"id":350104165,"uuid":"1205256540","full_name":"hops-ops/aws-spot-feed","owner":"hops-ops","description":"Creates S3 bucket and SpotDatafeedSubscription for accurate spot instance pricing in OpenCost. One per AWS account.","archived":false,"fork":false,"pushed_at":"2026-04-08T22:12:38.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T23:30:00.875Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"KCL","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-08T19:41:14.000Z","updated_at":"2026-04-08T22:07:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hops-ops/aws-spot-feed","commit_stats":null,"previous_names":["hops-ops/aws-spot-feed"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hops-ops/aws-spot-feed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-spot-feed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-spot-feed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-spot-feed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-spot-feed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hops-ops","download_url":"https://codeload.github.com/hops-ops/aws-spot-feed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hops-ops%2Faws-spot-feed/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.191Z","updated_at":"2026-06-15T17:02:22.139Z","avatar_url":"https://github.com/hops-ops.png","language":"KCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-spot-feed\n\nCreates an S3 bucket and AWS Spot Datafeed Subscription for accurate spot instance pricing in OpenCost. One per AWS account.\n\n## Why Spot Feed?\n\n**Without Spot Feed:**\n- OpenCost reports on-demand pricing for spot instances, overstating costs\n- No visibility into actual spot savings\n- Cost allocation and chargeback are inaccurate\n\n**With Spot Feed:**\n- OpenCost reads actual spot pricing from the data feed\n- Accurate cost reports reflecting real spot discounts\n- Reliable chargeback for teams using spot instances\n\n## What It Creates\n\n- **S3 Bucket** - Receives spot pricing data from AWS\n- **BucketOwnershipControls** - Allows ACL-based writes from the spot feed service\n- **BucketPublicAccessBlock** - Blocks all public access\n- **SpotDatafeedSubscription** - Tells AWS to publish spot pricing to the bucket\n\n## Quick Start\n\n```yaml\napiVersion: aws.hops.ops.com.ai/v1alpha1\nkind: SpotFeed\nmetadata:\n  name: hops-root-account\n  namespace: default\nspec:\n  accountId: \"123456789012\"\n  region: us-east-1\n```\n\nThis creates a bucket named `hops-root-account-spot-feed` and subscribes the account's spot data feed to it.\n\n## Configuration\n\n### Required Fields\n\n| Field | Description |\n|-------|-------------|\n| `spec.accountId` | AWS Account ID |\n| `spec.region` | AWS region for the S3 bucket |\n\n### Optional Fields\n\n| Field | Default | Description |\n|-------|---------|-------------|\n| `spec.bucketName` | `{name}-spot-feed` | S3 bucket name |\n| `spec.prefix` | - | S3 key prefix for spot feed files |\n| `spec.providerConfigRef.name` | `\"default\"` | AWS ProviderConfig name |\n| `spec.tags` | `{\"hops\": \"true\"}` | Additional AWS resource tags |\n\n## Using with ObserveStack\n\nPoint your ObserveStack at the spot feed bucket to enable accurate spot pricing 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-1\n  spotFeed:\n    enabled: true\n    bucketName: hops-root-account-spot-feed\n    region: us-east-1\n```\n\nThis adds S3 read permissions to the OpenCost PodIdentity and configures the OpenCost exporter to read spot pricing from the feed.\n\n## Custom Bucket Name\n\n```yaml\napiVersion: aws.hops.ops.com.ai/v1alpha1\nkind: SpotFeed\nmetadata:\n  name: prod\nspec:\n  accountId: \"123456789012\"\n  region: us-west-2\n  bucketName: my-org-spot-pricing\n  prefix: spot-data/\n  tags:\n    environment: production\n```\n\n## Importing Existing Resources\n\nIf you already have a spot data feed subscription:\n\n```yaml\napiVersion: aws.hops.ops.com.ai/v1alpha1\nkind: SpotFeed\nmetadata:\n  name: existing\nspec:\n  accountId: \"123456789012\"\n  region: us-east-1\n  bucketName: existing-spot-bucket\n  managementPolicies: [Create, Update, Observe, LateInitialize]\n  bucket:\n    externalName: existing-spot-bucket\n  subscription:\n    externalName: existing-spot-bucket\n```\n\n## Status\n\n```yaml\nstatus:\n  ready: true\n  bucketName: hops-root-account-spot-feed\n  bucketArn: arn:aws:s3:::hops-root-account-spot-feed\n```\n\n## Important Notes\n\n- **One per account** - AWS allows exactly one spot data feed subscription per account\n- **Name your XR meaningfully** - The XR name (`metadata.name`) drives resource naming, e.g. `hops-root-account` → `hops-root-account-spot-feed`\n- **Convergence** - The subscription and bucket are created simultaneously; the subscription retries until the bucket is available\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-spot-feed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhops-ops%2Faws-spot-feed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhops-ops%2Faws-spot-feed/lists"}