

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

# 使用 Amazon Q Developer 搭配其他服務
<a name="other-setup"></a>

## AWS Identity and Access Management 其他服務的 許可
<a name="q-dev-IAM-policies-other"></a>

 若要讓 Amazon Q 在另一項服務的內容中提供建議，您必須為您的 IAM 使用者或角色啟用正確的 IAM 許可。您必須新增 `codewhisperer:GenerateRecommendations` 許可，如以下 IAM 政策範例所述：

**注意**  
`codewhisperer` 字首是與 Amazon Q Developer 合併之服務的舊名稱。如需詳細資訊，請參閱[Amazon Q Developer 重新命名 - 變更摘要](service-rename.md)。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "AmazonQDeveloperPermissions",
      "Effect": "Allow",
      "Action": ["codewhisperer:GenerateRecommendations"],
      "Resource": "*"
    }
  ]
}
```

------

最佳實務是使用 IAM 政策將更嚴苛許可授予 IAM 主體。如需使用 IAM 的詳細資訊，請參閱《IAM 使用者指南》**中的[安全最佳實務](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)。