

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 管理預設 AWS Security Token Service 端點
<a name="emr-emrfs-sts-endpoint"></a>

EMRFS 使用 AWS Security Token Service (STS) 擷取臨時安全登入資料，以存取您的 AWS 資源。舊版 Amazon EMR 發行版本會將所有 AWS STS 請求傳送至位於 的單一全域端點`https://sts.amazonaws.com`。Amazon EMR 發行版本 5.31.0 和 6.1.0 及更新版本會改為向區域 AWS STS 端點提出請求。這可以減少延遲並提高工作階段字符有效性。如需端點的詳細資訊 AWS STS ，請參閱*AWS Identity and Access Management 《 使用者指南*》中的[AWS STS 在 AWS 區域中管理](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) 。

在您使用 Amazon EMR 發行版本 5.31.0 和 6.1.0 及更新版本時，您可以覆寫預設 AWS STS 端點。若要執行此操作，您必須變更 `emrfs-site` 組態中的 `fs.s3.sts.endpoint` 屬性。

下列 AWS CLI 範例會將 EMRFS 使用的預設 AWS STS 端點設定為全域端點。

```
aws emr create-cluster --release-label {{<emr-5.33.0>}} --instance-type m5.xlarge \
--emrfs Args=[fs.s3.sts.endpoint={{https://sts.amazonaws.com}}]
```

**注意**  
包含 Linux 行接續字元 (\\) 是為了提高可讀性。它們可以在 Linux 命令中移除或使用。對於 Windows，請將其移除或取代為插入符號 (^)。

或者，您可以使用下列範例建立 JSON 組態檔案，並使用 `emr create-cluster` 的 `--configurations` 引數來指定它。如需有關使用 `--configurations,` 的詳細資訊，請參閱[《AWS CLI 命令參考》**](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/emr/create-cluster.html)。

```
[
  {
    "classification": "emrfs-site",
    "properties": {
      "fs.s3.sts.endpoint": "https://sts.amazonaws.com"
    }
  }
]
```