vegas-credentials
vegas-credentials copied to clipboard
Handle STS errors more gracefully
If user configures invalid values (such as too long duration_seconds
) then STS will return an error. This error is not processed and instead the end-user receives the following error with a stack trace:
Error when retrieving credentials from custom-process: panic: operation error STS: AssumeRole, https response error StatusCode: 400, RequestID: ****************************, api error ValidationError: The requested DurationSeconds exceeds the MaxSessionDuration set for this role.
goroutine 1 [running]:
github.com/aripalo/vegas-credentials/internal/credentials.(*Credentials).New(***********, {*********, ******})
This does not "break" anything per se but it's not a nice user experience.