Shell script to get temporary credentials through assume role

You can use aws sts assume-role cli command to get a temporary access_key, secret_key, and token.

Shell script to get temporary credentials through assume role without any external tool like jq:

Shell script to get temporary credentials through assume role using jq: