AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Persists the current credentials to a 'session' key in the RoleSessions.json file. This enables external applications and tools using the same profile to obtain credentials without needing to separately re-authenticate the user prior to expiry of the current credentials. After persisting the session data it can be retrieved using GetCurrentSession().

Namespace: Amazon.Util
Assembly: AWSSDK.Core.dll
Version: 3.x.y.z


public void PersistSession(
         SAMLImmutableCredentials credentials
Type: Amazon.Runtime.SAMLImmutableCredentials

The current credentials valid for the role specified in the profile.


Although the credentials are temporary we still encrypt the stored data when at rest in the sdk credential store.

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5