### 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_
TRUE_STRINGS,
)
load_start_time = time.time()
class Directories:
    """
    Holds the different directories available to localstack. Some directories are shared between the host and the
    localstack container, some live only on the host and some only in the container.
    Attributes:
        static_libs: container only; binaries and libraries statically packaged with the image
        var_libs:    shared; binaries and libraries+data computed at runtime: lazy-loaded binaries, ssl cert, ...
        cache:       shared; ephemeral data that has to persist across localstack runs and reboots
        tmp:         shared; ephemeral data that has to persist across localstack runs but not reboots
        functions:   shared; volume to communicate between host<->lambda containers
        data:        shared; holds localstack state, pods, ...
        config:      host only; pre-defined configuration values, cached credentials, machine id, ...
        init:        shared; user-defined provisioning scripts executed in the container when it starts
        logs:        shared; log files produced by localstack
    """
    static_libs: str
    var_libs: str
    cache: str
    tmp: str
    functions: str
    data: str
    config: str
    init: str
    logs: str
    
    default_bind_mounts = ["var_libs", "cache", "tmp", "data", "init", "logs"]
    def __init__(