Integrations
AWS
AWS calls signed and executed by Alter.
AWS managed-secret providers carry extra structure because Alter computes the full AWS Signature Version 4 (SigV4) signature per outgoing request. One stored AWS access key works against every AWS service — S3, Lambda, DynamoDB, Bedrock, CloudWatch — without any per-service configuration.
| Property | Value |
|---|---|
| Template ID | aws |
| Category | Developer Tools |
| Credential type | SigV4 |
| Required credentials | Access Key ID + Secret Access Key |
| Region / service | Detected from the request URL; optional stored fallback for a custom domain |
Storing the credential
Section titled “Storing the credential”- In the AWS IAM Console, create or pick a user with least-privilege permissions and generate an access key.
- In the developer portal: Managed Secrets → Add Provider → AWS.
- Paste Access Key ID and Secret Access Key, and the optional Session Token for temporary credentials from AWS STS (a new access key needs its own, so a rotation never keeps it). No region or service configuration is needed for a standard AWS hostname (see Supported URL patterns). For a custom domain, also fill the optional Region and Service fields.
- Save. A
grant_idis returned.
Never use root account access keys. Always scope IAM permissions to the routes the application needs.
The AWS template is the usual choice for AWS itself. For another SigV4 service, such as an S3-compatible store, create a Custom provider and pick AWS SigV4 as its credential type: it takes the same Access Key ID and Secret Access Key, an optional Session Token for temporary credentials from AWS STS, and the optional Region and Service, and Alter sets the Authorization header itself. From the CLI: alter managed-secrets create --name <name> --credential-type aws_sig_v4 --credential-value - --credentials @aws.json, where the file holds secret_key and any of session_token, region and service. Its additional injection rules are applied before signing, so the signature covers them; a rule that sets a signing header (Authorization, X-Amz-Date, X-Amz-Content-Sha256, X-Amz-Security-Token) or a header the proxy reserves, a presigned-URL query parameter (such as X-Amz-Signature), or that reads secret_key or session_token, is refused when the provider is saved. Such a provider has no AWS operation catalog: its content rules match only the operations its operator maps (see Connect a custom API). Its keys are not checked when they are saved, because a single check request cannot reproduce Signature V4 request signing, so a key is verified the first time it is used. A new access key needs its own session token, which a rotation never keeps.
Non-proxy use: boto3 and the CLI
Section titled “Non-proxy use: boto3 and the CLI”app.proxy_request() is the default. Where a proxy cannot be used, for example AWS access from a private VPC, Python boto3_client() and alter sdk-passthrough request release the AWS credential into the calling process. As for any provider, this is refused by default and allowed only by a scoped, expiring credential-release exception that an organization administrator sets for that caller and the provider or grant.
With no exception, boto3_client() calls raise NonProxyDisabledError and the CLI prints non_proxy_disabled. Create an exception under Settings → API key policy → Credential-release exceptions, or call AWS through app.proxy_request().
Calling AWS — app.proxy_request() (Python and TypeScript)
Section titled “Calling AWS — app.proxy_request() (Python and TypeScript)”The default path. Pass the standard AWS hostname; Alter parses region and service from the URL and signs the request.
from alter_sdk import PendingApprovalimport os
from alter_sdk import App, HttpMethod
async with App(api_key=os.environ["ALTER_API_KEY"]) as app: # S3 r = await app.proxy_request( HttpMethod.GET, "https://s3.us-east-1.amazonaws.com/my-bucket/my-key", grant_id=os.environ["AWS_GRANT_ID"], ) if isinstance(r, PendingApproval): for gate in r.gates: print("Approval required:", gate.approval_url) r = await app.await_approval(r.approval_id)
# Bedrock — same credential, different service and region r = await app.proxy_request( HttpMethod.POST, "https://bedrock-runtime.us-west-2.amazonaws.com/model/anthropic.claude-sonnet-4-6/invoke", grant_id=os.environ["AWS_GRANT_ID"], json={"prompt": "Hello"}, ) if isinstance(r, PendingApproval): for gate in r.gates: print("Approval required:", gate.approval_url) r = await app.await_approval(r.approval_id)
# Lambda r = await app.proxy_request( HttpMethod.POST, "https://lambda.eu-west-1.amazonaws.com/2015-03-31/functions/my-func/invocations", grant_id=os.environ["AWS_GRANT_ID"], json={"key": "value"}, ) if isinstance(r, PendingApproval): for gate in r.gates: print("Approval required:", gate.approval_url) r = await app.await_approval(r.approval_id)import { App, HttpMethod } from "@alter-ai/alter-sdk";
const app = new App({ apiKey: process.env.ALTER_API_KEY! });const grantId = process.env.AWS_GRANT_ID!;try { // S3 let s3 = await app.proxyRequest({ method: HttpMethod.GET, url: "https://s3.us-east-1.amazonaws.com/my-bucket/my-key", grantId }); if ("status" in s3) { for (const gate of s3.gates) { console.log("Approval required:", gate.approvalUrl); } s3 = await app.awaitApproval(s3.approvalId); }
// Bedrock let bedrock = await app.proxyRequest({ method: HttpMethod.POST, url: "https://bedrock-runtime.us-west-2.amazonaws.com/model/anthropic.claude-sonnet-4-6/invoke", grantId, json: { prompt: "Hello" } }); if ("status" in bedrock) { for (const gate of bedrock.gates) { console.log("Approval required:", gate.approvalUrl); } bedrock = await app.awaitApproval(bedrock.approvalId); }} finally { await app.close();}No AWS SDK dependency. SigV4 is computed by the Alter backend using standard cryptographic libraries.
Supported URL patterns
Section titled “Supported URL patterns”Alter 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 a host that is not a standard AWS endpoint (LocalStack, a custom domain, a proxy), Alter cannot detect the region and service from the hostname. Store them with the credential instead, as the region field (an AWS region, for example us-east-1) and the service field (the signing name, lowercase letters, digits and hyphens, for example s3). In the developer portal, fill the optional Region and Service fields when adding the provider, or later in Edit credential, which shows the stored values beside the fields and keeps them when the fields are left blank. From the CLI, pass --credential-field region=us-east-1 --credential-field service=s3 to alter managed-secrets create, or add them later with alter managed-secrets rotate <provider> and no --credential-value, which keeps the stored key (Update fields and keep the key). Alter uses the stored values only when the hostname names neither; a region or service detected from the hostname always wins. Rotating the access key keeps them.
Errors and signing diagnostics
Section titled “Errors and signing diagnostics”The request hostname is the source of truth for standard AWS endpoints. Its detected region and service take precedence over fallback metadata, so one stored access key can call multiple regions and services. Do not create a separate Alter credential per region solely for signing.
BackendErrorbefore the provider call means the resolved grant did not carry complete signing material. Store the credential again with both the access key ID and secret access key.ProviderAPIErrorwith an AWSSignatureDoesNotMatchresponse means the URL was signed for a different region or signing service than AWS expected. Use one of the supported hostname forms above and confirm the URL names the intended region and service.- A custom hostname with no detectable region or service is signed with the
credential’s stored
regionandservice(see above). Without them, Alter fails before sending the request rather than guessing.
Rotation
Section titled “Rotation”When the AWS access key rotates: regenerate in IAM, then update the stored value in the portal under Managed Secrets → AWS → Update credential. Every existing grant_id keeps working with the new key, and a stored region and service are kept.
What’s next
Section titled “What’s next”General managed-secret flow.
Managed secret providersOther catalog entries.
Python SDKProxy request reference.
Policy-cataloged operations
Section titled “Policy-cataloged operations”Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.
| Operation ID | Families | Method | Provider path |
|---|---|---|---|
sns/Publish | admin, delete, read, send, write | POST | / |
s3/DeleteObject | admin, delete | DELETE | /{Bucket}/{+Key} |
s3/PutObject | admin, write | PUT | /{Bucket}/{+Key} |
lambda/Invoke | write | POST | /2015-03-31/functions/{FunctionName}/invocations |
s3/CreateBucket | write | PUT | /{Bucket} |
lambda/ListFunctions | read | GET | /2015-03-31/functions |
s3/GetObject | read | GET | /{Bucket}/{+Key} |
s3/HeadObject | read | HEAD | /{Bucket}/{+Key} |
s3/ListBuckets | read | GET | / |
s3/ListObjectsV2 | read | GET | /{Bucket} |