I have deployed a lambda function using serverless which created a IAM role and lambda function for me, I manually deleted them from my aws console, when try to redeploy again using serverless, it is throwing an error
If you manually delete resources then Cloud Formation won’t re-create them for you. You generally have three options available.
Manually re-create the resource. This only works for resource identified by name which I think includes IAM.
Remove all references to the resource then deploy. Add the resource back then deploy again. I’ve used this to fix accidentally deleted DynamoDB tables.
Use sls remove to completely remove the application and deploy a new copy.