Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--aws-profile should override profile defined in serverless.yml #5516

merged 1 commit into from Nov 26, 2018


Copy link

commented Nov 22, 2018

What did you implement:

Closes #5515

How did you implement it:

The option aws-profile should override defined profile in serverless.yml.

When the profile is defined AND the --aws-profile is defined, we don't load the profile from serverless.yml but from the option aws-profile.

How can we verify it:

Use that serverless.yml file:

    name: aws
    runtime: nodejs8.10
    profile: foobar
    region: ${opt:region, 'eu-west-1'}

And that ~/.aws/credentials file:

aws_access_key_id = xx
aws_secret_access_key = xx
region = eu-west-1

The command serverless deploy --aws-profile myprofile should NOT trigger an error about the profile "foobar" which does not exist.


  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

dschep approved these changes Nov 26, 2018
Copy link

left a comment


@dschep dschep merged commit 806e07c into serverless:master Nov 26, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.002%) to 91.146%
@j0k3r j0k3r deleted the j0k3r:fix/aws-profile branch Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.