Cotool + AWS CLI
Connect AWS to Cotool so agents run AWS CLI commands in a sandbox through an assumed IAM role to investigate CloudTrail events, identities, and resources.
The short answer
The AWS CLI integration lets Cotool agents and chats run AWS CLI commands in a sandbox against your accounts, authenticated with an assumed IAM role, so investigations can check identities, resources, and recent API activity directly in AWS.[1][2]
How it connects: Cotool authenticates by assuming a role in your account. AWS's pattern for third-party access is a role whose trust policy names the third party's account and checks an external ID that the third party generates for each customer.[1][6]
What Cotool uses from AWS CLI
Detections, hunts, and triage
Setup and permissions
Create an IAM role that trusts the third party's account and requires its external ID. AWS does not treat the external ID as a secret, but it prevents another customer of the same provider from using your role.[6]
| Permission | Access | Why |
|---|---|---|
SecurityAuditAWS managed policy for reading security configuration metadata, meant for software that audits an account.[7] | Read | AWS managed policy for reading security configuration metadata, meant for software that audits an account.[7] |
cloudtrail:LookupEventsLook up CloudTrail management events from the last 90 days.[8] | Read | Look up CloudTrail management events from the last 90 days.[8] |
sts:AssumeRoleLets the trusted principal start a role session. The session cannot exceed the role's maximum duration of 1 to 12 hours.[9] | Read | Lets the trusted principal start a role session. The session cannot exceed the role's maximum duration of 1 to 12 hours.[9] |
How Cotool works with AWS CLI
FAQ
Sources
- Changelog (Cotool docs) · accessed November 16, 2026
- Integrations (Cotool) · accessed November 16, 2026
- Respond to every signal (Cotool Respond) · accessed November 16, 2026
- Threat hunting (Cotool Hunt) · accessed November 16, 2026
- AWS S3/SQS logs (Cotool docs) · accessed November 16, 2026
- Access to AWS accounts owned by third parties (AWS IAM User Guide) · accessed November 16, 2026
- SecurityAudit managed policy (AWS) · accessed November 16, 2026
- LookupEvents (AWS CloudTrail API Reference) · accessed November 16, 2026
- assume-role (AWS CLI Command Reference) · accessed November 16, 2026
