Skip to content

Cloud & infrastructure

Connect an AWS account read-only via CloudFormation, with optional just-in-time write elevation.

AWS connects by deploying a CloudFormation stack that creates an IAM role Dave assumes. No access keys are stored.

  1. In the AWS Console, open the account menu (top right) and copy your 12-digit Account ID. It is also in any role ARN. You need the rights listed below.

  2. In Dave, go to Integrations → Add integration → AWS.

  3. Paste the AWS Account ID and pick the Primary region — the region you work in, and the one your organization allows stacks in.

  4. Set a Label — see labels.

  5. Leave Enable agentic JIT (advanced) off unless you want write elevation.

  6. Choose Connect AWS Account. Dave opens a prefilled CloudFormation stack.

  7. Check the console’s account and region match the ones you entered, then deploy the stack. Dave finishes connecting once it reaches CREATE_COMPLETE — keep the Dave tab open.

The stack is named DaveAgent- followed by eight characters of the connection ID, and is created in the primary region you picked. It creates one role, plus a second only if you enable agentic JIT. IAM roles are global, so Dave can read every region in the account; the primary region is just where commands run by default.

Role name: DaveAgent-xxxxxxxx-role. Attached AWS managed policy:

arn:aws:iam::aws:policy/ReadOnlyAccess

Inline policy DaveSelfInspection, so Dave can check what its own role is allowed to do:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["iam:SimulatePrincipalPolicy"],
"Resource": "*"
}
]
}

Both roles trust only Dave’s AWS account, and only with the external ID unique to this connection, which protects against the confused-deputy problem:

{
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::<Dave account ID>:root" },
"Action": "sts:AssumeRole",
"Condition": { "StringEquals": { "sts:ExternalId": "<external ID>" } }
}

Created only when Enable agentic JIT (advanced) is on. Role name: DaveAgent-xxxxxxxx-elevated-role, maximum session duration one hour. Attached AWS managed policy:

arn:aws:iam::aws:policy/PowerUserAccess

PowerUserAccess is the ceiling, not what Dave gets. Dave assumes this role only after a human approves a specific action, with an inline session policy limited to that action, for 15 minutes. You can replace the managed policy on the role with a narrower one; the session policy always narrows it further.

Whoever deploys the stack needs rights to create CloudFormation stacks and IAM roles in the account.

Everything Dave can do lives in the stack. To review or remove it, open CloudFormation → Stacks in the stack’s region and find DaveAgent-xxxxxxxx; its Resources tab lists the roles. You can also find them under IAM → Roles by searching DaveAgent-.

Disconnect in Dave stops Dave using the role immediately, but does not delete anything in AWS — Dave cannot delete its own role. While the connection is disconnecting, Open the provider console takes you to the stack: delete it there. The connection stays Disconnecting until the role is gone, then Dave confirms it is fully disconnected.

Cancelling an unfinished setup works the same way: if the stack already deployed, delete it.

Enable agentic JIT (advanced) creates a separate write-capable role. Every elevated action still requires explicit human approval, and leaving the option off keeps the account genuinely read-only — the elevated role is never created. See Elevated role for what it can do.

  • The console does not open — allow popups for Dave, or use Open the setup page on the connection.
  • Stack creation takes long — check the stack in the AWS Console reached CREATE_COMPLETE.
  • AWS rejects the connection — confirm the stack deployed in the account you entered, then choose Connect again. If the role still cannot be assumed, Dave offers the stack again under Open the setup page — it is safe to redeploy.