Background:-I have a gateway account( with no permissions) in which users are created and in order to access aws resources we use roles having admin access.
config file
[profile gateway]
region = ap-southeast-1
output = json
[profile DA]
region = ap-south-1
output = json
role_arn = arn:aws:iam::xxxxxxxxxxxxx:role/jatin
mfa_serial = arn:aws:iam::xxxxxxxxxx:mfa/atin
source_profile = gateway
credentials file
[gateway]
aws_access_key_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
aws_secret_access_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Now I am trying to deploy my lambda using serverless deploy --aws-profile "DA", it says AWS profile "DA" doesn't seem to be configured
however, if I run aws s3 ls --profile "DA" its works perfectly, so i guess there is no problem with the configuration of profiles and credentials