I was having difficulties making the wrapper work while specifying a different profile using the --profile flag
the following commands were all issued in quick succession
~/somefolder > which aws
aws: aliased to aws-mfa-secure session
no profile - working - I already entered my mfa token earlier today, default profile is not profile123:
~/somefolder > aws s3 ls s3://some-bucket-name/
<list of files returned>
with --profile - not working
~/somefolder > aws --profile profile123 s3 ls s3://some-bucket-name/
An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied
export AWS_PROFILE instead of --profile - now it's working - notice requesting the MFA code which --profile didn't
~/somefolder > export AWS_PROFILE=profile123
~/somefolder > aws s3 ls s3://some-bucket-name/
Please provide your MFA code: <code entered>
<list of files returned>
even after doing this - --profile still doesn't work and I get the same error.
Hi,
I was having difficulties making the wrapper work while specifying a different profile using the
--profile
flag the following commands were all issued in quick successionno profile - working - I already entered my mfa token earlier today, default profile is not profile123:
with --profile - not working
export AWS_PROFILE instead of --profile - now it's working - notice requesting the MFA code which --profile didn't
even after doing this -
--profile
still doesn't work and I get the same error.