amazon web services – How do I set a session token for a client in aws-sdk for Go version 2

I have an aws_session_token in my ~/.aws/credentials file. I read it like this using the aws-sdk for Go version 2:

cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("us-west-2"), config.WithSharedConfigProfile("devadm"))  
...   
retrieve, err := cfg.Credentials.Retrieve(context.TODO())
...
token := retrieve.SessionToken

How do I set this token in a client for dynamodb, s3, or kms? There is nothing in the docs about this for version 2 of the aws-sdk for Go.

Read more here: Source link