IAM role assumption post spawn solutions

Our users need to be able to toggle between multiple IAM roles from within their notebook containers.

I’m wondering if there are any open source solutions or recommended workflows for this pattern.

Pre-spawn is simple of course. One can just use the options form, but that is less flexible and doesn’t meet our requirements.

We have developed a solution that I have some reservations about but I’m wondering if it makes sense generalizing / open sourcing it, assuming something better doesn’t already exist and others could benefit from it.

This discussion is about cloud provider identities in general rather than switching IAM roles, but might be of interest to you: