Skip to content

Unknow Error when creating a Lambda Function

0

I am getting this error when i create a Lambda Function:

Access denied
You don't have permission to perform this action.
UnknownError

I created a Policy but it didnt help.

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Effect": "Allow",
			"Action": [
				"lambda:*",
				"logs:*",
				"cloudwatch:*",
				"iam:PassRole"
			],
			"Resource": "*"
		}
	]
}

What else can i check or do?

  • What permissions does the IAM principial you are logged in as have?

asked a year ago224 views

1 Answer
0

When you're encountering an "Access denied" error with "UnknownError" while trying to create a Lambda function, there are several potential causes and solutions to consider:

  1. Check if your AWS account is managed by Organizations - there might be Service Control Policies (SCPs) in place that are restricting Lambda operations, even if you have the appropriate IAM policies.

  2. Verify you're in the correct AWS region where you intend to create the Lambda function, as Lambda functions are region-specific.

  3. Check the AWS Service Health Dashboard to see if there are any ongoing issues with Lambda or IAM services in your region. Sometimes temporary service disruptions can cause these errors.

  4. If you're using a browser, try accessing Lambda from a different browser, in incognito mode, or from a different device to rule out any local issues.

  5. If you're using the root user and still experiencing this issue, there might be a problem with your AWS account itself. In this case, the recommended solution is to contact AWS Support by opening a support case under the "Account and billing" category, which can be done free of charge.

  6. For IAM users, ensure the trust relationship for your Lambda execution role is properly configured to allow Lambda to assume the role.

If the issue persists after checking these items, contacting AWS Support would be the best course of action as they can investigate account-specific issues that might be causing this problem.
Sources
Access denied in creating lambda function | AWS re:Post
My Lambda shows Access denied | AWS re:Post
Access Denied Error when I visit Lambda dashboard ans not able to create Function | AWS re:Post
Failed to create Lambda function simply withe the error message "The role defined for the function cannot be assumed by Lambda" | AWS re:Post

answered a year ago

EXPERT

reviewed a year ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Relevant content