cannot create aws lamda function due to some cryptic error message

后端 未结 1 1416
臣服心动
臣服心动 2021-02-05 00:32

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

Correct the errors below and try again. Your function\'s

1条回答
  •  离开以前
    2021-02-05 00:41

    From the Lambda@Edge IAM Role documenation:

    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.

    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"
          }
       ]
    }
    

    0 讨论(0)
提交回复
热议问题