lmaws
lmaws is the AWS scripting host for LMScript, providing both the shared lmcloud procedural schema and a curated AWS inventory, spend, and sandbox API.
Quick reference
Declare lmaws in an LMScript program or run its CLI directly against offline synthetic fixtures, the local awssim emulator on 127.0.0.1:4566, or guarded live AWS accounts.
lmaws --version
lmaws --lmcode-schema --json
lmaws --lmcode-signatures
lmaws --sweep --dry-run
p = _lmcode_ cli="lmaws" install="github:lmctl-ai/lmaws@latest";
| Surface | Command or method | Purpose |
|---|---|---|
| Shared cloud context | context cloud: Cloud | Provider-neutral S3 object storage, SQS queues, DynamoDB tables, IAM policy lint/attach, Lambda functions, Cognito userpools, cost caps, and metrics. |
| AWS inventory and spend | context aws: Aws; aws.example(name) | Read-only AWS inventory, Cost Explorer spend reports, CloudFront traffic, EC2 fleet cost analysis, and run-owned sandboxes. |
| Emulator endpoint | cloud.set_endpoint("all", "http://127.0.0.1:4566") | Target a local awssim instance over loopback HTTP using dummy test/test SigV4 credentials. |
| Orphan sweeper | lmaws --sweep [--apply|--dry-run] [--all-stale] [RUN_ID] | Inspect or tear down run-owned resources recorded in durable recovery journals. |
| Standard REST and CLI | rest_config, rest_route, rest_serve, rest_stop, rest_cli | Expose S3, SQS, and DynamoDB workflows as HTTP routes (:param patterns) and CLI commands via lmcode_std_v3 interfaces. |
Runnable LMScript example using lmaws with the shared cloud context and standard REST and CLI routing:
p = _lmcode_ cli="lmaws" install="github:lmctl-ai/lmaws@latest";
@"/s3/:bucket/:key"
fn get_s3(x: RestExchange) -> void implements RestGet {
x.send(cloud.object_get(x.param("bucket"), x.param("key")));
}
@"enqueue"
fn cmd_enqueue(x: RestExchange) -> void implements CliCommand {
let id = cloud.queue_send("lmaws-jobs", x.body());
x.send("sent:" + id);
}
rest_config("prefix", "/v1");
cloud.set_cost_cap_usd(0.05);
cloud.bucket_create("lmaws-demo-bkt");
cloud.object_put("lmaws-demo-bkt", "config.json", "{\"region\":\"us-east-1\"}");
cloud.queue_create("lmaws-jobs");
let cli_res = rest_cli(str_split("enqueue -- build-artifact", " "));
let http_res = rest_cli(str_split("/v1/s3/lmaws-demo-bkt/config.json", " "));
print(cli_res + " | " + http_res);
end _lmcode_
r = run_lmcode(p);
assert(r.ok, "lmaws run failed");
Documentation pages
- Skill — LLM agent authoring rules, commands, live safety gates, and verification steps for lmaws.
- Guide — Architecture, awssim emulator setup, live double/triple opt-in guardrails, spend reporting, and standard REST/CLI interfaces.
- Reference — CLI flags, environment variables, Cloud and Aws schema signatures, standard REST/CLI interfaces, and exit codes.