lmaws reference
Reference tables for lmaws command-line flags, environment variables, endpoint precedence, shared Cloud methods, standard lmcode_std_v3 REST and CLI signatures, and exit codes.
CLI flags
| Flag or subcommand | Description |
|---|---|
| [cloud] --version, -V | Print lmaws version string (for example lmaws 0.1.0). |
| [cloud] --help, -h | Print usage, endpoint resolution order, live mode gates, and simulator environment variables. |
| [cloud] --notices | Print embedded third-party notices for lmcode-go, lmcloud hostkit, and AWS SDK for Go v2. |
| [cloud] --lmcode-schema [--json] | Emit raw embedded schema JSON bytes for lmscript compiler verification. |
| [cloud] --lmcode-signatures [--without-std] | Print canonical sorted DSL signatures with or without the 226 lmcode_std_v3 standard signatures. |
| [cloud] [--lmcode|--first|--last] FILE ... | Execute compiled .dslb bytecode files under the validated invocation manifest. |
| --sweep [--apply|--dry-run] [--all-stale] [RUN_ID] | Dry-run or apply LIFO cleanup of run-owned AWS resources from the recovery journal. |
Environment variables
| Variable | Default | Purpose |
|---|---|---|
| LMCLOUD_ENDPOINT, LMAWS_ENDPOINT, AWS_ENDPOINT_URL | unset (in-process fake) | Loopback HTTP emulator origin (such as http://127.0.0.1:4566 for awssim) for all services. |
| LMCLOUD_STORAGE_ENDPOINT, LMAWS_STORAGE_ENDPOINT, AWS_ENDPOINT_URL_S3 | unset | Service-specific endpoint override for S3 object storage. |
| LMCLOUD_QUEUE_ENDPOINT, LMAWS_QUEUE_ENDPOINT, AWS_ENDPOINT_URL_SQS | unset | Service-specific endpoint override for SQS queues. |
| LMAWS_SIM_ACCESS_KEY_ID, LMAWS_SIM_SECRET_ACCESS_KEY | test / test | SigV4 credentials used when connecting to loopback awssim endpoints. |
| LMAWS_SIM_REGION | us-east-1 | SigV4 signing region for loopback emulator requests. |
| LMAWS_COMPAT_STRIP_S3_XID | 1 | Strip S3 ?x-id= query parameter for compatibility with older awssim releases. |
| LMCLOUD_LIVE, LMAWS_LIVE | 0 | Both must be set to 1 to enable Stage 1 read-only live AWS access. |
| LMAWS_LIVE_MUTATE | 0 | Set to 1 (alongside LMCLOUD_LIVE=1 and LMAWS_LIVE=1) to permit Stage 2 owned mutations. |
| LMAWS_LIVE_ACCOUNT, LMAWS_LIVE_REGION | required in live mode | Expected 12-digit AWS account ID (verified via STS) and allowed region (us-east-1). |
| LMAWS_LIVE_COST_CAP_USD | 0.05 (ceiling 0.25) | Maximum USD cost reservation cap for a live run. |
| LMAWS_MAX_MEMORY_MB | 4096 | Process memory budget in whole MiB; invalid values exit 2, breaches exit 3. |
Shared Cloud context methods
| Domain | Methods on cloud (type Cloud) | AWS mapping |
|---|---|---|
| S3 object storage | bucket_create, bucket_delete, bucket_exists, bucket_list, object_put, object_get, object_head, object_delete, object_list, object_list_all | S3 CreateBucket, DeleteBucket, HeadBucket, ListBuckets, PutObject, GetObject, HeadObject, DeleteObject, ListObjectsV2 (path-style on loopback). |
| SQS queues | queue_create, queue_delete, queue_exists, queue_list, queue_send, queue_receive, queue_ack, queue_nack | SQS CreateQueue, DeleteQueue, GetQueueUrl, ListQueues, SendMessage, ReceiveMessage, DeleteMessage, ChangeMessageVisibility. |
| DynamoDB tables | table_create, table_delete, table_exists, table_list, item_new, item_put, item_get, item_delete, item_update, item_query, item_scan | DynamoDB CreateTable (pk and optional sk), DeleteTable, DescribeTable, ListTables, PutItem (with ConditionExpression), GetItem, DeleteItem, UpdateItem, Query, Scan. |
| IAM permissions | principal_current, policy_new, policy_parse, policy_lint, policy_attach, policy_attach_principal, policy_detach, policy_detach_principal, policy_check | IAM policy grammar validation, least-privilege linting, resource/principal policy attachment, and evaluation. |
| Lambda functions | function_config, function_create, function_update, function_delete, function_exists, function_get, function_list, function_publish_version, function_versions, function_alias_set, function_alias_get, function_alias_delete, function_invoke | Lambda function lifecycle, revision fencing, version publishing, alias routing, and synchronous invocation. |
| Cognito userpools | userpool_create, userpool_delete, userpool_exists, userpool_list, user_create, user_get, user_delete, user_set_enabled, user_set_password, user_list, user_sign_in, user_verify_token, group_create, group_delete, group_list, group_add_user, group_remove_user, user_groups | Cognito User Pool directory, user attributes, group memberships, and signed session token verification. |
| Cost and metrics | cost_cap_usd, set_cost_cap_usd, estimated_cost, cost_report, metrics_reset, metrics, provider, endpoint, set_endpoint, abort_on_error, set_abort_on_error, last_error | Pre-request cost reservations, per-operation latency quantiles (p50/p95/max), and normalized CloudError reporting. |
Standard lmcode_std_v3 REST and CLI interfaces
| Symbol | Signature | Purpose |
|---|---|---|
| RestGet .. RestOptions, RestHandler | fn h(x: RestExchange) -> void implements RestGet | RestPost | RestPut | RestDelete | RestPatch | RestHead | RestOptions | RestHandler | HTTP route handler interfaces supporting @"/path/:param" route patterns. |
| CliCommand, CliOption | fn c(x: RestExchange) -> void implements CliCommand | CliOption | CLI subcommand (@"name") and flag (@"--opt") interfaces. |
| rest_config, rest_route, rest_serve, rest_stop, rest_cli | rest_config(k, v); rest_route(m, p, h); rest_serve(); rest_stop(); rest_cli(args) -> string | Configure and run embedded HTTP routes or invoke CLI/REST handlers in-process. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Execution succeeded. |
| 2 | Invalid CLI flags, malformed invocation manifest, or invalid LMAWS_MAX_MEMORY_MB setting. |
| 3 | Cloud operation error, cost cap exceeded, assertion failure, or memory limit breach. |
| 4 | Bytecode file or schema contract loading failure. |