Skip to main content
Connect your AWS organization or a single AWS account to Oleria so it can build a continuously updated map of IAM users, roles, policies, EC2 instances, S3 bucket access, and CloudTrail activity. This page covers both integration approaches; the organization-level approach is recommended for production.

What Oleria discovers

  • Identities - IAM users and roles, plus IAM Identity Center users, groups, and group memberships.
  • Policies - Customer managed, AWS managed, and inline IAM policies, plus IAM Identity Center permission sets and their account assignments, and the access each one grants.
  • Role trust - Who can assume each IAM role: users and roles in the same account or in other accounts, and AWS services. A trust policy statement whose principal is a wildcard (*), a federated SAML or OIDC identity provider, or a bare account ID doesn’t produce a trust relationship in Oleria.
  • Credentials - IAM user access keys, signing certificates, SSH public keys, and service-specific credentials. Also AWS Secrets Manager secrets that don’t have rotation turned on (metadata only, never secret values), and AWS Certificate Manager (ACM) certificates.
  • Resources - EC2 instances and S3 buckets, including who can access each bucket.
  • Activity - AWS CloudTrail events.
  • Risk signals - Oleria’s own checks flag active access keys older than 90 days, IAM users without MFA, IAM policies that allow Action: "*" on Resource: "*", publicly accessible S3 buckets, and IAM users who have signed in to the console or used an access key before, but not in the last 90 days. An IAM user that has never signed in or used a key isn’t flagged. The checks also flag users, roles, and groups that can escalate privileges because they hold iam:PassRole along with an action that creates a service, such as a Lambda function or an EC2 instance.
  • AI agents - when agent discovery is enabled for your workspace, the agents you run on Amazon Bedrock AgentCore. See AI agents.

Prerequisites

  • An admin user in your AWS management account. The account you sign in with must have these IAM permissions to create the Oleria CloudFormation stack:
    • cloudformation:CreateStack
    • cloudformation:CreateUploadBucket
    • cloudformation:DescribeStacks
    • cloudformation:DescribeStackEvents
    • cloudformation:GetStackPolicy
    • cloudformation:GetTemplateSummary
    • cloudformation:ListStacks
    • cloudformation:ListStackResources
    • iam:AttachRolePolicy
    • iam:CreatePolicy
    • iam:CreateRole
    • iam:ListRoles
    • iam:GetRole
    • iam:DeleteRolePolicy
    • iam:PutRolePolicy
    • s3:GetObject
    • s3:CreateBucket
    • s3:PutObject
    • sns:ListTopics
  • Admin access on the Oleria platform to add a new integration.
Use a service account (and not an employee account) with the suggested privileges for the integration to ensure continuity.

Integration approaches

Choose one of two ways to connect:

Connect an AWS organization to Oleria

1

Sign in to the AWS management account

Sign in as an admin user to the AWS management account that you’ll connect to Oleria.Select the user in the top right corner, and select Organization.AWS console account menu in the top right corner with Organization highlighted
2

Copy the Root ID

Copy the Root ID for your organization from the AWS Organizations console.AWS Organizations console showing the organization Root ID
3

Launch AWS CloudFormation from Oleria

Sign in to your Oleria workspace. Select Integrations -> select AWS IAM and S3. A side page opens - set Connector Scope to Organization (Recommended), paste the Root ID into AWS Organizational Unit ID, and select Launch AWS CloudFormation.I authorize Oleria to perform write actions in AWS (recommended) is selected when the side page opens. Leave it selected to let Oleria take remediation actions: Oleria then launches a template that grants the connector role the write permissions its remediation actions need. If you clear it before you select Launch AWS CloudFormation, Oleria launches a template that grants only some of them, and doesn’t take remediation actions on the integration.Oleria workspace AWS integration panel with Organization scope and Root ID field
4

Create the CloudFormation stack

AWS opens. The stack name Oleria-Plugin-SaaS-Connector-Org is preselected. Acknowledge and select Create Stack.AWS CloudFormation stack creation with the stack name Oleria-Plugin-SaaS-Connector-Org and the role name oleriaOrgConnectorRole preselected
5

Wait for stack creation

Stack creation takes about a minute.CloudFormation stack with CREATE_COMPLETE status for the organization setup
Before adding stacks, verify the StackSet’s configuration. For the integration to automatically apply to new AWS accounts added to your organization in the future, ensure auto-deployment is active.In the CloudFormation console, open StackSets from the left menu. Select the Oleria-Plugin-SaaS-Connector-Org StackSet. Under Deployment configuration, select Edit automatic deployment and set Automatic deployment to Activated. Leave Account removal behaviour set to Delete stacks, then select Save.
Edit automatic deployment dialog for the Oleria-Plugin-SaaS-Connector-Org StackSet, with Automatic deployment set to Activated and Account removal behaviour set to Delete stacks
6

Navigate to the oleriaOrgConnectorRole

Select the Resources tab and navigate to the oleriaOrgConnectorRole.CloudFormation stack Resources tab listing the stack's IAM role, shown for a single-account stack and its oleriaConnectorRole
7

Copy the Role ARN

Copy the oleriaOrgConnectorRole ARN.IAM role summary with the ARN copy button, shown for a single-account stack's oleriaConnectorRole
8

Update the KMS key policy (if applicable)

This step is required only if the S3 bucket is encrypted with a KMS key. Add a statement to the KMS key policy that allows the Oleria connector role to use the key. Repeat these CloudTrail and KMS key policy steps for each AWS account that uses an encrypted trail.Search CloudTrail -> select Management Events.CloudTrail trail details showing the management events configuration, organization setup
If you have multiple trails, select the first trail and check for an encrypted KMS key. If S3 is encrypted, you will see a KMS key link.
Select the AWS KMS key link.CloudTrail trail settings with the AWS KMS key link, organization setupSelect Edit on the key policy and add the following statement to the existing Statement array. Don’t replace the whole policy: overwriting it can remove your administrators’ access to the key. Replace <ACCOUNT_ID> with your AWS account ID.
KMS key policy on the Key policy tab with a statement that names the connector role, shown for a single-account stack's oleriaConnectorRoleThis policy allows the Oleria connector role to use kms:Decrypt and kms:DescribeKey for KMS-encrypted S3 access.
9

Provide the Role ARN in Oleria

Return to your Oleria workspace and paste the Role ARN you copied. Select Confirm that the role is created using CloudFormation successfully, then select Authenticate.Oleria AWS connection form with the Role ARN field and the CloudFormation confirmation checkbox selected, organization setup

Connect a single AWS account to Oleria

This approach connects a single AWS account and is intended for POC use only. You will not get the full value of Oleria with this method. For production deployments and complete visibility across your AWS environment, Oleria recommends connecting an AWS organization instead.
1

Sign in to the AWS account

Sign in as an admin user to the AWS account you want to connect to Oleria.
2

Launch AWS CloudFormation from Oleria

In the same browser, open a new tab and sign in to your Oleria workspace. Select Integrations -> select AWS IAM and S3. A side page opens - select Account from the Connector scope dropdown and select Launch AWS CloudFormation.I authorize Oleria to perform write actions in AWS (recommended) is selected when the side page opens. Leave it selected to let Oleria take remediation actions: Oleria then launches a template that grants the connector role the write permissions its remediation actions need. If you clear it before you select Launch AWS CloudFormation, Oleria launches a template that grants only some of them, and doesn’t take remediation actions on the integration.Oleria workspace AWS integration panel with account-level scope selected
3

Create the CloudFormation stack

AWS opens. The stack name Oleria-Plugin-SaaS-Connector is preselected. Acknowledge and select Create Stack.AWS CloudFormation stack creation page for account-level integration
4

Wait for stack creation

Stack creation takes about a minute.CloudFormation stack with CREATE_COMPLETE status for the single-account setup
5

Navigate to the oleriaConnectorRole

Select the Resources tab and navigate to the oleriaConnectorRole.CloudFormation stack Resources tab listing oleriaConnectorRole for the single-account setup
6

Copy the Role ARN

Copy the oleriaConnectorRole ARN.IAM role summary for oleriaConnectorRole with the ARN copy button, single-account setup
7

Update the KMS key policy (if applicable)

This step is required only if the S3 bucket is encrypted with a KMS key. Add a statement to the KMS key policy that allows the Oleria connector role to use the key.Search CloudTrail -> select Management Events.CloudTrail trail details showing the management events configuration, single-account setup
If you have multiple trails, select the first trail and check for an encrypted KMS key. If S3 is encrypted, you will see a KMS key link.
Select the AWS KMS key link.CloudTrail trail settings with the AWS KMS key link, single-account setupSelect Edit on the key policy and add the following statement to the existing Statement array. Don’t replace the whole policy: overwriting it can remove your administrators’ access to the key. Replace <ACCOUNT_ID> with your AWS account ID.
KMS key policy editor with the Oleria statement added, single-account setupThis policy allows the Oleria connector role to use kms:Decrypt and kms:DescribeKey for KMS-encrypted S3 access.
8

Provide the Role ARN in Oleria

Return to your Oleria workspace and paste the Role ARN you copied. Select Confirm that the role is created using CloudFormation successfully, then select Authenticate.Oleria AWS connection form with the Role ARN field and the CloudFormation confirmation checkbox selected, single-account setup

Verify the integration

Confirm the AWS IAM and S3 instance appears on the Connected tab of your Oleria Integrations page with a status of Healthy. After the first sync completes, you can review the discovered IAM users, roles, policies, resources, and CloudTrail activity in your Oleria workspace. Oleria workspace Connected Integrations showing newly added AWS IAM and S3

AI agents

When agent discovery is enabled for your workspace, Oleria discovers the agents you run on Amazon Bedrock AgentCore and shows them in the Agents inventory. To enable agent discovery, contact support@oleria.com. Oleria reads agents in every AWS account the integration covers, in each Region that is enabled for the account and offers AgentCore.

What Oleria discovers about agents

Oleria reports two types of AgentCore agent:
  • Harness - an agent you define as an AgentCore harness. One harness is one agent, however many runtimes and endpoints AgentCore creates for it.
  • Agent Runtime - an agent you deploy to an AgentCore runtime as code or as a container, without a harness.
Oleria doesn’t store an agent’s prompt or instruction text. It stores only a hash of the instructions.

Permissions for agent discovery

The Oleria CloudFormation template grants the connector role these read permissions. If you manage the role yourself, grant all of them. A missing permission doesn’t fail the sync: Oleria reports what it can read.

Update an existing stack

A stack created from an earlier template doesn’t grant every permission on this page: the agent discovery permissions above, and the permissions for disabling AI agents. Update it to the current template. Update the stack in place. Don’t delete it and create it again: a recreated role has a new ID, so every KMS key policy and bucket policy that names the connector role stops applying until you enter the role in it again. The link in Oleria’s edit form launches one of two templates, depending on I authorize Oleria to perform write actions in AWS (recommended). With the checkbox selected, it launches the template that grants the write permissions Oleria’s remediation actions need, including the permissions for disabling AI agents. With the checkbox cleared, it launches a template that grants only some of them, and updating a stack to that template removes the rest. Prerequisites lists the permissions to create the stack. To update it, the account you sign in with also needs cloudformation:UpdateStack, and for an organization cloudformation:UpdateStackSet, in the AWS account that holds the stack.
1

Copy the template addresses

In Oleria, open the integration’s edit form. Set I authorize Oleria to perform write actions in AWS (recommended) to match the stack you want, then select Launch AWS CloudFormation.CloudFormation opens its Quick create stack page in a new tab. Copy these two values, then close the tab without creating a stack:
  • Template URL - the template for the organization stack.
  • TemplateURL, under Parameters - the template for the member accounts.
2

Update the organization stack

In the CloudFormation console of your management account, in the Region where you created the stack, select the Oleria organization stack and select Update. Select Replace existing template, select Amazon S3 URL, and paste the Template URL value. On Specify stack details, set TemplateURL to the value you copied and keep the other parameter values. Acknowledge that the template creates IAM resources, and select Update stack.Wait for the stack’s status to read UPDATE_COMPLETE. The connector role in the management account then has the current permissions.
3

Update the StackSet

The member accounts get their connector roles from the Oleria-Plugin-SaaS-Connector-Org StackSet. Update the StackSet as well, so that CloudFormation reads the member-account template again and updates the role in every member account.In the same Region, select StackSets in the navigation pane, select the StackSet, and select Edit StackSet details from the Actions menu. Select Replace current template and enter the TemplateURL value you copied. Keep the parameter values, and acknowledge that the template creates IAM resources.On Set deployment options, select Deploy to organizational units (OUs) and enter the ID you gave Oleria as AWS Organizational Unit ID. For Specify regions, select the Region of the organization stack. Select Submit.
4

Wait for every account

On the StackSet’s Operations tab, wait for the operation’s status to read SUCCEEDED. Then check on the Stack instances tab that every stack instance reads CURRENT. An operation that stays within its failure tolerance reads SUCCEEDED even when an account failed.If a stack instance reads OUTDATED, its status reason on the Stack instances tab says why. Fix the cause, then repeat the previous step with Use current template instead of Replace current template to retry it.
5

Confirm in Oleria

When every stack instance is current, return to Oleria, select Confirm that the role is created using CloudFormation successfully, and select Update.

Agent activity

Oleria reads agent activity from the same CloudTrail trail as the rest of your AWS activity. In each account it reads one trail: the first multi-Region trail that CloudTrail’s ListTrails returns for the account. In an account with no multi-Region trail, it reads one single-Region trail, which holds activity only for that trail’s home Region.
  • Agent and credential provider changes are CloudTrail management events. They need no extra setup.
  • Workload access tokens: AgentCore obtains a workload access token for an agent, which lets the agent use AgentCore services such as credential providers. CloudTrail records GetWorkloadAccessToken as a management event, so it needs no extra setup, and Oleria shows it as activity by that agent.
  • Agent invocations are CloudTrail data events, which a trail doesn’t log by default. To see who invoked an agent, log data events for the resource type AWS::BedrockAgentCore::Runtime on the trail Oleria reads. In an account with more than one multi-Region trail, log them on each of those trails. AWS charges for data events.
  • Credential retrievals: when the trail holds a GetResourceApiKey or GetResourceOauth2Token event, Oleria shows it as a retrieval of that credential by the IAM principal that made the call. Oleria doesn’t attribute it to an agent, because the event names only that principal. CloudTrail records both as management events, so they need no extra setup.

Verify agent discovery

After the next sync completes, open the Agents inventory and filter Application Instance to your AWS integration. Each harness and each agent runtime without a harness appears as one agent. If an agent is missing, check that its Region is enabled for the account, that the connector role in that account holds the permissions above, and that no service control policy in your organization denies them to the role.

Agent limitations

  • Amazon Bedrock Agents: Oleria discovers AgentCore agents. It doesn’t discover agents built with Amazon Bedrock Agents.
  • Identity-based policies: Who Can Use lists access from an agent’s inbound allow list and from resource-based policies. It doesn’t list principals whose own IAM policies allow them to invoke the agent.
  • Agents deployed as code: For an agent runtime without a harness, Oleria can’t read the models, tools, or instructions inside your code.
  • Earlier versions: Oleria lists an agent’s current version and the versions its endpoints serve or are moving to. It doesn’t list other versions.
  • Activity in opt-in Regions: Oleria discovers agents in every Region that is enabled for the account, but reads CloudTrail activity only in the Regions AWS enables by default. An agent in a Region you opted in to appears without activity.
  • Requests through a session endpoint: Oleria shows invocations through InvokeAgentRuntime, and the commands and shells run in an agent’s sessions. It doesn’t show requests through a session endpoint, which CloudTrail records as InvokeAgentRuntimeProxy.

Remediation actions

If you selected I authorize Oleria to perform write actions in AWS (recommended) when you launched the CloudFormation stack, Oleria can take these actions:

Permissions for disabling AI agents

Oleria uses these permissions for the Disable agent action, which is being rolled out. If you plan to use it, leave I authorize Oleria to perform write actions in AWS (recommended) selected when you launch the stack, so you don’t have to update the stack when the action arrives. For a stack that is already deployed, see Update an existing stack. Disable agent is available only when agent discovery is enabled for your workspace. The template that Oleria launches with the checkbox selected grants these permissions: Disable agent also uses permissions that every template grants, whether or not you select the checkbox:
  • iam:PutRolePolicy and iam:DeleteRolePolicy - attach an inline deny-all policy to an agent’s execution role, and remove it on revert.
  • The harness, runtime, gateway, and resource policy reads among the permissions for agent discovery, with ec2:DescribeRegions, iam:GetRole, iam:ListRolePolicies, iam:GetRolePolicy, and iam:SimulatePrincipalPolicy - read the agent, its execution role, and the role’s policies, and check the connector role’s own permissions.
Every template also grants iam:GetAccountAuthorizationDetails. As part of the same rollout, the sync reads the inline policies of your IAM roles with it, so that a role carrying a deny-all policy shows as disabled after the next sync. With the checkbox cleared, Oleria refuses every write action on the integration, except reverting an action it already ran.

How Disable agent stops an agent

Disable agent, which is being rolled out, stops an agent in a way that depends on the agent’s type:
  • Agent Runtime: Oleria adds the deny statement to the runtime’s resource-based policy. It also attaches the inline deny-all policy to the agent’s execution role when the role is the agent’s alone. When it isn’t, Oleria leaves the role as it is, and the agent is still disabled.
  • Harness: Oleria stops a harness only through its execution role, by attaching the inline deny-all policy. When the role isn’t the harness’s alone, or the harness’s endpoints serve versions that run as different execution roles, Oleria refuses the action and says why.
Oleria treats an execution role as the agent’s alone when all of these hold:
  • The role is in the same AWS account as the agent.
  • The role isn’t the role this integration connects with.
  • The role’s trust policy lets only bedrock-agentcore.amazonaws.com assume it. A role that a Lambda function, an ECS task, a person, or another service can assume doesn’t qualify.
  • No other harness, agent runtime, gateway, memory, custom code interpreter, custom browser, online evaluation configuration, consent portal, payment manager, or capacity provider that Oleria can read, in any Region enabled for the account, uses the role.
Oleria doesn’t check any other kind of AgentCore resource that can use a role. If one uses the agent’s execution role, the deny-all policy stops it too. After Oleria disables an agent:
  • New calls: AgentCore refuses each new call to a runtime whose policy carries the deny statement: invoking it over HTTP or a WebSocket stream, and running a command or opening a shell in one of its sessions, including a call that continues an existing session. An explicit deny overrides every allow. The statement also denies bedrock-agentcore:InvokeAgentRuntimeProxy, the permission that requests through a session endpoint need.
  • AWS access: AWS refuses every API call made as an execution role that carries the deny-all policy, including calls from a session that is already running, because it evaluates the role’s permissions on each request. A policy change can take a few minutes to take effect.
  • Running sessions: Oleria doesn’t stop a session that is already running. The session stays up until AgentCore ends it, for inactivity or at its maximum lifetime, and code in it can keep running until then. To end it sooner, stop the session in AgentCore with StopRuntimeSession.
Oleria doesn’t delete an agent, and doesn’t change its configuration, its endpoints, or its credentials.

Contact us

For questions about this integration, contact us at support@oleria.com.