通过环境变量检索密钥 - Amazon Elastic Container Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

通过环境变量检索密钥

您可以使用 Secrets Manager 或 Amazon Systems Manager Parameter Store 来存储敏感数据,而不是在应用程序中以纯文本形式对敏感信息进行硬编码。然后,您可以在容器定义中创建一个环境变量,并输入 Secrets Manager 或 Amazon Systems Manager 密钥的 ARN 作为其值。这将允许您的容器在运行时检索敏感数据。