

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

# 了解組態設定檔 IAM 角色
<a name="appconfig-creating-configuration-and-profile-iam-role"></a>

您可以使用 建立提供組態資料存取權的 IAM 角色 AWS AppConfig。或者，您可以自行建立 IAM 角色。如果您使用 建立角色 AWS AppConfig，系統會建立角色，並根據您選擇的組態來源類型指定下列其中一個許可政策。

 **組態來源是 Secrets Manager 秘密** 

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "secretsmanager:GetSecretValue"
             ],
            "Resource": [
                "arn:aws:secretsmanager:us-east-1:111122223333:secret:secret_name-a1b2c3"
            ]
        }
    ]
}
```

------

 **組態來源是參數存放區參數** 

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ssm:GetParameter"
            ],
            "Resource": [
                "arn:aws:ssm:us-east-1:111122223333:parameter/parameter_name"
            ]
        }
    ]
    }
```

------

 **組態來源是 SSM 文件** 

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

****  

```
{

    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ssm:GetDocument"
            ],
            "Resource": [
                "arn:aws:ssm:us-east-1:111122223333:document/document_name"
            ]
        }
    ]
}
```

------

如果您使用 建立角色 AWS AppConfig，系統也會為角色建立下列信任關係。

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

****  

```
{

  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "appconfig.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
```

------