首页 > 解决方案 > 在 AWS Secret Manager 中配置凭证轮换时出现权限错误

问题描述

我正在按照此文档配置凭证轮换,但出现此错误:

Fail to rotate the secret "xxxxxxxx"
Secrets Manager cannot invoke the specified Lambda function. Ensure that the function policy grants access to the principal secretsmanager.amazonaws.com

我使用的是开发人员角色而不是 root 用户,我只是想知道如何解决这个问题并启用轮换?

我有一个潜在的解决方案,也许我可以手动创建一个 Lambda 函数并在 Secret Manager 中选择“使用现有的 Lambda 函数执行轮换”?但我觉得我可能仍然会得到同样的许可问题。任何建议将不胜感激。

标签: amazon-web-servicesaws-lambdaamazon-iamcredentialsaws-secrets-manager

解决方案


您需要授予 Secrets Manager 调用策略的权限 - 请参阅https://aws.amazon.com/premiumsupport/knowledge-center/lambda-function-secrets-manager/

'授予 Secrets Manager 代表您调用该函数的权限'


推荐阅读