![](/img/trans.png)
[英]How to generate SSH private key using AWS secret manager rotation for custom lambda function
[英]aws lambda function to support secret manager rotation
I have created a lambda function which I intend to serve as a secret rotation function to be used by the secrets manager, but when I try to add this function as a rotation function in the secrets manager I get the error "Secrets Manager cannot invoke the specified lambda function. Ensure that the function policy grants access to the principal secretsmanager.amazonaws.com" but I have already allowed secrets manager to invoke the function in the functions resource based policy , this is what I have defined
{
"Version": "2012-10-17",
"Id": "default",
"Statement": [
{
"Sid": "Secret-Manager-Access-To-fun_SSH-function",
"Effect": "Allow",
"Principal": {
"Service": "secretsmanager.amazonaws.com"
},
"Action": "lambda:Invoke",
"Resource": "arn:aws:lambda:us-east-1:296808031351:function:fun_ssh"
}
]
}
我無法理解我錯過了什么,我該如何讓它工作?
TIA
一個原因可能是您使用了不正確的操作: lambda:Invoke
。
調用 lambda function 的正確動作是lambda:InvokeFunction
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.