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:What you will set up
- An AWS connection with IAM access keys or a cross-account role
- Automatic SigV4 signing on requests to
*.amazonaws.com - Per-action permissions and organization rules for AWS calls
How the gateway handles AWS requests
Quick example
An agent calling S3 through the gateway, with no AWS SDK or credentials needed:boto3, configure ~/.aws/credentials, or set environment variables. It makes a plain HTTP request and the gateway handles authentication.
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
AmazonS3ReadOnlyAccess).Generate access keys
Connect in OneCLI
- Access Key ID: your
AKIA...value - Secret Access Key: the secret
- Default Region: the AWS region to use (e.g.,
us-east-1)

The AWS connect window in OneCLI.
More about access keys: how it works, use cases, limitations
More about access keys: how it works, use cases, limitations
- 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
- Running
aws s3 lsthrough a coding agent - Agents deploying Lambda functions or managing CloudFormation stacks
- Querying DynamoDB or reading from S3 during code generation
- 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
- 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
- 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.Connect in OneCLI
arn:aws:iam::123456789012:role/OneCLI-Agent-Role).Back in the OneCLI dashboard, paste:- Role ARN: the ARN you just copied
- Default Region: the AWS region to use
More about cross-account roles: how it works, permission model, examples
More about cross-account roles: how it works, permission model, examples
- 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
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 agentsYour AWS admin creates a role with AmazonS3FullAccess. In OneCLI, you configure:- 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
Per-action permissions
Once connected, the dashboard shows a permissions panel where you control exactly what agents can do with AWS. Each action has three modes:- Read-only: allows listing and reading resources (S3 buckets, Lambda functions) while blocking writes and destructive operations
- Custom: configure each action individually
- List S3 buckets / Read S3 objects: browse and read from S3
- List Lambda functions / Get Lambda function: inspect serverless functions
- Access EC2: manage compute instances
- Access CloudWatch Logs: read monitoring and log data
Controlling access
Both connection methods are per agent: grant the connection to each agent that should use AWS. Organization rules then add guardrails that apply to everyone:- 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
FAQ
How do I rotate AWS access keys?
How do I rotate AWS access keys?
How do I keep AWS keys out of the agent's context?
How do I keep AWS keys out of the agent's context?
~/.aws/credentials or environment variables in the agent. Store the keys in OneCLI, and the gateway signs each request at the proxy. See How it works.Should I use access keys or a cross-account role?
Should I use access keys or a cross-account role?
Can I require approval for destructive AWS calls?
Can I require approval for destructive AWS calls?
DELETE requests for approval.