You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks for "profile chef-engineering" which appears to be a regression from #632.
According to the documentation, ~/.aws/config has [profile user1] entries but ~/.aws/credentials should not use the word profile and should be just [user1].
The credentials file uses a different naming format than the CLI config file for named profiles. Include the prefix word "profile" only when configuring a named profile in the config file. Do not use the word profile when creating an entry in the credentials file.
$ knife ec2 server create -VVV
DEBUG: Checking if we need to accept Chef license to bootstrap node
DEBUG: Reading products and relationships...
DEBUG: Successfully read products and relationships
DEBUG: License acceptance required for chef version: 15
DEBUG: Searching for the following licenses: ["infra-client", "inspec"]
DEBUG: Found license chef_infra_client at /etc/chef/accepted_licenses/chef_infra_client
DEBUG: Found license inspec at /etc/chef/accepted_licenses/inspec
DEBUG: Missing licenses remaining: []
DEBUG: All licenses present
DEBUG: Using AWS credential file at /home/btm/.aws/credentials
DEBUG: Using AWS profile profile chef-engineering
Traceback (most recent call last):
11: from /opt/chef-workstation/bin/knife:357:in `<main>'
10: from /opt/chef-workstation/bin/knife:357:in `load'
9: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.8.23/bin/knife:24:in `<top (required)>'
8: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.8.23/lib/chef/application/knife.rb:163:in `run'
7: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.8.23/lib/chef/knife.rb:229:in `run'
6: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.8.23/lib/chef/knife.rb:485:in `run_with_pretty_exceptions'
5: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.8.23/lib/chef/local_mode.rb:42:in `with_server_connectivity'
4: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.8.23/lib/chef/knife.rb:486:in `block in run_with_pretty_exceptions'
3: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.8.23/lib/chef/knife/bootstrap.rb:561:in `run'
2: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/knife-ec2-1.0.31/lib/chef/knife/ec2_server_create.rb:579:in `plugin_setup!'
1: from /opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/knife-ec2-1.0.31/lib/chef/knife/helpers/ec2_base.rb:219:in `validate_aws_config!'
/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/knife-ec2-1.0.31/lib/chef/knife/helpers/ec2_base.rb:344:in `validate_aws_credential_file!': The provided --aws-profile 'profile chef-engineering' is invalid. Does the credential file at '/home/btm/.aws/credentials' contain this profile? (ArgumentError)
The text was updated successfully, but these errors were encountered:
Version:
knife-ec2 1.0.31 in Chef Workstation 0.6.29.
Environment:
Scenario:
Use an AWS profile with
knife ec2 server create
Steps to Reproduce:
My
~/.chef/credentials
file has a section like this:Expected Result:
The credentials are used.
Actual Result:
It looks for "profile chef-engineering" which appears to be a regression from #632.
According to the documentation,
~/.aws/config
has[profile user1]
entries but~/.aws/credentials
should not use the word profile and should be just[user1]
.https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
The text was updated successfully, but these errors were encountered: