Amazon Web Services
Connect an AWS account to Octic with a read-only IAM role that trusts Octic through OIDC federation, with no access keys.
This page connects one AWS account to Octic. You deploy a small stack in the account that creates a read-only IAM role, paste the role's ARN into Octic, and Octic runs the first sync. Octic never holds an AWS access key.
Octic inventories every enabled region in the account:
- Amazon Bedrock agents, models and knowledge bases
- Amazon SageMaker endpoints and notebooks
- Amazon Q Business, Amazon Lex and Amazon Kendra
- The IAM roles, S3 buckets, secrets, Lambda functions and EC2 instances around them
Resource tags and account structure feed ownership. Octic only reads; the role can't change anything in your account.
The stack registers Octic's identity issuer as an IAM OIDC identity provider
and creates a role named octic-readonly that trusts it. At sync time Octic
presents a short-lived signed token to AWS STS
(AssumeRoleWithWebIdentity) and receives temporary credentials that expire
within the hour. The role's trust policy pins the audience to
sts.amazonaws.com and the subject to your workspace, so no other Octic
workspace can assume it. Octic stores only the role's ARN.
- You're the owner of the Octic workspace.
- You can deploy a CloudFormation stack or a Terraform configuration that creates IAM resources in the AWS account you're connecting.
- Deploy the stack once per AWS account. An AWS account connects to one Octic workspace. To connect more accounts, repeat this page for each; every account is its own connection.
The Setup tab's wizard has four stages: Scope, Deploy, Connect and First sync.
Open the setup
Open Integrations, choose Amazon Web Services, then choose Connect. The Setup tab opens with a Before you start checklist and the wizard below it.

Choose the scope
Choose Single account.
Deploy the stack
Pick how you deploy infrastructure. All three create the same OIDC provider and read-only role:
- Launch in console (one-click quick-create). Pick the Region for the stack record (the IAM resources are global), then choose Launch stack in AWS Console. Sign in to the account you're connecting. The parameters arrive filled in. Tick the acknowledgment that the template creates IAM resources with custom names, then create the stack.
- CloudFormation file. Download or copy
octic-readonly.ymland deploy it the way you usually do: a console upload, the AWS CLI with--capabilities CAPABILITY_NAMED_IAM, or your pipeline. Set the two parameters to the values the Setup tab shows under Parameters. - Terraform. Download or copy
octic-readonly.tf. Your issuer URL and tenant ID are already in it as variable defaults, so it applies as downloaded. Run this in the directory you saved it to:Your workstationbash terraform initterraform apply


When the deploy finishes (the stack shows
CREATE_COMPLETE, orterraform applycompletes), copy the role ARN: theOcticRoleArnoutput on the stack's Outputs tab, or theoctic_role_arnoutput Terraform prints. Then choose My stack is deployed.Paste the role ARN
Paste the ARN into Role ARN. It looks like
arn:aws:iam::<account-id>:role/octic-readonly, where<account-id>is the 12-digit ID of the account you deployed to. Choose Connect account. Octic verifies the role straight away; if AWS rejects it, the wizard shows what to fix and Retry connection. See Troubleshoot integrations.
Wait for the first sync
Octic starts the first sync on its own and shows its progress. It usually takes a minute or two. When it finishes, the wizard says You're all set with the number of assets ingested, and offers View your AWS assets and Open the graph.
Under Launch in console, Advanced options has two fields:
- Template version:
latesttracks stable releases. Each release also keeps an immutable version you can pin. - Template bucket URL: where the quick-create link loads the template from. Clear it to deploy from a downloaded template instead; the wizard then offers the template download and Open CloudFormation Console.
The Setup tab and the Overview tab show the template. OcticIssuerUrl
and OcticTenantId are its only parameters, and the Setup tab shows the
values for your workspace.
AWSTemplateFormatVersion: "2010-09-09"Description: Octic read-only access via keyless OIDC federation (no access keys).Parameters: OcticIssuerUrl: Type: String Description: Octic's OIDC issuer URL (shown in the Octic setup wizard). OcticTenantId: Type: String Description: Your Octic tenant ID (shown in the Octic setup wizard).Resources: OcticOidcProvider: Type: AWS::IAM::OIDCProvider Properties: Url: !Ref OcticIssuerUrl ClientIdList: - sts.amazonaws.com OcticReadOnlyRole: Type: AWS::IAM::Role Properties: RoleName: octic-readonly MaxSessionDuration: 3600 AssumeRolePolicyDocument: !Sub - | { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "Federated": "${OcticOidcProvider}" }, "Action": "sts:AssumeRoleWithWebIdentity", "Condition": { "StringEquals": { "${IssuerKey}:aud": "sts.amazonaws.com" }, "StringLike": { "${IssuerKey}:sub": "octic:tenant:${OcticTenantId}:aws:*" } } }] } - IssuerKey: !Select [1, !Split ["//", !Ref OcticIssuerUrl]] ManagedPolicyArns: - arn:aws:iam::aws:policy/ReadOnlyAccessOutputs: OcticRoleArn: Value: !GetAtt OcticReadOnlyRole.Arn Description: Paste this into the Octic setup wizard.Once deployed, the role's trust policy reads like this, with your issuer's host name and your tenant ID in place of the placeholders:
{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "Federated": "arn:aws:iam::<account-id>:oidc-provider/<issuer-host>" }, "Action": "sts:AssumeRoleWithWebIdentity", "Condition": { "StringEquals": { "<issuer-host>:aud": "sts.amazonaws.com" }, "StringLike": { "<issuer-host>:sub": "octic:tenant:<tenant-id>:aws:*" } } }]}<account-id>: the AWS account you deployed to.<issuer-host>: the OcticIssuerUrl value from the Setup tab, withouthttps://.<tenant-id>: the OcticTenantId value from the Setup tab.
The role has one permissions policy:
| Policy | Type | Access |
|---|---|---|
ReadOnlyAccess | AWS managed | Read |
You can replace it with a narrower customer-managed policy. Sync then collects whatever the role can read.
The first sync runs as part of setup. After that, Octic syncs the account every 6 hours. To check the connection or sync now, open the Settings tab: the account's card shows its account ID and when it was last verified, with Verify, Sync now and Disconnect, and Recent syncs below. See Manage a connection.
Choose Disconnect on the account's card on Settings. Octic stops
syncing the account and keeps what it already found. To remove Octic's
access in AWS as well, delete the stack, or the octic-readonly role and
the OIDC identity provider if you deployed with Terraform. Deleting the
stack cuts off access straight away, whether or not you disconnect in Octic.
Last updated
Was this page helpful?



