Limit UploadARN session duration to 1 hour

What does this MR do?

Trying to use a session duration of longer than hour previously resulted in:

Error when assuming the role The requested DurationSeconds exceeds the 1 hour session limit for roles assumed by role chaining.

As described in https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage-assume.html:

Using the credentials for one role to assume a different role is called role chaining. When you use role chaining, your new credentials are limited to a maximum duration of one hour.

Why was this MR needed?

Jobs that had timeouts > 1 hour would fail to upload when UploadARN were configured.

What's the best way to test this MR?

  1. Configure an S3 cache with an UploadARN.
  2. Set the job timeout to 2 hours.
  3. Run a build.

What are the relevant issue numbers?

Relates to #38370 (closed)

Edited by Stan Hu

Merge request reports

Loading