Skip to content

Commit 8812e7c

Browse files
abrichrclaude
andauthored
docs: document AWS SSO as recommended auth method (#80)
- Update README: replace static key instructions with SSO guide including example ~/.aws/config and aws configure sso workflow - Update CLAUDE.md AWS section with SSO note - Update aws_vm.py docstring to include SSO in credential chain No code changes needed — boto3's default credential chain already handles SSO transparently. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 115d2ce commit 8812e7c

3 files changed

Lines changed: 51 additions & 9 deletions

File tree

CLAUDE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ oa-vm pool-cleanup -y
124124

125125
### AWS Support
126126

127-
WAA also runs on AWS EC2 using the same pool commands with `--cloud aws`:
127+
WAA also runs on AWS EC2 using the same pool commands with `--cloud aws`.
128+
129+
**Auth**: Uses boto3's default credential chain. SSO is recommended: `aws configure sso` (one-time), then `aws sso login` before each session. Static keys (`AWS_ACCESS_KEY_ID`) also work.
128130

129131
```bash
130132
# Verify AWS setup (read-only, free)

README.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,47 @@ OPENAI_API_KEY=sk-...
286286
AZURE_SUBSCRIPTION_ID=...
287287
AZURE_ML_RESOURCE_GROUP=...
288288
AZURE_ML_WORKSPACE_NAME=...
289+
```
290+
291+
### AWS authentication
292+
293+
AWS credentials are resolved via [boto3's default credential chain](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html). **SSO (IAM Identity Center) is recommended** for interactive use:
294+
295+
```bash
296+
# One-time setup — opens a guided wizard
297+
aws configure sso
298+
# Prompts for: SSO start URL, region, account, role name, profile name
299+
300+
# Login (opens browser, caches short-lived token)
301+
aws sso login
302+
303+
# Verify it works
304+
oa-vm smoke-test-aws
289305

290-
# AWS (for --cloud aws VM management)
291-
AWS_ACCESS_KEY_ID=...
292-
AWS_SECRET_ACCESS_KEY=...
293-
AWS_DEFAULT_REGION=us-east-1
306+
# All oa-vm --cloud aws commands now work automatically
307+
oa-vm pool-create --cloud aws --workers 1
308+
```
309+
310+
<details>
311+
<summary>Example <code>~/.aws/config</code> for SSO</summary>
312+
313+
```ini
314+
[default]
315+
sso_session = my-org
316+
sso_account_id = 111122223333
317+
sso_role_name = PowerUserAccess
318+
region = us-east-1
319+
320+
[sso-session my-org]
321+
sso_start_url = https://my-org.awsapps.com/start
322+
sso_region = us-east-1
323+
sso_registration_scopes = sso:account:access
294324
```
295325

326+
</details>
327+
328+
Static keys (`AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` in `.env`) also work but are not recommended for interactive use -- they don't expire and are a security risk if leaked.
329+
296330
See [`openadapt_evals/config.py`](openadapt_evals/config.py) for all available settings.
297331

298332
## Custom Agents

openadapt_evals/infrastructure/aws_vm.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
77
Requires: pip install boto3 (or: uv sync --extra aws)
88
9-
Auth uses boto3's default credential chain:
9+
Auth uses boto3's default credential chain (first match wins):
1010
1. Environment variables (AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY)
11-
2. Shared credentials file (~/.aws/credentials)
12-
3. AWS config file (~/.aws/config)
13-
4. Instance metadata (on EC2)
11+
2. IAM Identity Center / SSO (~/.aws/config with sso_session)
12+
3. Shared credentials file (~/.aws/credentials)
13+
4. AWS config file (~/.aws/config)
14+
5. Instance metadata (on EC2)
15+
16+
SSO is the recommended approach for interactive use:
17+
aws configure sso # one-time setup
18+
aws sso login # opens browser, caches token
19+
# Then all oa-vm --cloud aws commands work automatically
1420
1521
Example:
1622
from openadapt_evals.infrastructure.aws_vm import AWSVMManager

0 commit comments

Comments
 (0)