> For the complete documentation index, see [llms.txt](https://docs.rumi.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rumi.systems/rumi-cli/commands/cloud/aws/run-command.md).

# run-command

Execute a command on an instance.

## Syntax

```bash
rumi cloud aws run-command --profile <profile> --network <network> --instance <instance> --command <command> [options]
```

## Options

| Option       | Short | Description              | Default   |
| ------------ | ----- | ------------------------ | --------- |
| `--profile`  | `-p`  | AWS profile to use       | Required  |
| `--network`  | `-n`  | Name of the Rumi network | Required  |
| `--instance` |       | Name of the instance     | Required  |
| `--command`  | `-c`  | Command to execute       | Required  |
| `--region`   | `-r`  | AWS region               | us-east-1 |

## Example

```bash
rumi cloud aws run-command \
  --profile my-aws-profile \
  --network my-network \
  --instance processor-1 \
  --command "ls -la /opt/rumi"
```

## See Also

* [list-instances](/rumi-cli/commands/cloud/aws/list-instances.md)
* [launch-instance](/rumi-cli/commands/cloud/aws/launch-instance.md)
