Pass variables within nested resources

hello,
i have the following folder / file structure

 khinester@pc   master ● ? ⍟3  tree -L 2                                       ✔  6650  12:06:19
.

├── config.yml
├── config.yml.example
├── package.json
├── package-lock.json
├── README.md
├── resources
│   ├── cdn.yml
│   ├── codecommit.yml
│   ├── ecr.yml
│   └── s3.yml
├── serverless.yml

my s3.yml looks like:

Resources:
  UploadsBucketCsv:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: ${file(../../config.yml):${opt:stage}.UPLOADS_BUCKET}

and within my serverless.yml, i have:

resources:
  - ${file(resources/s3.yml)}

but when i run my deploy, i get the following:

 Serverless Warning --------------------------------------

  A valid file to satisfy the declaration 'file(../../config.yml):prod.UPLOADS_BUCKET' could not be found.

what is the correct way to reference variables from within nested yml files?

any advice is much appreciated.