
What agents can do
Once connected, agents can run AWS CLI commands and programs that use an AWS SDK. Each enabled integration can be configured as a standard AWS profile inside the agent sandbox. Agents can list the accounts available to your workspace:tembo aws profiles.
The exec command authenticates on demand and limits the selected profile to its child process. This makes it safe to use different AWS accounts concurrently in one session without changing ambient credentials.
Agents can only do what the IAM role permits. The default is 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. Every enabled AWS integration is available to every session and automation in your workspace; it does not have to be assigned when a session starts. The agent explicitly selects an account for each command.
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 long-lived AWS credentials. Authentication begins only when an agent uses an AWS integration:- The agent lists the enabled AWS integrations in your workspace and explicitly selects one for a command.
- Tembo configures standard AWS profiles that use a credential helper. No static access keys are written to the AWS config.
- When the selected profile needs credentials, Tembo mints a short-lived RS256 JWT (5-minute TTL) signed with its OIDC private key. It carries an
issof the Tembo issuer, anaudofsts.amazonaws.com, and asuboforg:<your-workspace-id>. - Tembo calls
sts:AssumeRoleWithWebIdentityagainst the selected role. This call carries no AWS credentials of its own — the token is the identity. - STS finds the OIDC provider in your account, verifies the JWT with Tembo’s public JWKS, evaluates your trust policy, and returns temporary credentials with a 1-hour TTL.
- The credential helper caches those temporary credentials in the sandbox and refreshes them when needed while the sandbox or authorized runtime remains active and the integration remains enabled.
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.
No AWS integrations are available
No AWS integrations are available
The workspace does not have an enabled AWS integration. Connect one from Settings → Integrations, then retry the command. Sessions and automations that do not use AWS continue to work normally.
An AWS profile selector is ambiguous or not found
An AWS profile selector is ambiguous or not found
List the enabled profiles again and use the generated profile name or integration ID. Environment labels and AWS account IDs are convenient selectors, but they may match more than one integration.
Credentials stop refreshing during a long-running command
Credentials stop refreshing during a long-running command
Credentials refresh while the sandbox or authorized runtime remains active and the integration remains enabled. Refresh fails closed if the runtime is no longer authorized or the AWS integration is disabled, removed, or no longer belongs to the workspace.
Agent can't reach AWS APIs
Agent can't reach AWS APIs
During authentication, the sandbox credential helper contacts the Tembo API, and the Tembo API calls AWS STS. On self-hosted deployments in a private network, confirm that:
- The Tembo API or control plane has outbound HTTPS access to AWS STS.
- The agent sandbox has outbound HTTPS access to the AWS service endpoints used by the child command.
- The agent sandbox only needs access to AWS STS when the child command itself calls STS.
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.