I am using Ubuntu 14.04 chef-solo stack but since today when I am running the deploy script its giving me below error. Please assist.

========== ubuntu@i-production-base:~$ sudo /var/chef/scripts/deploy.rb /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/credential_providers.rb:140:in `credentials': (AWS::Errors::MissingCredentialsError) Missing Credentials.

Unable to find AWS credentials. You can configure your AWS credentials a few different ways:

  • Call AWS.config with :access_key_id and :secret_access_key


  • On EC2 you can run instances with an IAM instance profile and credentials will be auto loaded from the instance metadata service on those instances.

  • Call AWS.config with :credential_provider. A credential provider should either include AWS::Core::CredentialProviders::Provider or respond to the same public methods.

= Ruby on Rails

In a Ruby on Rails application you may also specify your credentials in the following ways:

  • Via a config initializer script using any of the methods mentioned above (e.g. RAILS_ROOT/config/initializers/aws-sdk.rb).

  • Via a yaml configuration file located at RAILS_ROOT/config/aws.yml. This file should be formated like the default RAILS_ROOT/config/database.yml file.

    from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/credential_providers.rb:62:in access_key_id' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/client.rb:549:inbuild_request' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/client.rb:491:in block (3 levels) in client_request' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/response.rb:175:inbuild_request' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/response.rb:114:in initialize' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/client.rb:203:innew' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/client.rb:203:in new_response' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/client.rb:490:inblock (2 levels) in client_request' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/client.rb:391:in log_client_request' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/client.rb:477:inblock in client_request' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/client.rb:373:in return_or_raise' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/core/client.rb:476:inclient_request' from (eval):3:in describe_tags' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/ec2/filtered_collection.rb:44:infiltered_request' from /usr/local/lib/ruby/gems/2.3.0/gems/aws-sdk-v1-1.66.0/lib/aws/ec2/resource_tag_collection.rb:194:in to_h' from /var/chef/scripts/deploy.rb:243:infetch_ec2_meta_data' from /var/chef/scripts/deploy.rb:221:in initialize' from /var/chef/scripts/deploy.rb:328:innew' from /var/chef/scripts/deploy.rb:328:in `'

1 Answer 1


Looks like you need to either start the instance with a role that has access to credentials. You can read about it here or

  • export the IAM key and secret via the environment (on Linux will be into a shell bash for example export AWS_ACCESS_KEY_ID=YOUR_KEY; export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY

  • configure the AWS sdk ... this is less likely since it means some changes were made to your script.

  • Thanks ..well after going through my config found that one of our gir user account were used to pul git repository which got suspended and after changing it to another active git account this got fixed. Commented Jan 26, 2018 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .