In my serverless.yml I've got:
Seems like it's using my AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables instead of this profile. Is this expected?
Do you have a profile named test in the /Users/xxxx/.aws/credentials file?
The aws credentials file should look like:
While I haven't tested it extensively, I think I've seen the AWS SDK (which Serverless uses) prioritise the AWS_ACCESS_KEY_ID and AWS_ACCESS_KEY_ID variables over a specific profile, which would explain what you're seeing (assuming your profiles are setup correctly, as per @DavidWells's question).
Yeah, that must be it. Thanks.