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

Trouble with authenticating to S3 #285

Open
pabau opened this issue Nov 12, 2024 · 1 comment
Open

Trouble with authenticating to S3 #285

pabau opened this issue Nov 12, 2024 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed scope:nx-remotecache-s3 type:bug Something isn't working

Comments

@pabau
Copy link

pabau commented Nov 12, 2024

Hi first of all I am so grateful for the fact this plugin exists as open source. I am trying to install it..

Describe the bug
I set the AWS_PROFILE and check aws s3 ls works as expected. However I see this output


@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
    Multiple credential sources detected: 
    Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
    This SDK will proceed with the AWS_PROFILE value.
    
    However, a future version may change this behavior to prefer the ENV static credentials.
    Please ensure that your environment only sets either the AWS_PROFILE or the
    AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
------------------------------------------------------------------------------
Warning: Failed to check if cache file exists in S3
File: 17456133250912078476.tar.gz
Error: Could not load credentials from any providers
------------------------------------------------------------------------------
CredentialsProviderError: Could not load credentials from any providers
    at /opt/atlassian/pipelines/agent/build/node_modules/@pellegrims/nx-remotecache-s3/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js:136:13
    at /opt/atlassian/pipelines/agent/build/node_modules/@smithy/property-provider/dist-cjs/index.js:97:33
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async coalesceProvider (/opt/atlassian/pipelines/agent/build/node_modules/@smithy/property-provider/dist-cjs/index.js:124:18)
    at async /opt/atlassian/pipelines/agent/build/node_modules/@smithy/property-provider/dist-cjs/index.js:142:18 {
  tryNextLink: false
}

To Reproduce

  "tasksRunnerOptions": {
    "default": {
      "runner": "@pellegrims/nx-remotecache-s3",
      "options": {
        "cacheableOperations": [
          "prebuild-docker",
          "lint",
          "integration",
          "build",
          "build-docker",
          "tsc",
          "test",
          "e2e"
        ],
        "verbose": true,
        "bucket": "nx-remote-cache",
        "prefix": "${BITBUCKET_BRANCH}/",
        "region": "eu-west-2",
        "profile": "default",
        "forcePathStyle": true
      }
    }
  }

Additional context
I am new to the concept of Remote Caching when it comes to Nx.

@robinpellegrims robinpellegrims added type:bug Something isn't working scope:nx-remotecache-s3 help wanted Extra attention is needed good first issue Good for newcomers labels Nov 14, 2024
@robinpellegrims
Copy link
Owner

robinpellegrims commented Nov 14, 2024

Thank you for reporting this bug.
Could you please specify the versions of NX and nx-remotecache-s3 that you're using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed scope:nx-remotecache-s3 type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants