

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 Python UDF 将继续正常运行至 2026 年 6 月 30 日。有关更多信息，请参阅[博客文章](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

# 创建身份验证配置文件
<a name="connecting-with-authentication-profiles-creating"></a>

通过 AWS CLI，您可以使用 `create-authentication-profile` 命令创建身份验证配置文件。这假定您已有一个 Amazon Redshift 集群和现有数据库。您的凭证必须具有连接到 Amazon Redshift 数据库的权限以及获取身份验证配置文件的权限。您可以将配置选项作为 JSON 字符串提供，或者引用包含 JSON 字符串的文件。

```
create-authentication-profile --authentication-profile-name<value: String> --authentication-profile-content<value: String>
```

 以下示例创建一个名为 `ExampleProfileName` 的配置文件。在这里，您可以将定义集群名称和其它选项设置的键和值作为 JSON 字符串添加。

```
create-authentication-profile --authentication-profile-name "ExampleProfileName" --authentication-profile-content "{\"AllowDBUserOverride\":\"1\",\"Client_ID\":\"ExampleClientID\",\"App_ID\":\"ExampleAppID\",\"AutoCreate\":false,\"enableFetchRingBuffer\":true,\"databaseMetadataCurrentDbOnly\":true}"
}
```

 此命令使用指定的 JSON 设置创建配置文件。返回以下内容，表示已创建配置文件。

 `{"AuthenticationProfileName": "ExampleProfileName", "AuthenticationProfileContent": "{\"AllowDBUserOverride\":\"1\",\"Client_ID\":\"ExampleClientID\",\"App_ID\":\"ExampleAppID\",\"AutoCreate\":false,\"enableFetchRingBuffer\":true,\"databaseMetadataCurrentDbOnly\":true}" } ` 

## 创建身份验证配置文件的限制和配额
<a name="connecting-with-authentication-profiles-limitations"></a>

每位客户的配额为十（10）个身份验证配置文件。

身份验证配置文件可能发生某些错误 例如，如果您使用现有名称创建新的配置文件，或者您是否超过了配置文件配额。有关更多信息，请参阅 [CreateAuthenticationProfile](https://docs.aws.amazon.com/redshift/latest/APIReference/redshift-api.pdf#API_CreateAuthenticationProfile)。

您无法在身份验证配置文件存储中存储 JDBC、ODBC 和 Python 连接字符串的某些选项键和值：
+ `AccessKeyID`
+ `access_key_id`
+ `SecretAccessKey`
+ `secret_access_key_id`
+ `PWD`
+ `Password`
+ `password`

对于 JDBC 或 ODBC 连接字符串，您不能在配置文件存储中存储键或值 `AuthProfile`。对于 Python 连接，您无法存储 `auth_profile`。

身份验证配置文件存储在 Amazon DynamoDB 中并由 AWS 管理。