I had an issue using AWS_PROFILE env var instead of AWS_DEFAULT_PROFILE with aws-cli-js 2.2.2.
I had a look at the code and realized that only AWS_DEFAULT_PROFILE was listed in env vars (index.js).
Although a PR has been merged before that release to add AWS_PROFILE... But it looks like it was kind of reverted?!
Can you add it back to the list of env vars?