I am getting the below error when passing the IAM role in the Lambda function creation CLI commands. Help to solve this.
An error occurred (AccessDeniedException) when calling the CreateFunction operation: User: arn:aws:iam::374577096375:user/kk_labs_user_224502 is not authorized to perform: lambda:CreateFunction on resource: arn:aws:lambda:ap-south-1:374577096375:function:xfusion-lambda-cli with an explicit deny in a service control policy
If there console credentials are shared then I can modify user’s access.
Help to resolve this.