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
merged 1 commit into from Nov 26, 2018

Conversation

@j0k3r
Copy link
Contributor

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:

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

And that ~/.aws/credentials file:

[myprofile]
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.

Todos:

  • 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
dschep approved these changes Nov 26, 2018
Copy link
Member

left a comment

lgtm

@dschep dschep merged commit 806e07c into serverless:master Nov 26, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.002%) to 91.146%
Details
@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
Projects
None yet
2 participants
You can’t perform that action at this time.