'An error occurred (AccessDeniedException) when calling the UpdateFunctionCode operation

I am getting the below error while deploying code to the aws lambda from jenkins pipeline through aws lambda updatefunctioncode command

An error occurred (AccessDeniedException) when calling the UpdateFunctionCode operation: User: arn:aws:sts::xxxxxxxxxxxx:assumed-role/jxxxxxxxxxxxxxxx/i-04xxxxxxxxxx is not authorized to perform: lambda:UpdateFunctionCode on resource: arn:aws:lambda:us-east-1:11111111118:function:event because no identity-based policy allows the lambda:UpdateFunctionCode action

I dont have access to update the permissions and policies in the aws suggest me any that should be running from my pipeline and need to do from jenkins



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source