Used credentials providers on client constructor instead of credentials,...

... so client can handle refreshing security tokens.

Thanks for putting this example together. Saved me a lot of time.
One of the issues I ran into is that my workers would start failing after sometime due to credentials expiring. I found out that by passing credentials to the client, it doesn't handle refreshing tokens. The solution was to pass a credentials provider to the client.
That might help some other people save time debugging this issue.