

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

# 設定連線
<a name="setting-up-connections"></a>

完成本節中的任務，進行設定以建立和使用開發人員工具主控台中的連線功能。

**Topics**
+ [註冊 AWS 帳戶](#sign-up-for-aws)
+ [建立並套用具有建立連線許可的策略](#setting-up-connections-iamuser)

## 註冊 AWS 帳戶
<a name="sign-up-for-aws"></a>

若要開始使用 AWS，您需要 AWS 帳戶。如需建立 的相關資訊 AWS 帳戶，請參閱《 *AWS 帳戶管理 參考指南*》中的 [入門 AWS 帳戶](https://docs.aws.amazon.com/accounts/latest/reference/getting-started.html)。

## 建立並套用具有建立連線許可的策略
<a name="setting-up-connections-iamuser"></a>



**若要使用 JSON 政策編輯器來建立政策**

1. 登入 AWS 管理主控台 ，並在 https：//[https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/) 開啟 IAM 主控台。

1. 在左側的導覽窗格中，選擇 **Policies (政策)**。

   如果這是您第一次選擇 **Policies (政策)**，將會顯示 **Welcome to Managed Policies (歡迎使用受管政策)** 頁面。選擇 **Get Started (開始使用)**。

1. 在頁面頂端，選擇 **Create policy (建立政策)**。

1. 在**政策編輯器**中，選擇 **JSON** 選項。

1. 輸入下列 JSON 政策文件：

   ```
    {
       "Version": "2012-10-17",		 	 	 
       "Statement": [
           {
               "Effect": "Allow",
               "Action": [
                   "codeconnections:CreateConnection",
                   "codeconnections:DeleteConnection",
                   "codeconnections:GetConnection",
                   "codeconnections:ListConnections",
                   "codeconnections:GetInstallationUrl",
                   "codeconnections:GetIndividualAccessToken",
                   "codeconnections:ListInstallationTargets",
                   "codeconnections:StartOAuthHandshake",
                   "codeconnections:UpdateConnectionInstallation",
                   "codeconnections:UseConnection"
               ],
               "Resource": [
                   "*"
               ]
           }
       ]
   }
   ```

1. 選擇**下一步**。
**注意**  
您可以隨時切換**視覺化**與 **JSON** 編輯器選項。不過，如果您進行變更或在**視覺化**編輯器中選擇**下一步**，IAM 就可能會調整您的政策結構，以便針對視覺化編輯器進行最佳化。如需詳細資訊，請參閱《*IAM 使用者指南*》中的[調整政策結構](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_policies.html#troubleshoot_viseditor-restructure)。

1. 在**檢視與建立**頁面上，為您正在建立的政策輸入**政策名稱**與**描述** (選用)。檢視**此政策中定義的許可**，來查看您的政策所授予的許可。

1. 選擇 **Create policy** (建立政策) 儲存您的新政策。