-
How long is the validity period of the session created? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @zhlc2008, If you are referring to the The validity of the session is tied to the validity of the credentials it wraps. If you are using an environment variable with hardcoded credentials it will never expire. If you are using an IAM role, the SDK will make calls to STS "under the hood" to retrieve temporary credentials, and those credentials will have an expiration associated with them. When they expire, the SDK will automatically make another call to STS to refresh those credentials. So if configured correctly, you won't need to worry about your Session object "expiring". Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @zhlc2008,
If you are referring to the
Session
object, it does not expire on its own, because it's just a configuration object and does not hold any kind of connection state that can time out. In v2 the name is changed toConfig
.The validity of the session is tied to the validity of the credentials it wraps. If you are using an environment variable with hardcoded credentials it will never expire. If you are using an IAM role, the SDK will make calls to STS "under the hood" to retrieve temporary credentials, and those credentials will have an expiration associated with them. When they expire, the SDK will automatically make another call to STS to refresh those credentials.
So if config…