Pangea Docs FAQ Get early access

Docs / Clouds

AWS

Connect an AWS account so Pangea agents can work in it with short-lived, least-privilege credentials.

Pangea never stores long-lived AWS keys. You let Pangea assume an IAM role in your account through OIDC web-identity federation, pinned to your team. Each agent gets temporary credentials that expire after about an hour. The agent can then inspect and operate your AWS resources: EKS, EC2, ECS, Lambda, S3, CloudWatch, IAM and more.

Note

Connecting an account requires the Administrator role on your team. See the IAM trust model for the security design behind this flow.

Connect

In your AWS account you create:

  1. An OpenID Connect identity provider that trusts Pangea.
  2. An IAM role whose trust policy lets only your Pangea team assume it.
  3. A permissions policy on that role. Start read-only.

Then you paste the role ARN into Pangea. There are two ways to do this.

Option A: guided setup with the agent

If the AWS CLI is installed and signed in on your Mac, open Connectors → Connect → AWS and choose the guided path. Pangea opens an agent that runs the aws CLI on your computer. It creates the OIDC provider, the role and its policies, then binds the role for you. Review the proposed access before you authorize it.

Note

The guided flow uses your signed-in local AWS CLI. You never paste AWS keys into chat. Actions follow the conversation's permission mode. Full Access does not pause for runtime permission requests.

Option B: manual setup in the AWS console

The dialog in Connectors → Connect → AWS walks you through these steps and shows the values for your team.

1. Create the OIDC identity provider

In the IAM console, go to Identity providers → Add provider and choose OpenID Connect:

Field Value
Provider URL https://api.pangea.build
Audience sts.amazonaws.com

Click Add provider. If this AWS account already has the api.pangea.build provider, skip this step.

2. Create the IAM role

Go to IAM → Create role and pick Web identity as the trusted entity type. Choose the api.pangea.build provider and the sts.amazonaws.com audience. Then click Add condition:

Field Value
Key api.pangea.build:sub
Condition StringEquals
Value Your team's subject. Copy it from the dialog in Pangea.

The finished trust policy looks like this. Replace <your-account-id> with your 12-digit AWS account ID and <team-subject> with the value from the dialog:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Federated": "arn:aws:iam::<your-account-id>:oidc-provider/api.pangea.build"
      },
      "Action": "sts:AssumeRoleWithWebIdentity",
      "Condition": {
        "StringEquals": {
          "api.pangea.build:aud": "sts.amazonaws.com",
          "api.pangea.build:sub": "<team-subject>"
        }
      }
    }
  ]
}
Warning

Do not remove the api.pangea.build:sub condition. It pins the role to your team. Without it, any Pangea team could assume the role.

3. Attach a permissions policy

Start least-privilege and widen only as needed. A read-only baseline:

AdministratorAccess is simpler for a fresh or dedicated account, but it lets the agent change anything. Broader roles permit broader changes, even in Full Access. For a later IAM denial, see Cloud permission errors.

4. Name and create the role

Give the role any name, for example PangeaRole. Check that the trust policy shows both the aud and sub conditions, then click Create role.

5. Paste the role ARN into Pangea

Open the new role and copy its ARN from the Summary card. It looks like arn:aws:iam::123456789012:role/PangeaRole. Paste it into the dialog. Pangea reads your account ID from the ARN.

Verification

When you submit the role ARN, Pangea assumes the role before it saves the connection. If the trust policy is wrong, you get a role_not_assumable error right away. IAM changes take a few seconds to propagate, so Pangea retries briefly.

Tip

If verification fails, check that the provider URL is exactly https://api.pangea.build, the audience is sts.amazonaws.com, and the sub value matches the subject in the dialog exactly.

In the Pangea app

Once the account is connected, Pangea discovers what is in it:

What the agent can do for you

The agent uses the same access to investigate and operate for you. Ask it things like:

If a cloud operation returns an IAM denial, ask an authorized administrator for the narrowest change. See Cloud permission errors.

Permissions and authorization

Two boundaries govern this connector:

The IAM role is the outer limit. The agent can never exceed the permissions policy you attached.

How credentials work

Value
Trust mechanism IAM role assumed with sts:AssumeRoleWithWebIdentity (OIDC)
Issuer https://api.pangea.build
Per-team isolation The api.pangea.build:sub condition, set to your team's subject
Credential lifetime About 1 hour, minted on demand for each agent
What's stored Only the role ARN, never your AWS keys

Good to know

You can connect multiple AWS accounts, for example staging and production, and give each its own allow-list. A common pattern: production restricted to a small group with a read-only role, staging open to the whole team.