Skip to content

Commit a458459

Browse files
committed
docs(parameters): add new force_fetch param
1 parent 2bde5ad commit a458459

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/utilities/parameters.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ The following will retrieve the latest version and store it in the cache.
8888

8989
## Advanced
9090

91+
### Always fetching the latest
92+
93+
By default, we cache parameters retrieves for 5 seconds. If you'd like to override this behaviour and always fetch the latest parameter from the store, use `force_fetch` param.
94+
95+
=== "app.py"
96+
97+
```python hl_lines="5"
98+
from aws_lambda_powertools.utilities import parameters
99+
100+
def handler(event, context):
101+
# Retrieve a single parameter
102+
value = parameters.get_parameter("/my/parameter", force_fetch=True)
103+
```
104+
91105
### Built-in provider class
92106

93107
For greater flexibility such as configuring the underlying SDK client used by built-in providers, you can use their respective Provider Classes directly.

0 commit comments

Comments
 (0)