
What agents can do
Once connected, agents have access to the AWS Agent Toolkit — AWS’s official MCP service covering 15,000+ APIs across every AWS service:call_aws— execute any authenticated AWS API callsuggest_aws_commands— translate natural language to AWS API callsrun_script— run Python code with AWS API access in a sandboxed environmentsearch_documentation/read_documentation— search and read all AWS documentationget_presigned_url— generate pre-signed S3 URLs
ReadOnlyAccess; you control this entirely.
Before you start
You need permission to create IAM roles and identity providers in the target AWS account.Connect as many AWS accounts as you like. Each gets its own label and an isolated MCP server session, so a
production and a staging account never share credentials.Choose a setup method
Use the CloudFormation template
Fastest path. Tembo gives you a template that creates the OIDC provider and role for you.
Create the resources yourself
Use your own Terraform, CDK, Pulumi, or the AWS CLI. Full requirements below.
Option 1: Use the CloudFormation template
1
Open the connect modal
Go to Integrations and click Connect next to AWS. Enter a name for this account, for example
production.2
Deploy the stack
Click Create via CloudFormation to open a pre-filled stack in your AWS console, then deploy it.If that link returns “Access Denied”, download the template from the connect modal and upload it manually instead: in the CloudFormation console, choose Create stack → With new resources → Upload a template file, then supply your workspace ID when prompted.
3
Copy the role ARN
When the stack completes, open its Outputs tab and copy the
RoleArn value.4
Finish in Tembo
Back in the connect modal, switch to Enter ARN manually, paste the ARN, and click Connect.
Option 2: Create the resources yourself
Create two resources in the AWS account you want to connect, then hand Tembo the role ARN.Find your workspace ID
The role’s trust policy has to name the workspace allowed to assume it. In Tembo, go to Settings → Workspace and copy the value under Workspace ID. The value starts withorg_, because a workspace is an organization internally. That’s why the trust policy’s subject is org: followed by this value.
Requirements
Three details are easy to get wrong:
- The provider must live in the same AWS account as the role. AWS resolves the federated principal locally when the role is assumed, so a provider in another account will not work.
- The condition keys drop the scheme. They are
internal.tembo.io:sub, nothttps://internal.tembo.io:sub. - The subject is prefixed. If your workspace ID is
org_2vyf1Ja..., thesubvalue isorg:org_2vyf1Ja...— the literal stringorg:followed by the full ID.
The OIDC provider
Registerhttps://internal.tembo.io as an IAM OIDC identity provider with sts.amazonaws.com as the only audience.
You only need one per AWS account. IAM identity providers are global, so if you manage infrastructure per-region, create it once rather than once per region. If the provider already exists in the account, reuse it instead of creating a second one.
Thumbprints do not need maintaining. AWS verifies the JWKS endpoint’s TLS certificate against its own library of trusted root certificate authorities, and only falls back to the configured thumbprint if the certificate is not signed by one of those. Tembo’s endpoint uses a publicly trusted certificate, so a placeholder value of forty zeroes is fine.
The IAM role
Attach this trust policy, replacing the account ID and workspace ID:Trust policy
arn:aws:iam::aws:policy/ReadOnlyAccess and narrow or widen it to suit. Set the role’s maximum session duration to 3600 seconds to match the session length Tembo requests.
The role name does not matter — Tembo identifies the role by ARN.
Terraform
AWS CLI
Connect it
Paste the role ARN into the Tembo connect modal under Enter ARN manually and click Connect.Self-hosted Tembo: replace
internal.tembo.io throughout with your instance’s TEMBO_OIDC_ISSUER hostname, scheme stripped. Your instance must serve /.well-known/openid-configuration and /.well-known/jwks.json over public HTTPS, because AWS STS fetches the JWKS itself when a role is assumed — reachability from inside your own network is not enough.How authentication works
Tembo never stores AWS credentials. For each agent run:- Tembo mints a short-lived RS256 JWT (5-minute TTL) signed with its OIDC private key, carrying
issof the Tembo issuer,audofsts.amazonaws.com, andsuboforg:<your-workspace-id> - Tembo calls
sts:AssumeRoleWithWebIdentityagainst your role, presenting that JWT. This call carries no AWS credentials of its own — the token is the identity - STS finds the OIDC provider in your account matching the token’s issuer, fetches Tembo’s public JWKS to verify the signature, then evaluates your trust policy conditions
- The resulting temporary credentials (1-hour TTL) are injected into the agent’s sandbox and never leave it
Troubleshooting
"Access Denied" when opening the CloudFormation link
"Access Denied" when opening the CloudFormation link
The one-click URL fetches the template from an S3 bucket. If the bucket policy has not been updated, the AWS console returns an access denied error. Download the template from the connect modal and upload it manually instead — it creates identical resources.
AssumeRoleWithWebIdentity fails after deploy
AssumeRoleWithWebIdentity fails after deploy
Work through these in order:
- Provider URL exact match. It must be
https://internal.tembo.io— correct scheme, no trailing slash, no typos. STS matches the token’sissclaim against the registered provider URL exactly. - Provider is in the same account as the role. A provider in a different account is not usable.
subincludes theorg:prefix. The value isorg:org_2vyf1Ja..., notorg_2vyf1Ja....- Condition keys have no scheme.
internal.tembo.io:sub, nothttps://internal.tembo.io:sub. - Workspace ID matches. Compare against the value under Workspace ID in Settings → Workspace.
Credentials expire during a long agent run
Credentials expire during a long agent run
Sessions are 1 hour. If your role’s maximum session duration is lower than 3600 seconds, sessions will be shorter than expected — raise it to 3600.
Agent can't reach AWS APIs
Agent can't reach AWS APIs
The agent sandbox requires outbound access to
https://aws-mcp.us-east-1.api.aws for the AWS Agent Toolkit MCP service. On self-hosted deployments in a private network, confirm egress to that endpoint is allowed.Agent hits permission errors on AWS calls
Agent hits permission errors on AWS calls
The role’s policies decide what agents can do, and
ReadOnlyAccess is read-only by design. To allow writes, attach additional policies to the role. Note that ReadOnlyAccess does grant s3:Get*, so agents can read object contents — attach an explicit Deny if you need to keep specific buckets out of reach.Performance Insights or other encrypted data returns access denied
Performance Insights or other encrypted data returns access denied
Some AWS features encrypt data with a customer-managed KMS key and require the caller to hold
kms:Decrypt on that key. ReadOnlyAccess does not grant kms:Decrypt. Add a scoped statement to the role for the specific key, ideally conditioned on kms:ViaService so it is only usable through the owning service.