# aws

AWS from the back end: SigV4 for any service, the back end's keys (its own,
or a role's by web identity, the container's endpoint or IMDSv2, kept and
fetched again), and the services a product uses week to week. The whole of
it is [docs/aws.md](../../docs/aws.md); S3 is the [s3](../s3/) extension,
on this core.

```text
use "pkg:aws/sqs.mote"

awsSqsSend(env("ORDERS_QUEUE"), JSON.stringify({order: 17}), {})?
```

| File | Covered | Left out, on purpose |
|---|---|---|
| `aws.mote` | Keys: static, web identity (STS), ECS/EKS container, IMDSv2; kept in `AwsLent`; ExpiredToken renewed; endpoints and `AWS_ENDPOINT_URL_*`; JSON, query and REST calls; AWS's codes as kinds; tries while throttled | `~/.aws` profiles, SSO, AssumeRole chains |
| `sigv4.mote` | Header and query signing, session tokens, the body's hash said or not, the path encoded twice but for S3 | Chunked (streaming) payload signing, SigV4a |
| `sqs.mote` | Send, send ten, receive with long polling, delete, visibility, FIFO, dead letters and redrive, counts, a consumer | Queue admin, SQS's query API |
| `dynamo.mote` | Get, put, update, delete with conditions, query and scan paged, batches with what was left asked again, transactions, typed values | PartiQL, streams, table admin |
| `lambda.mote` | Invoke (its result, its log, its error), queue an event | Response streaming, function admin |
| `sns.mote` | Publish (FIFO, attributes), text a phone, a posted message checked by its certificate, subscriptions confirmed (SignatureVersion 1 and 2) | Mobile push |
| `ses.mote` | SES v2 behind `mailSend` (Simple, or raw MIME with files), bounces and complaints through SNS into `MailSuppressed` | Templates, contact lists, SES classic |
| `bedrock.mote` | Converse and ConverseStream behind the ai extension, tools | Images and documents in a turn, guardrails' own fields, InvokeModel |
| `eventstream.mote` | AWS's event stream read, both CRCs checked | Writing one (but for tests) |
| `secrets.mote` | Secrets Manager and SSM Parameter Store read | Writing, rotation |
| `events.mote` | EventBridge PutEvents | Rules, schedules |
| `tests.mote` | SigV4 against AWS's published suite; each service by `given net` | |

Also left out: CloudFront signed URLs and cookies (RSA-SHA1 signing is refused
by the runtime on purpose: RS1 is verify-only), Textract, Rekognition, Transcribe (each an `awsJson` call
away). **Not yet run against AWS**: only against a stand-in
(`tests/all.sh real_svc_aws`) that checks every signature itself.
