thomasmichaelwallace / serverless-better-credentials

Better AWS credentials resolution plugin for serverless
MIT License
54 stars 9 forks source link

Authentication fails on Mac M3 if `~/.aws/credentials` file is missing and valid SSO configuration exists in `~/.aws/config` #41

Closed picoross closed 3 months ago

picoross commented 3 months ago

Steps to reproduce the behavior:

  1. Provide a valid AWS SSO configuration in ~/.aws/config with which you want to authenticate
  2. Remove the ~/.aws/credentials file
  3. Run whichever Serverless command you like

Expected behavior SSO authentication should succeed

Screenshots Output from running the command in the configuration described above:

$>./node_modules/.bin/serverless openapi generate --format json --output libs/output.json --openApiVersion 3.0.0 --config serverless.yml

Environment: darwin, node 18.16.0, framework 3.32.2 (local), plugin 6.2.3, SDK 4.3.2
Credentials: Local, environment variables
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Error: connect EHOSTDOWN 169.254.169.254:80 - Local (192.168.69.105:49706)
    at internalConnect (node:net:1066:16)
    at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
    at node:net:1250:9
    at processTicksAndRejections (node:internal/process/task_queues:77:11)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at process.processTimers (node:internal/timers:509:9)

Desktop (please complete the following information):

picoross commented 3 months ago

Missed the part in the readme that talks about the environment variable for this case