Cannot add VPC to my lambda function

0

Hi,

I've run into a problem where I can't add a VPC to my Lambda function. I followed the steps outlined in this Stack Overflow post (https://stackoverflow.com/questions/41177965/the-provided-execution-role-does-not-have-permissions-to-call-describenetworkint), but I'm still getting the error message "The provided execution role does not have permissions to call CreateNetworkInterface on EC2". Do you have any suggestions on how to resolve this issue?

PS: I've attached three permission to my IAM user: AmazonEC2ContainerRegistryFullAccess, AWSLambda_FullAccess, AWSLambdaVPCAccessExecutionRole.

Thanks!

1 Respuesta
2
Respuesta aceptada

Hello.

Please set the following IAM policy for the IAM role used by Lambda, not for the IAM user.
https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html#permissions-executionrole-features

AWSLambdaVPCAccessExecutionRole

AWSLambdaVPCAccessExecutionRole grants permissions to manage ENIs within an Amazon VPC and write to CloudWatch Logs.

You can check the IAM role used by Lambda from the Lambda screen.
lambda

profile picture
EXPERTO
respondido hace 9 meses
profile picture
EXPERTO
revisado hace un mes
profile pictureAWS
EXPERTO
revisado hace 9 meses
profile pictureAWS
EXPERTO
revisado hace 9 meses
  • Great, thank you so much

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas