Loki integration with S3 for using ServiceAccount on K8s

I have been trying to setup Loki statefulset on K8s and would like to integrate AWS S3.

As part of the loki config , i dont use SecretKey and AccessKey , but the service account does have required permissions . I constantly get the following error

msg=“failed to flush user” err="SignatureDoesNotMatch: The request signature we calculated doe not match the signature you provided. Check your key and signing method.\n\tstatus code: 403

Is it mandatory to provide accesskey and secret key or is there any experience using ServiceAccount on kubernetes platform