When serverless deploy can't find an aws profile does it use the default credentials? I'm worried about accidentally changing prod

hey I put in this: “serverless deploy -v --aws-profile non_existant_user”

and I got an error saying “User: arn:aws:iam::456486264762:user/pdejean is not authorized to perform” etc

but when I changed it to --aws-profile different_non_existant_user the numbers after IAM are still the same

so I’m worried that it’s reverting to the default credentials when I put in an invalid aws profile

would have been really bad if my default credentials had more access!

This is the behaviour of the AWS SDK, not Serverless.

I don’t set up a default profile for just this reason - all my profiles are named and must be explicitly called.

1 Like