# Configuration file not found in directory "/" serverless config credentials --provider aws

**URL:** <https://forum.serverless.com/t/configuration-file-not-found-in-directory-serverless-config-credentials-provider-aws/20253>\
**Category:** Serverless Framework\
**Tags:** release\
**Created:** [June 6, 2024, 2:54pm UTC](https://forum.serverless.com/t/configuration-file-not-found-in-directory-serverless-config-credentials-provider-aws/20253 "2024-06-06T14:54:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvaromoca1](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@alvaromoca1](https://forum.serverless.com/u/alvaromoca1)\
**Post date:** [June 6, 2024, 2:54pm UTC](https://forum.serverless.com/t/configuration-file-not-found-in-directory-serverless-config-credentials-provider-aws/20253/1 "2024-06-06T14:54:14Z")

</div>

problem when I use

RUN yarn global add serverless  
RUN serverless config credentials --provider aws --key “your-key” --secret “your-secret”

in my dockerfile  
with the new version 4.0.35  
gives the problem

## RUN serverless config credentials --provider aws --key “your-key” --secret “your-secret”: #0 13.06 #0 13.62 #0 13.62 ✖ Configuration file not found in directory “/” #0 13.62

failed to solve: executor failed running [/bin/sh -c serverless config credentials --provider aws --key ${awsKey} --secret ${awsSecret}]: exit code: 1

My solution was to work with an older version.  
RUN yarn global add serverless@3.39.0

---

<div class="post-metadata">

**Author:** ![garethmcc](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/garethmcc/32/2276_2.png) [@garethmcc](https://forum.serverless.com/u/garethmcc)\
**Post date:** [June 6, 2024, 5:19pm UTC](https://forum.serverless.com/t/configuration-file-not-found-in-directory-serverless-config-credentials-provider-aws/20253/2 "2024-06-06T17:19:54Z")

</div>

Hi there. There really is no need to run the command. You can just add that key and secret as environment variables or within the ~/.aws/credentials file: [Environment variables to configure the AWS CLI - AWS Command Line Interface](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-envvars.html)

---

<div class="post-metadata">

**Author:** ![visriv](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@visriv](https://forum.serverless.com/u/visriv)\
**Post date:** [June 29, 2024, 7:31pm UTC](https://forum.serverless.com/t/configuration-file-not-found-in-directory-serverless-config-credentials-provider-aws/20253/3 "2024-06-29T19:31:55Z")

</div>

HI @garethmcc , I tried this solution, but it doesn’t work in macos.

Situation: I am running the following command in the directory “/Users/visriv/Documents/personify”:

`serverless config credentials --provider aws --key ACCESS_KEY --secret ACCESS_SECRET --profile personify`

The error I get is:

> ✖ Configuration file not found in directory “/Users/visriv/Documents/personify”

I have already run `aws configure` and setup the key, secret, and location in ~/.aws/credentials.

Is there something I am missing?  
Your help would be appreciated - I am stuck on this for my project for a few days. Thanks in advance!
