# orca.aws

> A module of Orca's API.

`orca aws`: a project's orca on AWS, with the `aws` and `docker` commands its user already has (`aws login`, or `AWS_PROFILE` for a named profile).

orca aws up --email you@example.com [--stack orca] [--hostname H]
                [--console-hostname H] [--budget 100] [--zone us-east-2a]
    orca aws push [--tag T]                     # the project's image, to ECR
    orca aws register [--tag T] [register flags] <pipeline> [...]
    orca aws app <name> [--host H] [--port 8080] [--tag T]
    orca aws status
    orca aws down --yes

`up` creates or updates the stack from the template orca carries
(deploy/aws/orca.yaml, in `orca.aws_assets`); the first time it needs
`--email`, for the Budgets alert, and makes the database's password. `push`
builds the project's image from a staged copy of `pixi.toml`, `pixi.lock`,
`bin/`, `pipelines/` and `src/`, with the project's `Dockerfile.orca` or
else the template (deploy/project.Dockerfile), for arm64, tagged with the
commit (or `--tag`) and `latest`, and pushes it to the stack's repository.
`register` and `app` run on the control instance through SSM: `register`
moves the scheduler and the UI to the image (`orca-refresh`) and registers
each pipeline, `/opt/orca/pipelines/<pipeline>`, with the flags given, as
`orca register` takes them; `app` runs the image's `/opt/orca/bin/<name>`
beside the UI, at `https://<host>` (for `console`, the stack's
`ConsoleHostname`). `down` deletes the stack, which fails while its buckets
hold objects.

Files go to `build/orca-aws/`. `--stack` (default `orca`) and `--region`
(default `AWS_REGION`, else the `aws` command's own) go anywhere.

## Functions

### `aws_command`

```mojo
def aws_command(args: List[String]) -> Int
```

`orca aws <cmd> ...`: `args` is the whole command line.

## Aliases

### `AWS_USAGE`

```mojo
comptime AWS_USAGE = "usage:\n  orca aws up --email ADDR [--hostname H] [--console-hostname H] [--budget N]\n              [--zone AZ]\n  orca aws push [--tag T]\n  orca aws register [--tag T] [register flags] <pipeline> [...]\n  orca aws app <name> [--host H] [--port 8080] [--tag T]\n  orca aws status\n  orca aws down --yes\n  (each takes --stack NAME, default orca, and --region R)"
```
