***

title: ecs add command reference
approved: 2025-05-30T00:00:00.000Z
max-toc-depth: 2
----------------

The `ecs add` command collects information to add the Postman Insights Agent container to an ECS task. See [Examples](#examples). For help, use `-h` or `--help`.

## Usage

```bash
postman-insights-agent ecs add [flags]
```

## Flags

* `--filter string` - Match the packets going to and coming from the API service.
* `--host-allow strings` - Allow only the HTTP hosts matching the regular expressions.
* `--host-exclusions strings` - Remove the HTTP hosts matching the regular expressions.
* `--interfaces strings` - List of network interfaces to listen on. Default: All interfaces on the host.
* `--path-allow strings` - Allow only the HTTP paths matching the regular expressions.
* `--path-exclusions strings` - Remove the HTTP paths matching the regular expressions.
* `--rate-limit float` - Number of requests per minute to capture. Default: 1000.

## Global flags

* `--cluster string` - The name or ARN of the ECS cluster.
* `--dry-run` - Perform a dry run: show what will be done, but don't change ECS.
* `--log-format string` - Set to `color`, `plain`, or `json` to control the log format.
* `--profile string` - Which of the AWS profiles to use to access ECS.
* `--project string` - The Postman Insights project ID.
* `--proxy string` - The domain name, IP address, or URL of an HTTP proxy server to use.
* `--region string` - The AWS region in which the ECS cluster resides.
* `--service string` - The name or ARN of the ECS service.
* `--task string` - The name of the ECS task definition to change.

## Examples

* Capture traffic on `port 80`.

  ```bash
  postman-insights-agent ecs add ... --filter "port 80" ...
  ```

* Capture traffic from specific network interfaces.

  ```bash
  postman-insights-agent ecs add ... --interfaces "lo,eth0" ...
  ```

* Filter out requests fetching files with `.png` or `.jpg` extensions.

  ```bash
  postman-insights-agent ecs add ... --path-exclusions '.*\.png' --path-exclusions '.*\.jpg' ...
  ```

* Filter out requests having host `deb.debian.org`.

  ```bash
  postman-insights-agent ecs add ... --host-exclusions 'deb\.debian\.org' ...
  ```

* Only allow requests having host `www.example.com`.

  ```bash
  postman-insights-agent ecs add ... --host-allow 'www\.example\.com' ...
  ```

* Only allow requests related to the admin endpoints.

  ```bash
  postman-insights-agent ecs add ... --path-allow '*/admin/*' ...
  ```
