I successfully authenticate with 2 factor but when using aws s3 ls I keep getting
aws s3 ls
An error occurred (InvalidToken) when calling the ListBuck
Issue was that I wasn't passing the --region in. e.g. aws s3 --region us-gov-west-1 ls. I suppose this could be set with an ENV variable too. That error message is a candidate for improvement.
--region
aws s3 --region us-gov-west-1 ls