Commit 9d19484
authored
fix: avoid nested tokio runtime panic in AWS credential vendor (#6689)
## Summary
- `aws_config::load()` may internally create a nested tokio runtime for
credential resolution (e.g. IMDS, SSO), which panics with "Cannot drop a
runtime in a context where blocking is not allowed" when called inside
an existing async context
- Wrap the `aws_config` loading in `spawn_blocking` to isolate the
internal runtime from the caller's async context1 parent 4853487 commit 9d19484
1 file changed
Lines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
155 | 165 | | |
156 | 166 | | |
157 | 167 | | |
| |||
0 commit comments