Overview
OpenSRE uses AWS to map your environment: Lambda functions, EKS clusters, S3 buckets, and more. It reads infrastructure state to build investigation context when cloud-related alerts fire. Related AWS tool pages (same credentials, no separate setup): EC2, ELB, S3, Lambda, and CloudTrail.Prerequisites
- AWS account with IAM permissions
- Either a role ARN (recommended) or static access keys. A role ARN is assumed using your ambient AWS credentials — environment keys, an
aws configureprofile, or an attached instance/task role — so one of those must exist on the machine running OpenSRE
Setup
Option 1: Interactive CLI
aws configure, or continue anyway
(for EC2/ECS/Lambda with an attached role).
Option 2: Environment variables (IAM role)
Option 3: Environment variables (static keys)
Either
AWS_ROLE_ARN or AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY is required.
AWS_ROLE_ARN alone is not enough on a laptop: the role is assumed with whatever
credentials boto3 finds (env keys, ~/.aws/credentials, or an instance/task role), and
that identity needs sts:AssumeRole on the role.AWS_INSTANCES.
Option 4: Persistent store
Credentials
IAM role (recommended)
- Create an IAM role that OpenSRE can assume (or attach to the host).
- Attach read-only permissions (see below).
- Set
AWS_ROLE_ARN(and optionalAWS_EXTERNAL_ID) or enter the ARN inopensre integrations setup aws.
Static access keys
- Create an IAM user with the same read-only permissions.
- Create an access key and set
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY(andAWS_SESSION_TOKENif temporary).
IAM permissions
OpenSRE needs read-only access. Attach the AWS managedReadOnlyAccess policy, or a custom policy scoped to the services you want OpenSRE to inspect.
For least privilege, the minimum services used are:
opensre integrations verify aws assumes AWS_ROLE_ARN when set. Many AWS investigation tools (S3, CloudTrail, EC2, ELB, Lambda) call AWS through the ambient credential chain (environment keys, shared profile, or instance/task role) and do not assume that role for the API call. Give S3/CloudTrail/EC2 permissions to the identity the OpenSRE process actually runs as.Investigation tools
Verify
/integrations verify aws or /verify aws. Aliases such as eks also map to this check.
Troubleshooting
Security
- Prefer IAM roles over static keys wherever possible.
- Scope IAM permissions to only the AWS services OpenSRE needs to inspect.
- Rotate static access keys regularly.
- Enable CloudTrail so all OpenSRE API calls are auditable.
- Store keys in
.envor your secret manager — not in source control.