【发布时间】:2020-05-15 03:58:56
【问题描述】:
我找到了这个rotation function template,我将修改这个模板来创建我自己的轮换函数并告诉 Secrets Manager 使用它来执行轮换。
我的问题是我应该更改模板中的哪个部分,模板中不是很清楚,例如第 47-49 行,我应该将SecretId替换为我的 Secret ARN 吗?
arn = event['SecretId']
token = event['ClientRequestToken']
step = event['Step']
另一个例子:第 57 行
endpoint_url=os.environ['SECRETS_MANAGER_ENDPOINT']
我应该为'SECRETS_MANAGER_ENDPOINT' 使用什么值,也许是'https://secretsmanager.region.amazonaws.com'??
另外,205-206行
This is where the lambda will validate the user's permissions.
Uncomment/modify the below lines to
# tailor these validations to your needs
我需要在这部分添加什么来授予 Secrets Manager 调用此函数的权限?
有点困惑,我几乎一整天都在搞乱整个凭证轮换,任何建议都将不胜感激。
【问题讨论】:
标签: amazon-web-services aws-lambda rotation credentials aws-secrets-manager