### 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_
)
LAMBDA_DOCKER_NETWORK = os.environ.get("LAMBDA_DOCKER_NETWORK", "").strip()
LAMBDA_DOCKER_DNS = os.environ.get("LAMBDA_DOCKER_DNS", "").strip()
LAMBDA_DOCKER_FLAGS = os.environ.get("LAMBDA_DOCKER_FLAGS", "").strip()
LAMBDA_PREBUILD_IMAGES = is_env_true("LAMBDA_PREBUILD_IMAGES")
LAMBDA_CONTAINER_REGISTRY = (
    os.environ.get("LAMBDA_CONTAINER_REGISTRY", "").strip() or DEFAULT_LAMBDA_CONTAINER_REGISTRY
)
LAMBDA_REMOVE_CONTAINERS = (
    os.environ.get("LAMBDA_REMOVE_CONTAINERS", "").lower().strip() not in FALSE_STRINGS
)
LOCAL_PORT_STEPFUNCTIONS = int(os.environ.get("LOCAL_PORT_STEPFUNCTIONS") or 8083)
STEPFUNCTIONS_LAMBDA_ENDPOINT = os.environ.get("STEPFUNCTIONS_LAMBDA_ENDPOINT", "").strip()
WINDOWS_DOCKER_MOUNT_PREFIX = os.environ.get("WINDOWS_DOCKER_MOUNT_PREFIX", "/host_mnt")
S3_SKIP_SIGNATURE_VALIDATION = is_env_not_false("S3_SKIP_SIGNATURE_VALIDATION")
LAMBDA_EXECUTOR = os.environ.get("LAMBDA_EXECUTOR", "").strip()
LAMBDA_FALLBACK_URL = os.environ.get("LAMBDA_FALLBACK_URL", "").strip()
LAMBDA_FORWARD_URL = os.environ.get("LAMBDA_FORWARD_URL", "").strip()
LAMBDA_CODE_EXTRACT_TIME = int(os.environ.get("LAMBDA_CODE_EXTRACT_TIME") or 25)
LAMBDA_STAY_OPEN_MODE = is_in_docker and is_env_not_false("LAMBDA_STAY_OPEN_MODE")
LAMBDA_TRUNCATE_STDOUT = int(os.getenv("LAMBDA_TRUNCATE_STDOUT") or 2000)
KINESIS_INITIALIZE_STREAMS = os.environ.get("KINESIS_INITIALIZE_STREAMS", "").strip()
KMS_PROVIDER = (os.environ.get("KMS_PROVIDER") or "").strip() or "moto"
OPENSEARCH_CUSTOM_BACKEND = (
    os.environ.get("OPENSEARCH_CUSTOM_BACKEND", "").strip()
    or os.environ.get("ES_CUSTOM_BACKEND", "").strip()
)
OPENSEARCH_ENDPOINT_STRATEGY = (
    os.environ.get("OPENSEARCH_ENDPOINT_STRATEGY", "").strip()
    or os.environ.get("ES_ENDPOINT_STRATEGY", "").strip()