Documentation Index
Fetch the complete documentation index at: https://onecli.sh/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
OneCLI connects AI agents to AWS services (S3, EC2, Lambda, DynamoDB, and all other AWS APIs) through the gateway. The gateway handles SigV4 request signing, so agents make standard HTTP requests and credentials are injected transparently. OneCLI supports two connection methods for AWS:| Method | Plan | Credentials | Best for |
|---|---|---|---|
| Access Keys | Free | Long-lived IAM access keys | Personal use, quick setup |
| Cross-Account Role | Cloud | Temporary STS credentials (1hr TTL) | Teams, B2B, production |
Access Keys (Free)
The simplest way to connect. You create an IAM user in AWS, generate access keys, and paste them into OneCLI.Setup
Create an IAM user in AWS
Go to IAM > Users > Create user. Attach the permissions your agents need (e.g.,
AmazonS3ReadOnlyAccess).Generate access keys
In the user’s Security credentials tab, click Create access key. Select Third-party service as the use case. Copy the Access Key ID and Secret Access Key.
How it works
- Credentials are encrypted and stored by OneCLI
- When an agent sends a request to
*.amazonaws.com, the gateway intercepts it - The gateway signs the request using AWS SigV4 with the stored credentials
- The signed request is forwarded to AWS
Use cases
- Running
aws s3 lsthrough a coding agent - Agents deploying Lambda functions or managing CloudFormation stacks
- Querying DynamoDB or reading from S3 during code generation
Limitations
- Credentials are long-lived and don’t expire until manually rotated
- All agents with access to the connection share the same IAM permissions
- You can restrict access at the gateway level with rules (block specific hosts/paths), but not at the AWS IAM level per agent
Cross-Account Role (Cloud)
For teams and B2B deployments. Instead of sharing access keys, your AWS admin creates an IAM role in your account and grants OneCLI permission to assume it. OneCLI gets temporary credentials that expire after 1 hour and are automatically refreshed.Why use cross-account roles
- OneCLI never stores your long-lived AWS credentials. The IAM role trust policy is the only configuration on your side.
- STS AssumeRole returns credentials that expire in 1 hour. If they leak, exposure is limited.
- The IAM role’s policies define the maximum actions any agent can perform. You manage this in your own AWS account.
- OneCLI can pass session policies per agent, further restricting what each agent can do within the role’s permissions.
Setup
Get your External ID
Open the OneCLI dashboard, go to Connections > AWS (Cross-Account). You’ll see two values:
- OneCLI Account ID: the AWS account that will assume the role
- External ID: a unique identifier for your organization (auto-generated)
Create an IAM role in your AWS account
In the AWS console, go to IAM > Roles > Create role:
- Select Another AWS account
- Enter the OneCLI Account ID
- Check Require external ID and paste your External ID
- Do not check “Require MFA” (OneCLI is a machine identity)
- Click Next
AmazonS3ReadOnlyAccessfor read-only S3 access- A custom policy allowing specific actions on specific resources
OneCLI-Agent-Role) and create it.How it works
- When an agent sends a request to
*.amazonaws.com, the gateway intercepts it - The gateway calls STS AssumeRole using OneCLI’s own AWS identity, with your role ARN and External ID
- AWS returns temporary credentials (access key, secret key, session token) valid for 1 hour
- The gateway caches these credentials and signs the request using SigV4
- The signed request is forwarded to AWS
- When the cached credentials near expiry, the gateway calls AssumeRole again automatically
The permission model
Cross-account roles give you two layers of permission control:s3:*, but a specific agent’s session policy narrows it to s3:GetObject only. Session policies can only remove permissions, never add them.
Example: read-only vs full-access agents
Your AWS admin creates a role withAmazonS3FullAccess. In OneCLI, you configure:
| Agent | Session policy | Effective permissions |
|---|---|---|
deploy-agent | None (uses full role) | s3:* |
audit-agent | {"Statement":[{"Effect":"Allow","Action":"s3:GetObject","Resource":"*"}]} | s3:GetObject only |
Use cases
- B2B customers giving agents access to their AWS account with controlled permissions
- CI/CD agents that need temporary AWS access for deployments
- Multi-team environments where different agents need different permission levels
- Compliance-sensitive workloads where long-lived credentials are not acceptable
Comparison
| Access Keys | Cross-Account Role | |
|---|---|---|
| Plan | Free | Cloud |
| Credential type | Long-lived access keys | Temporary (1hr, auto-refreshed) |
| Setup complexity | Low (paste keys) | Medium (create IAM role + trust policy) |
| Security | Keys valid until manually rotated | Credentials expire automatically |
| Who holds keys | OneCLI stores your access keys | OneCLI only holds temporary tokens |
| Permission control | Gateway rules (host/path blocking) | IAM policies + per-agent session policies |
| Per-agent scoping | Same credentials for all agents | Different session policies per agent |
| Key rotation | Manual | Automatic (STS handles it) |
| Best for | Personal projects, quick testing | Production, teams, B2B |
Controlling access with rules
Both connection methods work with OneCLI’s rules engine. You can create rules to:- Block requests to
iam.amazonaws.comto prevent privilege escalation - Limit S3 write operations to 100/hour
- Flag destructive operations (e.g.,
DELETErequests) for manual approval