Add self-hosted cloud agent lab#35
Open
hsaab wants to merge 4 commits into
Open
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
The data block was declared but never referenced in locals, resources, outputs, or user_data template, causing an unnecessary STS API call on every plan/apply. Co-authored-by: Hassan Saab <hsaab@users.noreply.github.com>
The connected == 0 early-return path only applied min_capacity but not max_capacity, unlike the normal path. If desired count exceeded max_capacity (e.g. manual adjustment), RecommendedCapacity and scale-out could propagate the uncapped value. Co-authored-by: Hassan Saab <hsaab@users.noreply.github.com>
Author
|
@ericzakariasson ready for your review when you get a moment! |
Use boundary-aware token matching instead of plain substring checks when correlating Cursor workers to ECS task private IPs. Prevents 10.0.1.2 from matching ip-10-0-1-20.ec2.internal or 10.0.1.20, which inflated Connected counts and suppressed UtilizationPercent. Co-authored-by: Hassan Saab <hsaab@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high mode and found 2 potential issues.
Reviewed by Cursor Bugbot for commit 02452a3. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
cloud-agent, with EC2, ECS/Fargate, and EKS/Helm setup guides.Test plan
git diff --check origin/main...HEAD.Made with Cursor
Note
Medium Risk
Adds substantial new Terraform/Lambda and Kubernetes/Helm automation that provisions AWS infrastructure and manipulates ECS desired count; main risk is misconfiguration or unexpected cloud cost/permission scope rather than changes to existing runtime code.
Overview
Adds a new
cloud-agent/lab documenting and automating self-hosted Cursor Cloud Agent workers on customer-managed AWS infrastructure (EC2+Docker, ECS/Fargate, and EKS+Helm).Includes a shared worker Docker image + entrypoint, example labels, a
Makefilefor local build/ECR publish and deployment helpers, and ignore rules to keep.env, credentials, and Terraform state out of git.Provides Terraform scaffolds for EC2 (ECR + Secrets Manager + IAM + SSM-accessible instance bootstrap) and ECS/Fargate (ECS service + CloudWatch logs + Application Auto Scaling driven by a scheduled Lambda metrics publisher that computes service-scoped worker utilization). Adds Helm manifests/scripts for EKS using Cursor’s worker-set controller plus an optional Prometheus/CronJob-based autoscaler. Updates the root
README.mdto link the new lab.Reviewed by Cursor Bugbot for commit 02452a3. Bugbot is set up for automated code reviews on this repo. Configure here.