Skip to content

Commit c7f7b6e

Browse files
committed
docs(metadata): clarify public import path for get_lambda_metadata
1 parent 5147309 commit c7f7b6e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/utilities/metadata.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ The Metadata utility allows you to fetch data from the [AWS Lambda Metadata Endp
2121

2222
You can fetch data from the Lambda Metadata Endpoint using the `get_lambda_metadata` function.
2323

24+
Import it from `aws_lambda_powertools.utilities.metadata` (the public package path):
25+
26+
```python
27+
from aws_lambda_powertools.utilities.metadata import get_lambda_metadata
28+
```
29+
30+
???+ warning "Import path is `utilities.metadata`"
31+
The correct module path is `aws_lambda_powertools.utilities.metadata`.
32+
33+
Do **not** import from `aws_lambda_powertools.utilities.lambda_metadata` — that path is not part of the public API (even though the implementation file and `get_lambda_metadata` helper share a similar name).
34+
2435
???+ tip
2536
Metadata is cached for the duration of the Lambda sandbox, so subsequent calls to `get_lambda_metadata` will return the cached data.
2637

0 commit comments

Comments
 (0)