 <p>I would recommend against following the push paradigm that is suggested above and switch to the pull paradigm. The purpose of AWSIdentityProviderManager is to prompt you for a token only when the SDK needs it, not for you to set it externally periodically whether the SDK needs it or not. This way you don't have to manage token expiry yourself, just make sure your token is valid when logins is called and if it isn't you can use an AWSCompletionSource to get a fresh one.</p> <p>Assuming you have integrated Facebook login, your <a href="http://docs.aws.amazon.com/AWSiOSSDK/latest/Protocols/AWSIdentityProviderManager.html" rel="nofollow noreferrer">IdentityProviderManager</a> should look something like this: </p> <pre><code>import Foundation import AWSCore import FacebookLogin import FacebookCore class FacebookProvider: NSObject, AWSIdentityProviderManager { func logins() -&gt; AWSTask&lt;NSDictionary&gt; { if let token = AccessToken.current?.authenticationToken { return AWSTask(result: [AWSIdentityProviderFacebook:token]) } return AWSTask(error:NSError(domain: "Facebook Login", code: -1 , userInfo: ["Facebook" : "No current Facebook access token"])) } } </code></pre> <p>To use it:</p> <pre><code>let credentialsProvider = AWSCognitoCredentialsProvider(regionType: AWSRegionType.YOUR_REGION, identityPoolId: "YOUR_IDENTITY_POOL_ID", identityProviderManager: FacebookProvider()) let configuration = AWSServiceConfiguration(region: AWSRegionType.usEast1, credentialsProvider: credentialsProvider) AWSServiceManager.default().defaultServiceConfiguration = configuration </code></pre> <p>And then to test getting credentials:</p> <pre><code>AWSServiceManager.default().defaultServiceConfiguration.credentialsProvider.credentials().continue(with: AWSExecutor.default(), with: { (task) -&gt; Any? in print(task.result ?? "nil") return task }) </code></pre> <p>BTW, I needed to add this to my app delegate to get Facebook Login to work with Swift which is not mentioned in the instructions here <a href="https://developers.facebook.com/docs/swift/login" rel="nofollow noreferrer">https://developers.facebook.com/docs/swift/login</a> :</p> <pre><code>func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -&gt; Bool { return FBSDKApplicationDelegate.sharedInstance().application(app, open: url, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String, annotation: options[UIApplicationOpenURLOptionsKey.annotation]) } </code></pre>