# IMDSv2 支持

**URL:** https://meta.discourse.org/t/imdsv2-support/272379
**Category:** Self-hosting
**Created:** [2023年七月21日 09:50 UTC](https://meta.discourse.org/t/imdsv2-support/272379 "2023-07-21T09:50:44Z")
**Posts on this page:** 1
**Showing post:** 16

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [2025年十一月17日 16:45 UTC](https://meta.discourse.org/t/imdsv2-support/272379/16 "2025-11-17T16:45:41Z")

</div>

@ducks 确定了用于获取 IMDS 凭证的 SDK 中的超时设置非常激进（1 秒，无重试），因此有可能它正在命中该超时。

但这只是猜测。

如果您通过控制台登录到生产环境，能否进行交互式操作，例如：

```plaintext
discourse(prod)> c = Aws::S3::Client.new(region: ENV['DISCOURSE_S3_REGION'])
=> #<Aws::S3::Client>

discourse(prod)> c.list_objects_v2(bucket: ENV['DISCOURSE_S3_BUCKET']).contents.count
=> 1000

```

---

_[View the full topic](https://meta.discourse.org/t/imdsv2-support/272379)._
