Problem Definition
For the S3 Artifact Handler configuration, we need to provide the AWS key and secret key. These are long-lived access keys which are not allowed by some companies' security policies.
Furthermore, S3 Artifact Handler can be configured with only a single access key. If elastic/remote agents are running on different AWS accounts, it might be problematic to authorize their access to S3 with the same access key. Using IAM Role is a better solution for such use case.
Suggested Solution
Have options of Access Key or IAM profile for S3 authentication.
Why this is important
Some security policies prohibit the use of long-lived access keys like AWS keys