A "correct" implementation would give you a temporary IAM role or something (STS) based on a JWT or other authn mechanism.
This is not that difficult if you're already invested in an identity ecosystem, but a right pain without something to bootstrap it.
On the plus side, AWS creds can be made to be temporary and limited in scope to just the nouns/verbs required. Creating and vending those tokens is an exercise for the reader.