AWS secret backend and IAM eventual consistancy

I have noticed one thing, when I use aws secret backend and generating IAM user credentials on the fly in ci/cd, I was getting an error “Credentials are not valid”. However when I introduced a delay of 10 seconds, it started working. Seems like due to AWS IAM eventual consistency. It took some time for me understand that, sharing so might be helpful for someone.