I am trying to assign role to codedelpoy and codebuild but it gives error that user not able to have permission

User: arn:aws:iam::975050354644:user/kk_labs_user_165299 is not authorized to perform: iam:PassRole on resource: arn:aws:iam::975050354644:role/awscodedepploy because no identity-based policy allows the iam:PassRole action

Try naming the role specifically CodeDeployRole
There are policies on what names roles can have to that permissions are appropriately assigned.

@Alistair_KodeKloud, where can I get the information about these specific roles?

You can find the full list here.