You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/utilities/metadata.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,17 @@ The Metadata utility allows you to fetch data from the [AWS Lambda Metadata Endp
21
21
22
22
You can fetch data from the Lambda Metadata Endpoint using the `get_lambda_metadata` function.
23
23
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
+
24
35
???+ tip
25
36
Metadata is cached for the duration of the Lambda sandbox, so subsequent calls to `get_lambda_metadata` will return the cached data.
0 commit comments