# orca.awsjson

> A module of morca's API.

One signed call to an AWS service's JSON API (Secrets Manager's `GetSecretValue`, SSM's `GetParameter`): SigV4 over objectstore's HTTP, with the credentials of the `AWS_*` environment or else the instance role. A low module: `orca.control` and `orca.machines_ec2` both use it.

## Functions

### `aws_region`

```mojo
def aws_region() -> String
```

### `aws_json`

```mojo
def aws_json(service: String, target: String, endpoint_env: String, body: String) -> Tuple[Int, String]
```

POSTs `body` to `service` (`secretsmanager`, `ssm`) as `target` (`secretsmanager.GetSecretValue`): the status and the answer. The endpoint is `https://<service>.<region>.amazonaws.com`, or `endpoint_env`'s value (tests' stand-ins). Raises without a region or credentials, or when it can't be reached.
