“Unknown error occurred” when setting custom policy for Interface VPC Endpoint for Lambda

I'm trying to allow AWS Lambda residing in a private VPC to invoke another Lambda not in any VPC. I'm purposely avoiding use of NAT gateways in favor of Interface VPC Endpoints as they're a bit cheaper to use. However, I'm running into trouble configuring a custom policy:

      {
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "[~some stuff~]",
      "Action": [
        "lambda:InvokeFunction"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:lambda:[~region~]:[~taken out~]:function:Test-Invoked"
    }
  ]
}

This was generated by the policy generator provided by AWS, which I copied and pasted. When I tried to create the endpoint, this got overwritten by the default All access. After I tried to change this once the endpoint was created, AWS takes me to an error page saying "Error: An unknown error occurred".

Would appreciate some help on this.

1 ответ

Решение

Политика вашей конечной точки интерфейса недействительна . На этот раз отсутствует его главный элемент.

Но я бы посоветовал использовать политику по умолчанию и контролировать доступ к конечной точке с помощью групп безопасности, а также контролировать разрешения для вызова второй лямбды с помощью ролей IAM и / или разрешений на основе ресурсов лямбда.

Другие вопросы по тегам