由于某些神秘的错误消息,无法创建aws lamda函数 [英] cannot create aws lamda function due to some cryptic error message

查看:138
本文介绍了由于某些神秘的错误消息,无法创建aws lamda函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建aws lambda函数,但是当我单击部署"时,我收到此错误消息:

I am trying to create an aws lambda function but when I click deploy I get this error message:

更正以下错误,然后重试. 您的函数的执行角色必须由edgelambda.amazonaws.com服务主体承担.

Correct the errors below and try again. Your function's execution role must be assumable by the edgelambda.amazonaws.com service principal.

我完全不知道这意味着什么.

I have absolutely no idea what this means.

推荐答案

来自 Lambda @ Edge IAM角色文档:

您必须创建服务可以承担的IAM角色 校长lambda.amazonaws.com和edgelambda.amazonaws.com.这 服务负责人在执行您的任务时承担该角色 功能.有关更多信息,请参见创建角色和附加. "AWS受管的作业策略"主题中的策略(控制台)" "IAM用户指南"中的功能".

You must create an IAM role that can be assumed by the service principals lambda.amazonaws.com and edgelambda.amazonaws.com. This role is assumed by the service principals when they execute your function. For more information, see Creating the Roles and Attaching the Policies (Console) in the topic "AWS Managed Policies for Job Functions" in the IAM User Guide.

您可以在IAM中的信任关系"选项卡下添加此角色(请勿添加 在权限"标签下).

You add this role under the Trust Relationship tab in IAM (do not add it under the Permissions tab).

这是一个示例角色信任策略:

Here's an example role trust policy:

{
   "Version": "2012-10-17",
   "Statement": [
      {
         "Effect": "Allow",
         "Principal": {
            "Service": [
               "lambda.amazonaws.com",
               "edgelambda.amazonaws.com"
            ]
         },
         "Action": "sts:AssumeRole"
      }
   ]
}

这篇关于由于某些神秘的错误消息,无法创建aws lamda函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆