将连接凭证存储在 Amazon Secrets Manager - Amazon Glue
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

将连接凭证存储在 Amazon Secrets Manager

我们建议您使用 Amazon Secrets Manager 为数据存储提供连接凭据。通过这种方式使用 Secrets Manager,可以在运行时 Amazon Glue 访问您的密钥以进行ETL作业和爬虫运行,并有助于保护您的凭据安全。

先决条件

要将 Secrets Manager 与一起使用 Amazon Glue,您必须向您的IAM角色授予检索密钥值的 Amazon Glue权限。 Amazon 托管策略AWSGlueServiceRole不包括 Amazon Secrets Manager 权限。有关IAM策略示例,请参阅《Amazon Secrets Manager用户指南》中的示例:检索机密值的权限

根据您的网络设置,您可能还需要创建一个VPC端点,以便在您VPC和 Secrets Manager 之间建立私有连接。有关更多信息,请参阅使用 Amazon Secrets Manager VPC终端节点

为创建密钥 Amazon Glue
  1. 请遵循《Amazon Secrets Manager 用户指南》中的创建和管理密钥中的说明。以下示例JSON说明了在为创建密钥时如何在 Plaintext 选项卡中指定您的证书。 Amazon Glue

    { "username": "EXAMPLE-USERNAME", "password": "EXAMPLE-PASSWORD" }
  2. 使用 Amazon Glue Studio 接口将您的密钥与连接关联。有关详细信息,请参阅《Amazon Glue Studio 用户指南》中的 Creating connections for connectors