I'm trying to delete the Lambda function, it is throwing an error
An error occurred when deleting your function: You do not have sufficient permission. Access denied.
I never got this issue before. I even tried using an IAM user with Administrator access permissions. Still the same issue.
Also, I'm trying to make deployments to a Lambda function, which is also throwing an error.
An error occurred: <FunctionName>LambdaFunction - Resource handler returned message: "null (Service: Lambda, Status Code: 403, Request ID: xxxxxxxx-xxxx-xxxx-xxxx-1071e7f17536, Extended Request ID: null)" (RequestToken: xxxxxxxx-xxxx-xxxx-xxxx-9602c6f12b36, HandlerErrorCode: AccessDenied).
I'm not able to modify anything on the Lambda Console (not even increase a function's memory limit). All other AWS services are working normally.
This started happening after deleting a specific cloud formation stack by skipping its Lambda function.
CodePudding user response:
Somewhere, somehow, an IAM policy got put into effect explicitly denying you (or perhaps anyone) the ability to delete this lambda. If you have complete control over your account, log in with your root user and check what policies are on that lambda. Theoretically your root user can also delete it, but if it can't then open up a support ticket to have someone with AWS Root access help you delete it - I've done this in the past and bricked an S3 bucket so it couldn't even access itself!