Pass S3 session token for access key credentials

What does this MR do?

Previously the S3 session token could be set in the runner config, but it was not used when creating the S3 client.

While it's rare for people to configure a session token with static credentials, it is still useful for testing.

Why was this MR needed?

I was testing the S3 cache with a GCP machine by using temporary credentials:

aws sts assume-role --role-arn "<some role name>" --role-session-name test1 --duration-seconds 3600

What's the best way to test this MR?

Configure a runner with this TOML config:

  [runners.cache]
    Type = "s3"
    MaxUploadedArchiveSize = 0
    [runners.cache.s3]
    ServerAddress = "s3.amazonaws.com"
    AccessKey = "<generated access key>"
    SecretKey = "<generated secret key>"
    SessionToken = "<generated session token>"
Edited by Stan Hu

Merge request reports

Loading