Skip to main content

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 configure profile, or an attached instance/task role — so one of those must exist on the machine running OpenSRE

Setup

Option 1: Interactive CLI

Provide a role ARN or static access keys when prompted. If you pick a role and this machine has no base AWS credentials, setup offers to switch to access keys, pause so you can run 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.
For multiple AWS accounts or regions, use multi-instance with AWS_INSTANCES.

Option 4: Persistent store

Credentials

  1. Create an IAM role that OpenSRE can assume (or attach to the host).
  2. Attach read-only permissions (see below).
  3. Set AWS_ROLE_ARN (and optional AWS_EXTERNAL_ID) or enter the ARN in opensre integrations setup aws.

Static access keys

  1. Create an IAM user with the same read-only permissions.
  2. Create an access key and set AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY (and AWS_SESSION_TOKEN if temporary).

IAM permissions

OpenSRE needs read-only access. Attach the AWS managed ReadOnlyAccess 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

Expected output (role example):
Expected output (static keys example):
Inside the REPL: /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 .env or your secret manager — not in source control.