What is default time to refresh the temporary credentials using AssumeRoleWithWebIdentityCredentials.FromEnvironmentVariables() method #2609
-
Please tell me the default time to refresh the temporary credentials using AssumeRoleWithWebIdentityCredentials.FromEnvironmentVariables() method. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@anjanasagathiya The expiration time for AssumeRoleWithWebIdentityCredentials sets the Thanks, @bot propose-answer |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@anjanasagathiya The expiration time for
WebIdentityTokenFile
is configured in the OIDC provider. These are normally configured in the assumed IAM role session duration (refer here).AssumeRoleWithWebIdentityCredentials sets the
PreemptExpiryTime
to a constant value PREEMPT_EXPIRY_MINUTES having values as 5 minutes, which isThe time before actual expiration to expire the credentials.
. So while fetching the credentials, if these are determined expired based on thePreemptExpiryTime
, the new credentials are generated. If the credentials are already expired before being retrieved from the calling method, exception is thrown here.Thanks,
Ashish
@bot propose-answer