AWS coding agents run next to the most powerful credentials a developer holds, their AWS sessions, and two public incidents have already shown how a repository file or a poisoned release can reach them. Amazon Q Developer (in the IDE plugins and the AWS console) and Kiro (AWS's agentic IDE and CLI, which has absorbed the Q Developer CLI) both tie organisational access to AWS IAM Identity Center and both let the agent run commands and MCP servers with the developer's environment. This guide covers how identity and subscriptions work, which IAM policies and service-linked roles are involved, how MCP and trusted commands are governed, what CloudTrail and the Kiro console record, and a hardening baseline. It complements the cross-product AI IDE and Coding Agent Security Guide. Facts are from AWS and Kiro documentation checked on 27 October 2026.
Key takeaways
- Use Pro or Kiro enterprise through IAM Identity Center. Free tier content may be used for service improvement; AWS states it does not use Amazon Q Developer Pro content for that purpose. Builder ID personal sign-in sits outside your directory.
- The Q Developer CLI is now the Kiro CLI. AWS's documentation says so directly; plan controls and policies against Kiro, not legacy Q CLI flags.
- Repository MCP files are an execution path. CVE-2026-12957 let a workspace
.amazonq/mcp.jsonstart MCP server commands that inherited the developer's AWS keys. Keep plugins and language servers current and govern MCP centrally. - Kiro's Supervised mode is not a control. Kiro's own documentation says it is a code review workflow. Trusted Commands use prefix matching without analysing command chains, so keep the list short.
- Short-lived AWS credentials are the real mitigation. Whatever the agent can reach in the developer's environment, an injected prompt can reach too.
How identity and access work in Amazon Q Developer and Kiro
Both products have a personal and an organisational sign-in route. The organisational route is what makes central control possible.
| Surface | Free tier | Pro tier / Kiro enterprise |
|---|---|---|
| Amazon Q in the IDE | AWS Builder ID only | Builder ID or IAM Identity Center |
| Command line (now Kiro CLI) | Builder ID only | Builder ID or IAM Identity Center |
| AWS console, AWS apps and websites | IAM Identity Center or IAM credentials | IAM Identity Center only |
| Kiro enterprise users | n/a | IAM Identity Center, Okta or Microsoft Entra ID; custom OIDC in AWS GovCloud (US) |
| Content used for service improvement | May be used; opt out with an AWS Organizations AI services opt-out policy or IDE settings | Not used for Amazon Q Developer Pro (AWS statement) |
Subscriptions are assigned to IAM Identity Center users or groups. In Kiro, subscribing a group subscribes each member individually, and administrative settings are enforced through a Kiro profile, of which each AWS account can have one per Region. Two Regions matter: the IAM Identity Center Region, where identities and subscriptions live, and the profile Region, where Kiro stores data. Record both for data residency reviews.
Signing in to the product is separate from the AWS credentials the agent uses to act. When a developer asks the agent to deploy or query resources, it runs AWS CLI or SDK calls with whatever profile is in the environment. That is the identity to control. Use IAM Identity Center permission sets and aws sso login sessions instead of IAM user access keys on developer machines, and scope the permission set used for development work away from production. See the AWS IAM Policies and Roles Guide.
Admin roles and privileged access
| Policy or role | Type | What it does | Guidance |
|---|---|---|---|
AmazonQFullAccess | AWS managed policy | Full access to Amazon Q Developer, including administrator access | Only for the small group that manages subscriptions and settings |
AmazonQDeveloperAccess | AWS managed policy | Full access to use Amazon Q Developer without administrator access | Default for users who need console Q features |
AWSServiceRoleForAmazonQDeveloper | Service-linked role | Lets Amazon Q publish billing and usage metrics to CloudWatch | Service-owned; do not edit |
AWSServiceRoleForUserSubscriptions | Service-linked role | Lets Amazon Q subscriptions track IAM Identity Center and AWS Organizations changes | Service-owned; monitor its creation in the management account |
GitLabDuoWithAmazonQPermissionsPolicy | AWS managed policy (not attachable to your identities) | Used by the GitLab Duo with Amazon Q integration | Review if the integration is in use |
The privileged surfaces are the IAM Identity Center administrators (who decide who gets a subscription and can change identity sources), the identities holding AmazonQFullAccess, and the Kiro console administrators who set governance policy. In Kiro, governance can be set at organisation level and overridden per account, so an account-level administrator can loosen policy for that account. Use service control policies to stop member accounts changing Kiro or Q settings where your organisation structure allows it, and require phishing-resistant MFA in IAM Identity Center for all of these roles. See the AWS IAM Identity Center Guide.
Integrations, API tokens and service accounts
Kiro governance controls
| Control (Kiro console) | Default | Recommended |
|---|---|---|
| Model access management | All models available | Restrict to approved models; set a default model |
| MCP | Enabled | Allow only servers in an MCP registry allow-list, or disable MCP where not needed |
| API keys for Kiro CLI | Off | Keep off unless a reviewed automation needs it; if enabled, treat keys as NHIs with owners and rotation |
Web tools (web_search, web_fetch) | On | Disable for teams on sensitive code; web content is an injection channel and fetch is an egress channel |
| Cloud Sessions | Off for IAM Identity Center organisations | Enable only after reviewing which settings do not apply to web sessions (Kiro notes MCP configuration, model availability and customer managed keys among them) |
| Sign-in controls | All methods shown | Use managed-settings.json on managed devices to limit sign-in methods and prefill the IAM Identity Center start URL and Region (Kiro IDE 1.2+, Kiro CLI 2.25.0+) |
MCP configuration
- Kiro files: workspace
.kiro/settings/mcp.jsonand user~/.kiro/settings/mcp.json; the files merge and workspace settings take precedence. An agent definition can carry its ownmcpServersand decide withincludeMcpJsonwhether to inherit the others. - Auto-approval:
autoApproveaccepts"*"to approve every tool on a server. Avoid it; list specific read-only tools and usedisabledToolsto hide dangerous ones. - Secrets: reference secrets as
${VARIABLE_NAME}. Kiro expands only variables listed in the "Mcp Approved Env Vars" setting, which stops a repository file from quietly reading arbitrary environment variables into a server's headers. Keep that list short. - OAuth: remote servers support an
oauthblock and Dynamic Client Registration; the IDE supports public clients only, while aclientSecret(confidential client) is CLI only. Prefer OAuth over static bearer tokens inheaders. - Amazon Q plugins: the Amazon Q Developer IDE plugins read
.amazonq/mcp.jsonfrom the workspace. Before the fixes in the Language Servers for AWS (1.65.0 for the MCP issue, 1.69.0 for both CVEs per the AWS bulletin), opening a malicious repository could start MCP commands with the developer's AWS keys. See the Amazon Q MCP Config Vulnerability 2026 analysis.
Release pipeline and extension integrity
In July 2025, version 1.84.0 of the Amazon Q Developer extension for VS Code shipped with an injected prompt instructing the agent to delete local and cloud resources, after an over-scoped GitHub token in the project's AWS CodeBuild configuration was used to commit it (AWS-2025-015, CVE-2025-8217, fixed in 1.85.0). AWS said the prompt failed to run and no customer resources were affected. The lesson for customers is that the agent's instructions are part of the supply chain: pin and manage extension versions centrally, and limit what the agent's AWS session could delete. See the Amazon Q Developer Extension Compromise 2025 analysis.
Logging and detection
| Source | What it shows | Detection use |
|---|---|---|
AWS CloudTrail, event source q.amazonaws.com | Amazon Q API actions such as SendMessage and PassRequest; in AWS's examples the utterance and response body are masked | Who used Q in the console and when; not a prompt archive |
CloudTrail events with invokedBy: q.amazonaws.com | AWS API calls Amazon Q made on a user's behalf (AWS shows an S3 ListBuckets example) | Separate agent-initiated actions from direct user actions |
| CloudTrail for the developer's own session | Calls made by the agent through the local AWS CLI or SDK, indistinguishable from the developer | Alert on destructive calls (deletes, IAM changes) from development permission sets |
| Kiro console | Usage dashboard, per-user activity, prompt logging options and subscription CSV export | Adoption, shadow usage, investigation of specific sessions |
| Endpoint telemetry | Processes started by the IDE or CLI, writes to .kiro/ and .amazonq/ | Unexpected MCP server processes; config files written outside Git operations |
Because local agent calls look like the developer in CloudTrail, the practical control is to make destructive actions impossible from the development permission set rather than to detect them afterwards. See the AWS CloudTrail Guide.
Metrics
- Managed sign-in share: percentage of Q and Kiro users on IAM Identity Center subscriptions rather than Builder ID.
- Static key exposure: number of developer machines with long-lived IAM access keys; target zero.
- MCP policy coverage: accounts with an MCP registry allow-list or MCP disabled.
- Version compliance: percentage of installs on language server and plugin versions at or above the latest security bulletin fix.
- Destructive call denials: denied delete or IAM-modifying calls from development permission sets, reviewed weekly.
Hardening baseline
- Move users to Pro or Kiro enterprise subscriptions through IAM Identity Center and, for any remaining Free tier use, apply an AWS Organizations AI services opt-out policy.
- Control sign-in on managed devices with Kiro's
managed-settings.json, limiting methods to IAM Identity Center or your connected IdP. - Replace IAM user keys with IAM Identity Center sessions; give development permission sets no delete rights on production and no IAM write rights.
- Restrict models and MCP in the Kiro console: approved models only, an MCP registry allow-list, and web tools off where not needed.
- Review Trusted Commands: the setting "Kiro Agent: Trusted Commands" uses string-prefix matching and does not analyse command chains or special characters. Never use a bare
*; limit entries to read-only commands. - Keep protected path confirmation: in the Kiro IDE, writes to
.vscode/,.git/,.code-workspace,mcp.jsonand.kiroignorerequire confirmation in both modes. In the CLI these protections do not apply in the same way, so isolate CLI work in containers or dedicated accounts. - Treat repository agent files as code: require code owner review for
.kiro/(including steering files and MCP settings) and.amazonq/directories. - Manage updates: use Kiro managed updates and central extension deployment so security fixes land quickly and pinned versions cannot drift to a compromised release.
- Open unknown repositories safely: use workspace trust or a disposable dev container without AWS credentials mounted.
Pilot and rollback: apply the governance policy to one AWS account first using Kiro's account-level override, measure friction (blocked MCP servers, denied commands) for two weeks, then move it to organisation level. Rolling back means relaxing a specific control in the console, never handing developers broader AWS permissions. Small teams without AWS Organizations can still use Pro subscriptions through IAM Identity Center, Identity Center sessions and a reviewed workspace mcp.json with no autoApprove wildcards.
Common misconfigurations
- Builder ID on corporate code: personal sign-in bypasses your directory, offboarding and governance policy, and Free tier content may be used for service improvement.
- Long-lived IAM keys in
~/.aws/credentials: every MCP server and command the agent starts inherits them, which is exactly what made the 2026 MCP configuration flaw serious. autoApprove: "*"on remote servers: any tool the server adds later runs without a prompt.- Trusted Commands with broad prefixes: entries such as
npm *oraws *permit chained or destructive variants. - Relying on Supervised mode: it reviews file edits, not commands or tool calls, and Kiro says it is not a security control.
- Unpinned extensions: automatic updates without central control delivered the compromised 1.84.0 release directly to developers.
Framework mapping
| Risk or control | Reference |
|---|---|
| Agent using the developer's cloud session | ATT&CK T1078.004 Cloud Accounts; NIST SP 800-53 AC-6 Least Privilege; NIST CSF 2.0 PR.AA-05 |
| Credentials in files and environment | ATT&CK T1552.001 Credentials In Files; NIST SP 800-53 IA-5 Authenticator Management |
| Compromised extension release | ATT&CK T1195.001 Compromise Software Dependencies and Development Tools; NIST SP 800-53 CM-11 User-installed Software |
| Injected instructions in repositories and web content | MITRE ATLAS AML.T0051.001 Indirect prompt injection; OWASP LLM Top 10 LLM01 Prompt Injection Guide |
| Subscriptions and identity sources | NIST SP 800-53 AC-2 Account Management, IA-2; NIST CSF 2.0 PR.AA-01 |
| CloudTrail and activity logging | NIST SP 800-53 AU-12 Audit Record Generation; NIST CSF 2.0 DE.CM-09 |
Practitioner checklist
- Inventory Q Developer and Kiro use and move corporate users to IAM Identity Center subscriptions.
- Apply an AI services opt-out policy for any Free tier use in AWS Organizations.
- Limit
AmazonQFullAccessand Kiro console administration to a named few with phishing-resistant MFA. - Remove IAM user access keys from developer machines and use Identity Center sessions with non-production permission sets.
- Set Kiro governance: approved models, MCP registry allow-list, web tools reviewed, API keys off.
- Ban
autoApprove: "*"and broad Trusted Commands; keep "Mcp Approved Env Vars" minimal. - Require code owner review on
.kiro/and.amazonq/directories. - Track plugin and language server versions against AWS security bulletins.
- Alert on destructive AWS calls from development permission sets and on
invokedBy: q.amazonaws.comactivity in sensitive accounts.
Standards and references
- AWS: Amazon Q Developer tiers
- AWS: AWS managed policies for Amazon Q Developer
- AWS: Amazon Q Developer service improvement
- AWS: Logging Amazon Q Developer API calls with CloudTrail
- Kiro: Privacy and security
- Kiro: Enterprise governance
- Kiro: MCP configuration
Related NHI Mgmt Group resources: AI IDE and Coding Agent Security Guide · Coding Agent Configuration File Attacks · Cursor Security Guide · Developer Workstation and IDE Security Guide