# read_schema

> **Function** in `langchain_aws`

📖 [View in docs](https://reference.langchain.com/python/langchain-aws/vectorstores/inmemorydb/schema/read_schema)

Read in the index schema from a dict or yaml file.

Check if it is a dict and return RedisModel otherwise, check if it's a path and
read in the file assuming it's a yaml file and return a RedisModel

## Signature

```python
read_schema(
    index_schema: Optional[Union[Dict[str, List[Any]], str, os.PathLike]],
) -> Dict[str, Any]
```

---

[View source on GitHub](https://github.com/langchain-ai/langchain-aws/blob/6f2c135c815a3469f42b20321f585143dacbb889/libs/aws/langchain_aws/vectorstores/inmemorydb/schema.py#L287)