Documentation Index
Fetch the complete documentation index at: https://docs.alterauth.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Use AWS credentials to make authenticated API calls through Alter Vault without exposing your API keys in code. The SDK computes the full AWS Signature Version 4 (SigV4) signature automatically. Two ways to call AWS services:vault.request()— works in both Python and TypeScript. No AWS SDK dependency; the SDK handles SigV4 signing internally.vault.boto3_client()— Python only. Returns a native boto3 service client so you can use the familiar boto3 API (e.g.,client.list_objects_v2(Bucket="...")), with every call routed through Alter Vault for credential management, policy enforcement, and audit logging.
| Property | Value |
|---|---|
| Provider ID | aws |
| Category | Cloud |
| Credential Type | AWS SigV4 |
| Required Credentials | Access Key ID + Secret Access Key |
| Region / Service | Auto-detected from request URL |
Step 1: Get Your Credentials
Log in to the AWS Console
Log in to the AWS Console at console.aws.amazon.com.
Go to IAM and Users
Go to IAM, then Users and select or create a user with least-privilege permissions at console.aws.amazon.com/iam/home#/users.
Step 2: Add to Alter Vault
Open the Developer Portal
Go to portal.alterauth.com and navigate to your app.
Enter your credentials
Paste your Access Key ID and Secret Access Key. That’s it — no region or service configuration needed.
Using in Code
A single AWS credential works across any AWS service. Just pass the standard AWS endpoint URL — the SDK detects the region and service from the hostname and signs the request automatically.Option A: vault.request() (Python & TypeScript)
Usevault.request() when you want a lightweight approach with no AWS SDK dependency. The SDK computes SigV4 signatures internally using standard cryptographic libraries.
Option B: vault.boto3_client() (Python only)
Python only. This feature is not available in the TypeScript SDK. TypeScript users should use
vault.request() above.vault.boto3_client() returns a standard boto3 service client. Every call made through that client is automatically routed through Alter Vault for credential retrieval, SigV4 signing, policy enforcement, and audit logging. You get the full boto3 experience (response parsing, pagination, error types like ClientError) without managing AWS credentials in your code.
Install the optional AWS extra:
boto3 methods are synchronous, so you must call them via
asyncio.to_thread() from async code. Each boto3 call triggers a full Alter Vault request cycle (token retrieval, SigV4 signing, audit log), so policy enforcement and audit logging happen on every AWS API call.boto3_client() parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
service_name | str | (required) | AWS service ("s3", "dynamodb", "bedrock-runtime", etc.) |
grant_id | str | (required) | Grant ID from the Developer Portal |
region_name | str | "us-east-1" | AWS region |
timeout | float | client timeout | Per-request timeout in seconds |
reason | str | None | Audit reason applied to all calls from this client |
context | dict | None | Per-request identity context for audit correlation (e.g., {"tool": "s3_list", "agent": "data-pipeline"}) |
botocore.exceptions.ClientError for AWS errors (e.g., NoSuchBucket, AccessDenied), just like a regular boto3 client. Alter Vault-level errors (closed client, network issues) raise AlterSDKError.
Supported URL Patterns
The SDK auto-detects region and service from these AWS hostname formats:| Pattern | Example | Detected |
|---|---|---|
| Standard | s3.us-east-1.amazonaws.com | service=s3, region=us-east-1 |
| Hyphenated service | bedrock-runtime.us-west-2.amazonaws.com | service=bedrock-runtime, region=us-west-2 |
| S3 virtual-hosted | my-bucket.s3.us-west-2.amazonaws.com | service=s3, region=us-west-2 |
| PrivateLink (regional) | vpce-xxx.monitoring.us-east-2.vpce.amazonaws.com | service=monitoring, region=us-east-2 |
| PrivateLink (zonal) | vpce-xxx-us-east-2c.monitoring.us-east-2.vpce.amazonaws.com | service=monitoring, region=us-east-2 |
| GovCloud | s3.us-gov-west-1.amazonaws.com | service=s3, region=us-gov-west-1 |
For non-AWS custom domains (e.g., a LocalStack endpoint or custom proxy), the SDK cannot auto-detect region and service. Contact support if you need to configure these explicitly.
Notes
- One credential, many services — a single IAM access key can call S3, Lambda, Bedrock, DynamoDB, CloudWatch, and any other AWS service. The SDK signs each request with the correct service and region from the URL.
- No AWS SDK dependency for
vault.request()— the SDK computes SigV4 signatures using only standard cryptographic libraries. You do not need boto3 (Python) or the AWS SDK (Node.js) to usevault.request(). - Optional boto3 integration (Python only) — if you prefer native boto3 methods and response types, install
alter-sdk[aws]and usevault.boto3_client(). See Option B above. - Least-privilege IAM — always create credentials on an IAM user or role with only the permissions your application needs. Never use root account access keys.
- Credential rotation — when you rotate your AWS access key, update it in the Developer Portal. All connections using that secret will immediately use the new key.