How I Connected Buzz Agents to AWS Without AWS Credentials

I wanted Bort, my new DevOps agent, to check production.
I did not want to give a raccoon AWS credentials.
I recently started using Buzz to organize the agents that help me manage my app and SaaS portfolio.
Before Buzz, I usually had several terminal windows open. Each one had its own Codex session and its own job. This worked, but the agents did not have clear or durable roles.
Buzz gave me a way to build a small team of named agents.
Bort is responsible for DevOps. I want him to watch the health of my AWS infrastructure, report problems, and eventually perform a small number of approved maintenance tasks.
That immediately created an access problem.
The obvious answer was to give Bort an AWS login.
It was also too much.
Bort did not need a cloud shell. He needed to answer one question:
What is the current health of my production systems?
So I built a smaller trust boundary:
- The agent proves its identity.
- The agent requests one named capability.
- AWS performs the work.
- AWS credentials stay inside AWS.
- The agent receives only a safe result.
The first capability is health.inspect.
The request path looks like this:
Buzz agent
-> signs a fixed request with its Nostr identity
-> AWS verifies the signature
-> AWS runs a read-only health collector
-> the agent receives a sanitized report
Bort never receives an AWS access key or session. He cannot choose an IAM role. He cannot decide which AWS operation to call.
He can ask one approved question and receive one bounded answer.
Direct AWS access solved the wrong problem
AWS Identity Center works well for people and trusted operator systems. I could create a separate Identity Center user for each agent.
But that would give the agent a much larger interface than it needs.
An AWS session token is a bearer credential. Any process that has the token can use it until it expires. A local AWS profile also does not isolate that token from other processes running as the same operating system user.
The agent would be able to request any operation permitted by its IAM policy.
That makes sense for a trusted operator.
It did not make sense for an agent that only needed a health report.
The useful distinction was:
The agent did not need AWS access. It needed access to one capability backed by AWS.
That distinction drove the rest of the design.
Identity is not authority
Each Buzz agent has a Nostr key pair.
The public key identifies the agent. The private key signs requests. A valid signature proves that the caller controls that identity.
But AWS IAM cannot use a Nostr public key as an IAM principal.
I needed an adapter between the two systems. I call it the broker.
The broker has two separate jobs:
-
Verify the Nostr identity.
-
Map that identity to a fixed capability.
The separation matters.
The agent does not say:
Use this AWS role.
It says:
Request
health.inspect.
The broker chooses the Lambda function and the exact input.
The agent cannot select an AWS account, EC2 instance, IAM role, command, or Systems Manager document.
Identity answers who is asking.
The broker decides what that identity is allowed to ask for.
The AWS request path
The first version uses API Gateway, Lambda, and DynamoDB:
Buzz agent
-> API Gateway
-> broker Lambda
-> health collector Lambda
-> six AWS project accounts
DynamoDB provides replay protection and stores separate comparison state for each observer.
The health collector already had read-only access to six AWS project accounts. It checks:
- EC2 instance health
- EBS volume health
- Systems Manager connectivity
- CloudWatch alarms
- AWS Backup recovery points
- Docker service state
- root disk use
- host I/O pressure
- RDS health when a project uses RDS
The agent cannot change that list.
Every request is signed
The request uses NIP-98, a Nostr standard for signed HTTP authentication.
The agent creates a Nostr event of kind 27235. Its signature is bound to:
- the exact HTTPS URL
- the HTTP method
- the SHA-256 hash of the request body
- a fixed audience
- the creation time
- a random nonce
The signed event travels in the HTTP authorization header.
The broker then verifies the request in this order:
-
Decode the authorization value.
-
Recompute the Nostr event ID.
-
Verify the Schnorr signature.
-
Require event kind
27235. -
Require a recent creation time.
-
Require exactly one URL tag.
-
Require exactly one method tag.
-
Require exactly one payload tag.
-
Require the fixed audience.
-
Require a valid random nonce.
-
Compare the signed values with the request that actually arrived.
-
Reject replays with an atomic DynamoDB write.
-
Check the verified public key against the capability allowlist.
Only then does the broker invoke the health collector.
An attacker cannot change the URL, method, or body after the request is signed. The same valid request cannot be replayed. An unknown public key cannot use the capability.
I had to add one bounded command to Buzz
Buzz is open source. Its command-line tool already had NIP-98 signing code for Git authentication.
It did not have a command for signing and sending this kind of fixed API request.
So I added one:
printf '{}\n' | buzz auth nip98-request \
--method POST \
--url https://<broker-url>/health/inspect \
--audience labounty-aws-broker \
--body -
The command:
- reads a small request body from standard input
- permits only
POST - requires HTTPS
- does not follow redirects
- creates a random nonce
- creates and signs the NIP-98 event
- sends the authorization header inside the CLI
- returns only the HTTP status and response body
It does not accept the private key as a command argument. It does not print the private key or authorization header.
I first installed the change as a separate pilot binary. A source-controlled wrapper checked the binary digest before each use.
The live pilot worked, so I prepared a focused contribution for Buzz:
I also published the AWS side:
The broker returns less than it knows
The health collector knows a lot about my infrastructure.
Bort does not need most of it.
The broker turns the raw collector result into a public report containing:
- the portfolio status
- the status of each project
- approved issue codes
- approved public issue messages
- an opaque report fingerprint
- a comparison with the previous observer result
The comparison is one of:
- initial
- unchanged
- changed
- recovered
The fingerprint lets the agent detect that something changed without exposing the AWS identifiers that changed.
The broker removes:
- AWS account IDs
- instance IDs
- volume IDs
- database identifiers
- role ARNs
- command IDs
- raw command output
- raw exception text
The broker also owns the public message for every known issue code. Unknown issue codes get a generic message.
That last rule is easy to overlook. A raw exception can contain an internal resource ID.
The minimum safe result was not the raw result with a few fields deleted. It was a new public response built from an allowlist.
What I will do next
The next work has three parts.
First, I want to move signing into a harness-owned signer so the raw Nostr private key leaves the agent shell.
Second, I will work with the Buzz maintainers on PR #2566. The bounded CLI command and the stronger signer cross different security boundaries, so they should remain separate changes.
Third, I want to add one controlled operator capability.
A package update plan is a useful next test. An agent can inspect available security updates and return a plan. It cannot install anything until I approve the exact action.
I do not need to give every agent an AWS account.
An agent needs an identity. The broker gives that identity a small capability. AWS performs the operation. The agent receives the minimum safe result.