The role defined for the function cannot be assumed by Lambda

后端 未结 11 1276
野性不改
野性不改 2021-02-04 23:29

I\'m getting the error \"The role defined for the function cannot be assumed by Lambda\" when I\'m trying to create a lambda function with create-function command.

11条回答
  •  爱一瞬间的悲伤
    2021-02-05 00:04

    I'm also encountering this error. Have not got a definitive answer (yet) but figured I'd pass along a couple of hints that may help you and/or anyone else hitting this problem.

    A) If you build the Role ARN by putting together your account ID and role name, I think the account ID needs to be without any dashes

    B) If you just created the role, and possibly added policies to it, there seems to be a (small) window of time in which the role will trigger this error. Sleeping 5 or 6 seconds between the last operation on the role and the create-function call allowed me to bypass the issue (but of course, the timing may be variable so this is at best a work-around).

提交回复
热议问题