### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

There's no way to explicitly toggle the `-inMemory` flag for DynamoDB - it relies on [`db_path` being unset](https://github.com/localstack/localstack/blob/v1.0.1/localstack/services/dynamodb/server.py#L45). However, `db_path` is always set because it [relies on config.dirs.data](https://github.com/localstack/localstack/blob/v1.0.1/localstack/services/dynamodb/server.py#L107-L113), which is [always set](https://github.com/localstack/localstack/blob/v1.0.1/localstack/config.py#L119).

### Expected Behavior

Maybe have an explicit env var like `DYNAMODB_IN_MEMORY` to force `-inMemory` mode or fix the path based logic in which it can be enabled.

Use case: I'm running tests on an ephemeral localstack container and don't need persistence. I think I'm experiencing the performance hit in https://github.com/localstack/localstack/issues/1205 and `-inMemory` seems be significantly faster.

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

`docker-compose.yml`
```yaml
version: '3.8'
services:
  localstack:
    image: localstack/localstack:1.0
    environment:
      - EDGE_PORT=4566
      - EAGER_SERVICE_LOADING=1
      - SERVICES=dynamodb
      - PERSISTENCE=0
```

```
$ docker-compose up
...
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : Initializing DynamoDB Local with the following configuration:
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : Port:	34585
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : InMemory:	false
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : DbPath:	/var/lib/localstack/tmp/state/dynamodb
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : SharedDb:	false
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : shouldDelayTransientStatuses:	false
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : CorsParams:	*
...
```

### Environment

```markdown
- OS: Docker on Mac M1
- LocalStack: 1.0.1
```


### Anything else?

_No response_
TMP_FOLDER = os.path.join(tempfile.gettempdir(), "localstack")
VOLUME_DIR = os.environ.get("LOCALSTACK_VOLUME_DIR", "").strip() or TMP_FOLDER
if TMP_FOLDER.startswith("/var/folders/") and os.path.exists("/private%s" % TMP_FOLDER):
    TMP_FOLDER = "/private%s" % TMP_FOLDER
HOST_TMP_FOLDER = os.environ.get("HOST_TMP_FOLDER", TMP_FOLDER)
LEGACY_DIRECTORIES = is_env_true("LEGACY_DIRECTORIES")
LS_LOG = eval_log_type("LS_LOG")
DEBUG = is_env_true("DEBUG") or LS_LOG in TRACE_LOG_LEVELS
DEVELOP = is_env_true("DEVELOP")
DEVELOP_PORT = int(os.environ.get("DEVELOP_PORT", "").strip() or DEFAULT_DEVELOP_PORT)
WAIT_FOR_DEBUGGER = is_env_true("WAIT_FOR_DEBUGGER")
USE_SSL = is_env_true("USE_SSL")
LEGACY_EDGE_PROXY = is_env_true("LEGACY_EDGE_PROXY")
FAIL_FAST = is_env_true("FAIL_FAST")
USE_SINGLE_REGION = is_env_true("USE_SINGLE_REGION")
TF_COMPAT_MODE = is_env_true("TF_COMPAT_MODE")
DEFAULT_ENCODING = "utf-8"
DOCKER_SOCK = os.environ.get("DOCKER_SOCK", "").strip() or "/var/run/docker.sock"
DOCKER_FLAGS = os.environ.get("DOCKER_FLAGS", "").strip()
DOCKER_CMD = os.environ.get("DOCKER_CMD", "").strip() or "docker"
LEGACY_DOCKER_CLIENT = is_env_true("LEGACY_DOCKER_CLIENT")
FORWARD_EDGE_INMEM = True
EDGE_BIND_HOST = os.environ.get("EDGE_BIND_HOST", "").strip() or "127.0.0.1"
EDGE_PORT = int(os.environ.get("EDGE_PORT") or 0) or DEFAULT_PORT_EDGE
EDGE_PORT_HTTP = int(os.environ.get("EDGE_PORT_HTTP") or 0)
EDGE_FORWARD_URL = os.environ.get("EDGE_FORWARD_URL", "").strip()
DOCKER_BRIDGE_IP = os.environ.get("DOCKER_BRIDGE_IP", "").strip()
ENABLE_CONFIG_UPDATES = is_env_true("ENABLE_CONFIG_UPDATES")
DISABLE_CORS_HEADERS = is_env_true("DISABLE_CORS_HEADERS")
DISABLE_CORS_CHECKS = is_env_true("DISABLE_CORS_CHECKS")