About AWS
Amazon Web Services (AWS) is a public-cloud platform offering on-demand compute, storage, database, identity, and networking services. The Serval AWS integration is multi-product: connecting an AWS account once gives your workflows access to every supported AWS service (see the capability table below) - limited only by the permissions on the IAM role you delegate. Each connected AWS account is its own app instance keyed by its 12-digit account ID. To work across many accounts in an AWS Organization, connect the organization: Serval then creates a connection for each member account. Alternatively, connect one account and let workflows reach your other accounts through a standard role in each (see Reach member accounts from one connection). Authentication: Cross-account IAM role assumption (STS AssumeRole with an External ID). Serval never stores long-lived AWS keys - only your Role ARN and a Serval-generated External ID, exchanged at runtime for short-lived 15-minute session credentials. Data sync: No user or identity sync. The only background sync ingests IAM roles tagged with the key “serval” (including their inline and attached policies) to power temporary role access; everything else is on-demand from workflows.What the AWS integration enables
region argument - pass us-east-1.
Use DevOps Agent
DevOps Agent uses your existing AWS connection. You don’t need to reconnect, change the Role ARN or External ID, or update existing AWS workflows. The Agent Space ID and AWS Region are workflow inputs, not new connection settings.- Create an Agent Space in AWS and configure its resource access and observability integrations.
- Select the AWS connection for that account, or use your existing member-account role routing.
- Add the permissions below to the role used by the workflow, scoped to that Agent Space. Keep the role’s existing permissions for other AWS services. Grant only the actions your workflow needs.
aws.devopsAgent.createChat and sendMessage for questions and follow-ups. Keep the returned conversation reference for later messages. For investigations, use createInvestigation with a stable idempotency token, then waitForInvestigation, listExecutions, and listJournalRecords. Follow returned pagination tokens when reading findings.
Questions and investigation prompts can invoke the Agent Space’s tools, so they use Serval’s approval policy for mutating actions. Check the returned status before presenting a completed answer. This integration doesn’t provision Agent Spaces, approve remediation, or configure agent handoffs. The invocation policy above doesn’t grant the Agent Space access to your workloads; configure that separately in AWS.
Get your credentials
Serval connects to AWS by assuming an IAM role in your account, following AWS’s standard pattern for delegating access to another AWS account. You create the role, tell it to trust Serval’s AWS account for your region with an External ID, and attach whatever permission policies your workflows need - Serval mandates no permissions of its own. Each Serval region runs in its own AWS account, so the account your role trusts depends on where your organization is hosted. Check the address you sign in at, and ask support@serval.com if you’re unsure which region you’re on.Open the Connect AWS dialog in Serval
Create a cross-account role in AWS
Enter the Serval account and External ID
Attach permission policies
Name and create the role
Add the TagSession statement to the trust policy
sts:TagSession statement alongside the existing sts:AssumeRole statement. Both statements use the Serval account principal; keep the sts:ExternalId condition on the AssumeRole statement. Pick the tab for your region and replace <EXTERNAL_ID> (including the angle brackets) with the External ID shown in the Connect AWS dialog:- United States (US1)
- European Union (EU1)
- Self-hosted
Copy the Role ARN
Connect in Serval
Open Integrations → All integrations → AWS → Connect
Role ARN (required)
Connection name (required)
Connect AWS
Verifying the connection
After connecting, run the health checks from the app instance page. Test AWS Connection - verifies Serval can assume your cross-account role by making a minimal IAM read call.- Success: “Successfully authenticated with AWS”
- Role assumption fails (for example, a trust policy naming the wrong Serval account or lacking
sts:TagSession, an External ID mismatch, or a nonexistent role): “Unable to authenticate with AWS. Please verify your cross-account role ARN and external ID are correct.” - If role assumption works but the role can’t read IAM: “Connection successful, but IAM role lacks iam:ListRoles permission.”
- If role assumption works but the IAM request fails for another reason: “Authenticated with AWS, but the IAM ListRoles request failed.”
iam:ListRoles message confirms that role assumption succeeded. DevOps Agent actions don’t require this permission. Add it only if you want the generic health check to pass, and verify DevOps Agent access by running a DevOps Agent action.
List AWS Organization Accounts - verifies the role can list accounts in your AWS Organization.
- Success: “Successfully retrieved [number] accounts from AWS Organizations”
- Role assumption fails: “Unable to authenticate with AWS. Please verify your cross-account role ARN and external ID are correct.”
- Standalone account (not in an Organization): “This AWS account is not part of an AWS Organization.”
- Permission missing but auth working: “Connection successful, but IAM role lacks organizations:ListAccounts permission.”
- Any other failure, such as throttling or a network problem (ignore the permission advice and read the error shown beneath the message): “Unable to access AWS Organizations. Ensure the IAM role has organizations:ListAccounts permission.”
Connect an AWS Organization
If your AWS accounts belong to an AWS Organization, connect the organization once. Serval then connects each member account for you. How it works:- Hub role: you create a role in the management account or in a delegated administrator account. Serval assumes it with your team’s External ID to read the organization’s accounts and organizational units (OUs). Serval reads the organization again every 15 minutes.
- Member role: you deploy a role named
ServalMemberRoleto member accounts with a service-managed CloudFormation StackSet from Serval’s template. The member role trusts Serval’s AWS account directly, not the hub role, and requires your team’s External ID. - Child connections: Serval assumes each member role and creates one AWS connection for each member account it can reach. Your team owns these child connections. Workflows, ingestion, and health checks use them like any other AWS connection.
Create the hub role
Create the hub role in the management account or in a delegated administrator account.-
Create a role whose trust policy matches the one in Get your credentials for your region. It allows
sts:AssumeRolefrom Serval’s AWS account with your team’s External ID, plussts:TagSessionfor the same account. -
Attach this permissions policy:
The “Test AWS Connection” health check calls
iam:ListRoles. - Copy the Role ARN.
Connect the organization in Serval
Open the Connect AWS dialog
Choose Organization
ServalMemberRole when deploying the template. A new StackSet is not required to reuse correctly configured existing roles.Enter the discovery role and connection name
Connect AWS
- “Serval could not assume the AWS role; check that its trust policy allows Serval’s AWS account and this team’s External ID”: the trust policy names the wrong account or the External ID doesn’t match.
- An error that names an
organizations:action: the hub role lacks that permission. - An error about the account: Serval accepts only the management account or a registered delegated administrator.
Deploy the member role
If the member roles already exist and trust Serval directly with this connection’s External ID, you can reuse them. Select Sync now to check access. To deploy missing roles, open Set up member account access → Deploy missing roles with a StackSet on the organization connection’s page. It includes:- A Download template button that saves the member role template,
serval-member-role.yaml. - Every template parameter with its default value.
- An Open StackSet setup in the AWS console link.
- AWS CLI commands to copy with Copy commands.
- AWS console
- AWS CLI
- On the connection’s page, select Download template.
- In the management account, go to CloudFormation → StackSets → Create StackSet, or select Open StackSet setup in the AWS console on the connection’s page.
- Choose Service-managed permissions.
- Choose Upload a template file and select
serval-member-role.yaml. - Enter the parameters shown on the connection’s page.
- Deploy to the organization, or to specific OUs.
- Choose one Region only. IAM is global, so a second Region fails.
- Keep automatic deployment on, so new accounts in the targeted OUs get the role.
- Acknowledge that the template creates IAM resources with custom names, and submit.
RoleName for that stack instance only.
The template takes these parameters:
Sync member accounts
On the organization connection’s page, select Sync now. The Member accounts table refreshes while the sync is pending or running. Each run checks up to 500 accounts; larger organizations continue from the saved position on the next scheduled run. Each member account has one of these statuses:- Existing connections: if your team already connected a member account by hand, the sync links that connection instead of creating a duplicate. If two of your team’s connections hold the same account, the member stays Not connected and the error names both connections.
- Removing the organization: when you remove the organization connection, Serval turns off its child connections.
Change member role permissions
To change what Serval can do in member accounts, update the StackSet parameters.- In the management account, go to CloudFormation → StackSets in the Region where you created the StackSet.
- Select the StackSet, then choose Actions → Edit StackSet details.
- Choose Use current template.
- Change the parameter values.
- On the deployment options page, enter the organization root ID or the same OU IDs you deployed to, and the same Region. The root ID looks like
r-ab12. Find it in AWS Organizations → AWS accounts next to Root, or on the StackSet’s Stack instances tab. - Acknowledge the IAM resources and select Submit.
- Wait until the stack instances show CURRENT.
- Your own policies:
AdditionalManagedPolicyArnstakes AWS managed policies only. A customer managed policy’s ARN contains its account ID, so attach your own policies toServalMemberRoleyourself, for example with your own StackSet. Updating the Serval StackSet keeps policies attached outside it. - Different permissions per OU or account: use StackSet parameter overrides on those stack instances.
Use member accounts in workflows
Child connections are regular AWS connections, so workflows target them the same way. This workflow lists a few IAM roles in every connected AWS account:aws.context.AWSIntegrationFromServiceInstanceID<"member", "<12-digit account ID>"> instead.
Troubleshoot an organization connection
"Test AWS Connection" says the role lacks iam:ListRoles
"Test AWS Connection" says the role lacks iam:ListRoles
iam:ListRoles on the hub role. Add iam:ListRoles to the hub role’s permissions.A member account shows Connection lost
A member account shows Connection lost
- The account’s stack instance shows CURRENT.
- The stack instance’s
RoleNamematches the connection’s Member account role name. - The stack instance’s
ServalExternalIdmatches your team’s External ID.
"Serval could not assume the AWS role" when you connect
"Serval could not assume the AWS role" when you connect
Editing the StackSet asks for OU IDs
Editing the StackSet asks for OU IDs
r-ab12, to keep deploying to the whole organization. It’s in AWS Organizations → AWS accounts next to Root, and on the StackSet’s Stack instances tab.Reach member accounts from one connection
If you don’t want a connection for each member account, one connection can reach every account in your AWS Organization:- Connect one account, called the hub.
- Deploy a standard IAM role to each member account.
- Workflows assume that role in whichever account they need.
Connect the hub account
Let the hub role list accounts and assume member roles
serval/ServalReadOnly with the path and name you give the member role in the next step.Deploy a member role to every account
sts:AssumeRole and sts:TagSession. Serval’s sessions carry session tags, and AWS passes those tags along when the hub role assumes another role. Replace <HUB_ACCOUNT_ID> and <HUB_ROLE_NAME> with your hub role’s account ID and name:ec2:DescribeInstances for EC2 inventory, or AWS’s ViewOnlyAccess managed policy for read-only lookups.To cover every account, including ones you add later, deploy the role with a CloudFormation StackSet:- Use service-managed permissions and turn on automatic deployment.
- Target a single Region. IAM roles are global, so deploying to a second Region fails.
- StackSets don’t deploy to the management account. Create the role there by hand only if workflows need it.
Target member accounts from workflows
aws.context.forAccount the member account ID, the member role’s path and name, and a Region. It then passes the result to any AWS action, the same way it passes its own context:aws.organizations.apiRequest (listAccounts) on the hub connection first.To inventory EC2 instances without writing a workflow, install the prebuilt ingestion (Inventory EC2 across the organization).- Short sessions: each member-account call uses a 15-minute session on the member role. CloudTrail in the member account records these sessions under the name
serval-workflow. - No fallback: if Serval can’t assume the member role, the action fails. It never falls back to the hub account.
- Your IAM policies set the boundary: Serval doesn’t check AWS Organizations membership before assuming a role. The hub role’s
sts:AssumeRolepermission and each member role’s trust policy decide which accounts and roles workflows can reach. - Separate External ID: Serval’s External ID protects only the hub role. If a member role’s trust policy requires its own External ID, pass it to
aws.context.forAccountasexternalId. - Commercial Regions only: member-account access doesn’t support China or AWS GovCloud (US) Regions.
Inventory EC2 across the organization
The Ingest EC2 from AWS Organization workflow syncs EC2 instances from every active account in the organization into a Databases item type, through the member role. Each full sync finds the accounts again, so it picks up an account you add once its member role exists.- On the AWS app page, open Manage Ingestions. Under Available Ingestion Workflows, choose Install & Add next to Ingest EC2 from AWS Organization. The Manage Ingestions tab appears when your team uses Databases.
-
Enter:
- the Organization ID (
o-...); - the member role’s path and name;
- the Regions to inventory. Each Region must be enabled in every included account.
- the Organization ID (
-
Set the instance
arnas the item type’s Key Field. Other useful fields includeaccountId,accountName,region,InstanceId,InstanceType,State, IP addresses, andTags.
organizations:DescribeOrganization, organizations:ListAccounts, and sts:AssumeRole plus sts:TagSession on the member role. That’s the policy in the “Let the hub role list accounts and assume member roles” step of Reach member accounts from one connection. Each member role needs ec2:DescribeInstances.
STS Region: the workflow assumes member roles through STS in us-east-1, so keep STS active in that Region in every included account.
Failures: if AWS denies access to an account or Region, the sync fails and its error names the account and Region. It never reports an empty inventory. Leave Delete missing items off until you’ve confirmed the scope and field mappings.
Gotchas and troubleshooting
The connection health check reports missing iam:ListRoles
The connection health check reports missing iam:ListRoles
iam:ListRoles. A role limited to DevOps Agent can authenticate successfully while this permission check fails. Grant iam:ListRoles only if you want that check to pass; DevOps Agent actions don’t require it. See Verifying the connection for the messages that distinguish authentication failures from missing permissions.The Organizations health check can fail by design
The Organizations health check can fail by design
Role ingestion only sees roles tagged "serval"
Role ingestion only sees roles tagged "serval"
A well-formed Role ARN connects even when the role is wrong
A well-formed Role ARN connects even when the role is wrong
arn:aws:iam::<12-digit account ID>:role/<name>) before the connection is saved. A well-formed ARN for a role that doesn’t exist or doesn’t trust Serval still connects “successfully” and fails later at “Test AWS Connection” with “Unable to authenticate with AWS. Please verify your cross-account role ARN and external ID are correct.”A region is required on every call, even for global services
A region is required on every call, even for global services
The External ID is deterministic, not random
The External ID is deterministic, not random
One connection per account, or one for the whole organization
One connection per account, or one for the whole organization
- Connect the organization: Serval creates a connection for each member account that has the member role (Connect an AWS Organization).
- Connect each account: workflows can then target a specific account or iterate over all connected accounts. Role ingestion and temporary role access need this, because they only see the connected account.
- Connect one hub account: workflows reach the others through a member role (Reach member accounts from one connection).
Sessions last 15 minutes and refresh automatically
Sessions last 15 minutes and refresh automatically
AWS traffic bypasses the Serval HTTP proxy allow-list
AWS traffic bypasses the Serval HTTP proxy allow-list
*.amazonaws.com) directly. The effective outbound surface is the endpoints of every service listed in the capability table under “What the AWS integration enables,” plus AWS STS for the credential exchange Serval performs on your connection’s behalf.Which Serval AWS account ID to trust
Which Serval AWS account ID to trust
992382851720 for United States organizations (app.serval.com), 311208284913 for European Union organizations (app.eu1.serval.com), and the account your own worker runs in for self-hosted deployments. The Connect AWS dialog shows the account for the region you’re signed in to, and the trust policy must name that same account. If the dialog shows 992382851720 on a European Union tenant, that build predates the region-aware dialog, so use the table in Get your credentials instead. Serval can’t assume a role that trusts a different account, and “Test AWS Connection” fails with “Unable to authenticate with AWS. Please verify your cross-account role ARN and external ID are correct.” If you’re self-hosted, ignore the value in the dialog and confirm the worker’s account ID with your Serval contact before writing the trust policy.Need help? Contact support@serval.com for assistance with your AWS integration.

