Connect Amazon Q Developer to LinearB
Connect Amazon Q Developer to LinearB through AWS to collect adoption and accepted-lines data from Amazon Q usage reports.
Overview
Connect Amazon Q Developer to LinearB to collect user activity reports from your AWS environment and measure Amazon Q adoption and accepted lines of code.
In LinearB, select AWS as the AI provider and Amazon Q Developer as the connection type.
Data Provided by Amazon Q Developer
Depending on the reports available in AWS, the integration can provide:
- Amazon Q Developer adoption
- Active users
- Usage activity
- Accepted lines of code
Adoption and accepted-lines data appears in AI Analytics.
Data Availability and Collection Cadence
- Amazon Q Developer user activity reports are generated in your AWS environment.
- LinearB reads available reports from the configured S3 path.
- Amazon Q reporting is updated daily.
- Available data depends on the reports present in the configured bucket and prefix.
- User resolution depends on access to the configured AWS Identity Store.
Before You Begin
Verify that you have:
- Access to AI Tools settings in LinearB.
- AWS administrative access to IAM, S3, and IAM Identity Center.
- An active Amazon Q Developer environment.
- Amazon Q Developer user activity reports enabled.
- The S3 path where Amazon Q Developer reports are exported.
- The Identity Store ID for the IAM Identity Center instance used by Amazon Q Developer.
- The S3 bucket region.
- The Identity Center region.
Before connecting, complete the following AWS preparation:
- Enable user activity reports in Amazon Q Developer.
- Optionally enable prompt logging.
-
Create a cross-account IAM role with read-only access to:
- The reporting S3 bucket
- IAM Identity Center
- Prepare to configure the role’s trust policy with the LinearB AWS Account ID and External ID generated during setup.
Start the Connection in LinearB
- Go to Settings → Company Settings → AI Tools → Integrations.
- Click Add New.
- Select AWS.
- Click Continue.
- Select Amazon Q Developer.
- Click Continue.
Enter the AWS Main Settings
Enter the details of the AWS environment where Amazon Q Developer is deployed:
- IAM Role ARN — The cross-account IAM role that LinearB will assume
- Usage Data S3 Path — The S3 path where Amazon Q Developer reports are exported
- Identity Store ID — The IAM Identity Center store used by Amazon Q Developer
- S3 Bucket Region — The AWS region containing the reporting bucket
- Identity Center Region — The region containing the relevant IAM Identity Center instance
The Identity Center region can differ from the S3 bucket region.
After entering the required settings, continue to generate the AWS policies.
Apply the LinearB Setup in AWS
LinearB generates IAM policies based on the submitted configuration:
- Trust Policy — Allows the LinearB AWS account to assume the IAM role using the generated External ID
- Permissions Policy — Grants read-only access to the required reporting and Identity Store resources
- Expand Trust Policy.
- Copy the generated policy.
- In AWS IAM, open the cross-account role that LinearB will use.
- Apply the generated Trust Policy to the role.
- Return to LinearB.
- Expand Permissions Policy.
- Copy the generated policy.
- Attach the Permissions Policy to the same IAM role.
- Save the role configuration in AWS.
- Return to LinearB.
- Click Connect Amazon Q Developer.
LinearB validates the IAM role, S3 access, Identity Store access, and configured regions. When validation succeeds, AWS — Amazon Q Developer appears in the Connected list.
Verify the Connection
- Open Settings → Company Settings → AI Tools → Integrations.
- Select Connected.
- Select AWS — Amazon Q Developer.
- Confirm that the integration status is Connected.
- Confirm that the displayed AWS settings match the reporting environment.
- Allow time for Amazon Q reports to be generated and processed.
- Open AI Analytics and confirm that Amazon Q data appears.
Edit the Amazon Q Developer Integration
Use Edit mode to update the AWS resources and regions used by the integration.
The following fields can be edited:
- IAM Role ARN
- Usage Data S3 Path
- Identity Store ID
- S3 Bucket Region
- Identity Center Region
- Open Settings → Company Settings → AI Tools → Integrations.
- Select Connected.
- Select AWS — Amazon Q Developer.
- Under Main Settings, click Edit.
- Update the required AWS settings.
- Click Save changes to apply the update or Cancel to discard it.
Apply the updated Trust Policy
- After saving the edit, expand Trust Policy.
- Copy the newly generated policy.
- Open the integration’s IAM role in AWS.
- Replace the existing Trust Policy with the newly generated policy.
- Save the role in AWS.
- Return to LinearB and verify the integration.
What happens to historical data?
Editing the integration does not delete previously collected Amazon Q metrics.
- Saving an edit triggers a new collection.
- LinearB recollects up to 90 days of recent Amazon Q data.
- Recollected records are updated in place and are not counted twice.
- Data older than the recollection window remains unchanged.
Disconnect or Reconnect
Disconnecting Amazon Q Developer stops new report collection and moves the integration to the Disconnected list. Previously collected data is preserved.
Disconnect the integration
- Open Settings → Company Settings → AI Tools → Integrations.
- Select Connected.
- Select AWS — Amazon Q Developer.
- Click Disconnect.
- Confirm the action.
Reconnect the integration
- Open Settings → Company Settings → AI Tools → Integrations.
- Select Disconnected.
- Select AWS — Amazon Q Developer.
- Click Reconnect.
- Review the saved AWS configuration.
- Complete validation to restore the integration.
LinearB validates the saved IAM role and AWS resources before restoring the integration.
Learn more:
Troubleshooting
Invalid IAM Role ARN
Verify that the complete ARN was copied from AWS. It should use this format:
arn:aws:iam::<account-id>:role/<role-name>
Invalid S3 URI
Verify that the path uses a valid S3 URI and contains the correct bucket and prefix:
s3://<bucket-name>/<report-prefix>/
Could Not Assume the IAM Role
- Confirm that the Trust Policy allows the LinearB AWS account as a principal.
-
Verify that
sts:ExternalIdexactly matches the current External ID shown in LinearB. - Confirm that the IAM Role ARN is correct.
- Verify that the Trust Policy was applied to the intended role.
- If the integration was edited, confirm that the newly generated Trust Policy was applied in AWS.
IAM Role Not Found
Confirm that the role exists in the AWS account identified by the ARN and that the complete ARN was entered in LinearB.
Temporary AWS Error
AWS STS throttling or temporary service unavailability can prevent validation. Wait a few minutes and try again.
S3 Bucket Not Found
- Confirm that the bucket name is correct.
- Verify that the configured S3 region matches the bucket’s actual region.
- Confirm that the bucket exists in the expected AWS account.
No Permission to List the S3 Bucket
Confirm that the IAM role permits s3:ListBucket for the
configured bucket and prefix.
No Permission to Read S3 Objects
Confirm that the IAM role permits s3:GetObject for the Amazon Q
report objects under the configured prefix.
Incorrect S3 Region
Update the configured S3 region so that it matches the bucket’s actual region.
IAM Identity Center Not Found
- Verify the Identity Store ID.
- Confirm the IAM Identity Center home region.
- Remember that the Identity Center and S3 bucket can use different regions.
Access Denied to Identity Store
Confirm that the IAM role has the required read-only Identity Store permissions, including access to retrieve and describe users.
No Amazon Q Data Appears
- Confirm that Amazon Q Developer user activity reports are enabled.
- Verify that reports exist under the configured S3 path.
- Confirm that the S3 path matches the Amazon Q report location.
- Allow time for the daily report and LinearB processing cycle.
- Verify that users can be resolved through the configured Identity Store.
- Confirm that the integration appears under Connected without an error indicator.
Known Limitations
- Data availability depends on the Amazon Q Developer reports present in the configured S3 path.
- Amazon Q reporting is updated daily, not in real time.
- Available metrics depend on the data returned through the AWS reports.
- Model, token, and estimated-consumption data is not currently available.
- Saving any edit regenerates the External ID and requires an updated IAM Trust Policy.
Related Articles
How did we do?
Choose a GitHub Copilot connection
Connect Claude Code using OpenTelemetry