AWS Builder Center
It looks like you're trying to deploy Paperclip on AWS ๐Ÿ“Ž

It looks like you're trying to deploy Paperclip on AWS ๐Ÿ“Ž

In which we present 3 different ways to run Paperclip, the open source control plane for AI-agent companies, on AWS: ECS Fargate, EKS, and App Runner. Plus everything that went wrong the first time, so it doesn't go wrong for you.

Wait, which Paperclip? ๐Ÿ“Ž

Would you like help? [ Yes ] [ No ] [ Don't show me this tip again ]
No, not the office supply or the thought experiment where a runaway AI ย turns the entire universe into paperclipsย  (probably... please check your budget settings.)
ย Paperclipย  is an open source app for running a company staffed by AI agents. If an AI agent is an employee, Paperclip is the company.
It looks like a task manager.
Under the hood, though, it's org charts, budgets, approval gates, goal alignment and a heartbeat scheduler that keeps a whole team of agents (Claude Code, Codex, OpenCode, &c.) busy and accountable.
You define the goal. You hire the team. You approve the plan. The agents do the work.
Paperclip runs happily on your laptop with an embedded database and zero configuration.
But at some point every AI company wants to move out of its parents' basement and into the cloud โ˜๏ธ
That's where this post comes in.

More ways to run it on AWS ๐Ÿงญ

The Paperclip repo already had one AWS guide: ECS Fargate + RDS + EFS.
๏ปฟ
It's a great default, but it isn't the only way to host an app on AWS. So I wrote two more... just because:
  • Amazon EKS, for teams that already live in Kubernetes
๏ปฟ
  • AWS App Runner, for teams that want an HTTPS endpoint and nothing else to babysit
๏ปฟ
All three share the same backbone: the Paperclip container image in Amazon ECR, Amazon RDS for PostgreSQL 17 as the database, and secrets injected at runtime.
Where they differ is compute and storage:
๏ปฟ
ECS Fargate
EKS
App Runner
Compute
1 Fargate task
1 pod on managed nodes
1 App Runner instance
ย /paperclipย  storage
EFS (persistent)
EFS via CSI driver (persistent)
Ephemeral ๐Ÿ’จ + S3 for uploads
Front door
ALB + ACM
ALB via Load Balancer Controller + ACM
Built-in HTTPS + custom domain
Secrets
Secrets Manager
Kubernetes Secret
Secrets Manager
Updates
Rolling
ย Recreateย  (stop, then start)
Rolling
Rough cost
~$110-145/mo
~$205-265/mo
~$143/mo
Pick it if...
You want the recommended path
You already run Kubernetes
Agents don't need long-lived workspaces
โš ๏ธ One thing to know up front: Paperclip is a single-instance control plane. It runs one heartbeat scheduler and keeps agent workspaces on local disk. Every guide pins it to exactly one task, pod, or instance.
Think of it less like a server farm and more like a goldfish: one tank, one fish. Adding a second fish does not make it twice as fast ๐ŸŸ

Which one should I pick? ๐Ÿค”

๏ปฟ
ECS Fargate
EKS
App Runner
What you operate
VPC, ALB, task definition, EFS, RDS. AWS runs the hosts
All of ECS's list, plus cluster upgrades, node groups, and add-ons (EFS CSI driver, Load Balancer Controller)
VPC connector, NAT Gateway, RDS, S3. AWS runs compute, TLS, and deploys
Recurring chores
Few
Kubernetes version upgrades before standard support ends, node and add-on updates
Few
Scale to zero
ย desired-count 0ย 
Scale Deployment and node group to 0 (control plane and NAT keep billing)
ย pause-serviceย 
Cold-start tolerance
Paperclip is a long-running server, not a request handler. Its heartbeat scheduler runs every 30 seconds. When it's scaled to zero, no agent work runs and requests fail until you start it again. That's fine overnight, but not during the working day
same
same, and deploys take a few minutes (~5 minutes in my runs)
A bad deploy
Circuit breaker rolls back automatically
ย Recreateย  means downtime until you run ย kubectl rollout undoย 
The previous version keeps serving
How you find out
ALB target health, ECS service events
Probes, ALB target health, pod events
Service health, deployment events
Who gets paged
Whoever owns the AWS account
Whoever owns the cluster, often a platform team
Whoever owns the AWS account
Good first pick for
Most small teams
Teams that already run Kubernetes
Demos, and agents that don't need long-lived workspaces
Whichever you pick, set up one external check on ย /api/healthย  (a Route 53 health check or a CloudWatch Synthetics canary), send its alarm to SNS and on to your team chat, and add an AWS Budgets alert.
And remember there are two kinds of "unhealthy". AWS tells you when the control plane is down. Paperclip's inbox tells you when an agent run fails. Make sure both have an owner.

Before we start โœ…

You'll need:
  • An AWS account and the AWS CLI v2 (if you're still using v1, shame on you)
  • Docker
  • A domain you control (for TLS)
  • For EKS: ย eksctlย , ย kubectlย  and ย helmย 
  • An OpenAI or Anthropic API key for your agents

Fast lane ๐Ÿ๏ธ

Every guide follows the same numbered flow, so you can switch between them without feeling lost:
1/ Create an ECR repository and push the image
2/ Set up networking and security groups
3/ Create the RDS Postgres 17 instance
4/ Create storage (EFS or S3) and store secrets
5/ Deploy (task definition, Deployment, or App Runner service)
6/ Verify with ย curl https://$PAPERCLIP_DOMAIN/api/healthย 
7/ Create the first admin
8/ Lock down sign-ups
... and a full Teardown section, because nobody likes surprise bills.
๐Ÿ‘‰ The guides live in ย paperclipai/paperclip#14588ย  (currently in review):
  • ย docs/deploy/aws-eks.mdย , with templates in ย docker/eks/*.yamlย 
  • ย docs/deploy/aws-app-runner.mdย , with a template in ย docker/apprunner-service.jsonย 
Templates are rendered with ย sedย , just like the existing ECS task definition:
sed -e "s|<ACCOUNT_ID>|$AWS_ACCOUNT_ID|g" \
-e "s|<REGION>|$AWS_REGION|g" \
-e "s|<DOMAIN>|$PAPERCLIP_DOMAIN|g" \
docker/eks/deployment.yaml | kubectl apply -f -
No Helm chart, no CDK, no Terraform. Just files you can read, diff and copy.

Things that bit me (so they don't bite you) ๐Ÿฆˆ

Writing a deployment guide is easy.
Writing one that works means running it against a real AWS account... and I did, for both guides, end to end, including teardown.
Here's what the live runs (and a very persistent code-review bot ๐Ÿค–) found. Every one of these is fixed in the guides now.

1. RDS wants TLS. Always. ๐Ÿ”’

On RDS for PostgreSQL 15 and later, the default parameter group sets ย rds.force_ssl=1ย .
The original connection string didn't ask for TLS, so the very first boot died with:
PostgresError: no pg_hba.conf entry for host "<private-ip>", user "paperclip", database "paperclip", no encryption
Here's the fix:
DATABASE_URL="postgresql://paperclip:${DB_PASSWORD}@${RDS_ENDPOINT}:5432/paperclip?sslmode=require"

2. App Runner wants the whole secret ARN ๐Ÿ”‘

Secrets Manager appends a random 6-character suffix to every secret ARN.
App Runner wants all of it. Give it the "partial" ARN and you get the very helpful:
ResourceInitializationError: unable to pull secrets or registry auth
The guide now looks each one up:
secret_arn() {
aws secretsmanager describe-secret \
--secret-id paperclip/$1 --query ARN --output text
}

3. A VPC connector has no public IP ๐ŸŒ

App Runner reaches RDS through a VPC connector.
What's easy to miss: once you attach one, all outbound traffic goes through your VPC. The connector's network interfaces never get public IPs, so placing them in public subnets doesn't help.
No NAT Gateway means no calls to OpenAI, Anthropic or GitHub.
Your agents will be very well connected to the database... and to absolutely nothing else.
The guide now creates two private subnets and routes them through a NAT Gateway.

4. Clippy always defaults to "Yes" ๐Ÿ“Ž

Public Paperclip instances don't let the first visitor claim admin from the browser. That would make for a very exciting security model.
Instead, you run the setup wizard once in a throwaway container:
kubectl run paperclip-bootstrap -n paperclip --rm -it --restart=Never \
--image=$IMAGE --overrides='{ ... "envFrom": [{"secretRef": {"name": "paperclip-secrets"}}] ... }'
It prints a one-time invite URL. So far, so good.
Then it asks, cheerfully:
โ—† Start Paperclip now?
โ”‚ โ— Yes / โ—‹ No
The default is Yes.
Hit Enter and you now have a second Paperclip server talking to your production database.
(Ask me how I know ๐Ÿ™ƒ)
The guides now say it loud: use the arrow keys, pick No. They also start the wizard with ย HEARTBEAT_SCHEDULER_ENABLED=falseย , so an accidental second server can't wake any agents.
Bonus: the bootstrap pod gets ย DATABASE_URLย  through ย envFromย . The RDS password never shows up in the Pod spec, where anyone with ย get podsย  could read it.

5. Three AZs, two mount targets ๐Ÿ”๏ธ

ย eksctlย  creates private subnets in up to three Availability Zones.
The first EKS draft created EFS mount targets in two of them.
Guess where the scheduler put the pod?
Output: Failed to resolve "fs-<id>.efs.eu-west-1.amazonaws.com" - check that your file system ID is
correct, and ensure that the VPC has an EFS mount target for this file system ID.
The pod sat in ย ContainerCreatingย  forever.
Now there's a mount target in every private subnet, and the guide waits for the file system to be ย availableย  before creating them.

6. Kubernetes versions have an expiry date ๐Ÿฅ›

The first draft pinned Kubernetes 1.33.
By the time I ran it, 1.33 had moved to extended support, which EKS bills at a much higher control-plane rate.
The guide now uses 1.35 and shows you how to check what's in standard support:
aws eks describe-cluster-versions \
--query 'clusterVersions[?versionStatus==`STANDARD_SUPPORT`].clusterVersion' \
--output text

7. Who's PID 1? ๐ŸงŸ

Agents spawn a lot of short-lived processes: ย gitย , ย shย , ย esbuildย , CLI tools, &c.
When their parents exit, the orphans get adopted by PID 1. If PID 1 is ย nodeย , nobody ever reaps them. They pile up as zombies (~79 per hour, according to the Dockerfile comments) until every ย fork()ย  in the container fails.
That's why the Paperclip image runs ย tiniย  as PID 1.
It's also why the EKS Deployment template says, in capital letters, not to set ย command:ย , which would replace the image's entrypoint. There's now a test in the repo that fails if anyone adds ย command:ย , ย shareProcessNamespace: trueย  or an App Runner ย StartCommandย .
On the live cluster:
$ kubectl exec deploy/paperclip-server -n paperclip -- cat /proc/1/comm
tini
๐ŸงŸ โ†’ ๐Ÿชฆ

8. Codex wants its key per agent ๐Ÿค–

This one is less AWS and more Paperclip, but it will bite you on day one.
Putting ย OPENAI_API_KEYย  in the server environment is not enough for Codex agents. Paperclip's credential check only looks at the agent's own configuration, so the first run fails with ย configuration_incompleteย .
The fix is to give the agent its own key. The onboarding wizard wires this up for you if you pick Use API key instead.

9. Teardown has gotchas too ๐Ÿงน

  • Route table: it can't be deleted while subnets are still associated with it. Delete the subnets first.
  • Log groups: App Runner leaves them behind after you delete the service. The teardown now deletes them, scoped to the service ID so it doesn't wipe out the logs of your ย paperclip-server-stagingย  service by accident.
  • Snapshot name: both guides create a final RDS snapshot with the same name. Run both guides in one account and the second teardown will fail on it.

Meet Clip Happens ๐ŸŽฌ

Once the EKS deployment was healthy, I did the full first-time setup in the browser.
The company needed a name. It was always going to be Clip Happens.
1/ Accept the bootstrap invite and create the first admin account
๏ปฟ
2/ Name the organization
๏ปฟ
3/ Create the first agent (a Chief of Staff) and connect a model. I went with OpenAI API, which also gives the agent its key (see #8 above)
๏ปฟ
4/ Paperclip opens the first task and asks what you'd like to do. I asked for something small: "Draft a short welcome note (under 80 words) for new members of the Clip Happens team."
๏ปฟ
5/ The agent doesn't just go ahead. It proposes a plan and waits for approval. That's the "company" part of Paperclip: approval gates for governed actions
๏ปฟ
6/ Approve, and it creates a child task, writes the note, and posts it back
๏ปฟ
Welcome to Clip Happens! We're glad you're here. Bring your ideas, ask questions, and help us make good work happen. [...] Let's build something we're proud of, together.
7/ And the dashboard shows it all: runs, tasks, success rate, and a Month Spend of $0.00
A company of one agent, running on Kubernetes, writing welcome notes.
Clip happens ๐Ÿ“Ž

How much does it cost? ๐Ÿ’ธ

These are the guides' own rough estimates for running 24/7 at on-demand prices:
๏ปฟ
ECS Fargate
EKS
App Runner
Compute
~$70
~$193 (control plane + 2 nodes)
~$90
RDS (db.t4g.micro)
~$15
~$15
~$15
ALB
~$22
~$22
(included)
NAT Gateway
$0-35
~$35
~$35
Total
~$110-145/mo
~$205-265/mo
~$143/mo
A few ways to spend less:
  • ECS: Fargate Spot and scale to zero at night
  • EKS: scale the node group down (the control plane and NAT Gateway keep billing)
  • App Runner: ย pause-serviceย 
  • RDS: can be stopped for up to 7 days at a time
๐Ÿ’ก If you don't already run Kubernetes, EKS is roughly twice the price of ECS for the same single pod. That's the Kubernetes tax, and it's only worth paying if you already have Kubernetes.

Cleaning up ๐Ÿงนโœจ

Every guide ends with a teardown section, in reverse dependency order.
After both test runs, I checked <I forget how many> resource types across the region and IAM, from EKS clusters and CloudFormation stacks to NAT gateways, Elastic IPs, RDS snapshots and OIDC providers.
Nothing was left behind.
Please do the same. Nothing says "I care" to your finance team quite like an empty Cost Explorer.

Things I learned (the hard way) ๐Ÿง 

I built these guides with Claude riding shotgun and AWS grading the homework. Here are some lessons learned:
1. A guide you haven't run is a guide you haven't written.
The review bot caught the NAT, first-admin and route-table problems. Everything else (TLS, ARNs, the wizard default, the third AZ, the Kubernetes version, the Codex key) sailed through several rounds of review. The docs looked right.
AWS disagreed.
2. Defaults are where the bodies are buried.
ย rds.force_ssl=1ย . A wizard that defaults to ย Yesย . A Kubernetes version that quietly aged into extended support. A subnet selector that picked two AZs out of three.
Nothing was broken. Everything was just... default.
3. "Serverless" doesn't mean "stateless-friendly."
App Runner is lovely until your app assumes a disk that survives restarts.
For Paperclip, that means agent workspaces start from scratch on every deploy. That's a fine trade-off for some teams and a dealbreaker for others.
4. Guardrails beat good intentions.
"Don't override the entrypoint" is advice.
A test that fails the build when you do is a guardrail.

What's next? ๐Ÿš€

There's still plenty to do, e.g.
  • porting some of these fixes back to the ECS guide (ย sslmodeย , per-agent keys, &c.)
  • testing custom domains and HTTPS end to end (I didn't have a spare domain ๐Ÿ™ˆ)
  • rolling updates, rollback, and sign-up lockdown on live clusters
  • maybe, just maybe, some infrastructure-as-code
...and whatever AWS renames next.
If you try one of the guides, I'd love to hear which one you picked and what bit you.
It looks like you've reached the end of this post.
Would you like help deploying Paperclip?
[ Yes ] ๐Ÿ“Ž
๐Ÿ“ฉ Found a brand-new way for this to break? Tell me in the comments. I'm starting a collection ๐Ÿฆˆ

References ๐Ÿ“š

ย # awsย  ย # amazon-eksย  ย # aws-app-runnerย  ย # amazon-ecsย  ย # amazon-rdsย  ย # ai-agentsย  ย # open-sourceย 
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article