aws_refresh_if_expiring_soon
Check AWS SSO token expiry; if it's about to expire, trigger login and return verification URL and code, otherwise confirm token status. Prevents mid-session auth failures.
Instructions
Proactive SSO token check. If the cached token has fewer than thresholdMinutes left (default 10), this kicks off aws_login_start and returns the verification URL + code in one round-trip. If plenty of time remains, returns status: 'ok' with the minutes left. Use at the start of a multi-step AWS workflow to avoid mid-session expiry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | AWS profile configured for SSO. Defaults to $AWS_PROFILE or 'default'. | |
| thresholdMinutes | No | Trigger refresh when the token has fewer than this many minutes left. Default 10. |