Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Lambda Create Function Role Error

Going through some tutorials on AWS Lambda Functions. I keep receiving the error, "It seems there was an error during your role template creation, please double check if the role name is already existing and try again."

I've tried many different scenarios, new roles, existing roles, editing the roles in IAM, give more access and then trying them. I tried creating a lambda function "Authored from Scratch" and "Blueprints". I also logged into my root account to see if my user account had an issue.

Frustrated... can't create anything in Lambda because I receive this error 100% of the time.

AWS Lambda Error Blueprint Screenshot AWS Lambda Error Scratch New Role Screenshot

like image 610
Neal Avatar asked Apr 18 '18 01:04

Neal


3 Answers

Jan 26,2021 - Still an issue .So this is essentially a role based issue and definitely seems to be a bug in the lambda console. What worked for me is to first go to the IAM console , create a role , attach a policy with 'AdministratorAccess',and in 'Trust Relationships' tab add 'lambda.amazonaws.com' as a trusted entity. After this , while creating a lambda function, use this existing role ( instead of creating a new one), and it it should work.

like image 101
Sony Mathew Avatar answered Oct 05 '22 18:10

Sony Mathew


This is still an issue in 2020!

I choose an existing role or try to create a new one, and I get the An error occured during the creation of your role template. Double-check whether the role name already exists and try again. no matter what I choose.

The only option is to wait for 10 minutes and try again.

like image 34
ogroendal Avatar answered Oct 05 '22 19:10

ogroendal


I encountered this and it drove me nuts. In the end I wondered if the GUI was giving me incorrect info, and the role was in fact NOT 'already existing'. I went off and did something else for a couple of minutes, and when I came back everything worked fine with no problems. I suspect it's an AWS console bug.

like image 32
sdcharle Avatar answered Oct 05 '22 17:10

sdcharle