node.js - AWS Toolkit 无法通过 VSCode 中的共享凭证连接到 AWS 账户

标签 node.js amazon-web-services visual-studio-code vscode-extensions

我已在 VSCode 中安装了 AWS Toolkit 并尝试连接到我的 AWS 账户。它抛出套接字关闭错误。

显然,它在 intelliJ 中工作得很好

检查以下日志: 哪个套接字为此操作关闭?

凭证文件

[saml]
aws_access_key_id        = xxxxxxx
aws_secret_access_key    = xxxxxxx

日志

xxxxxxxxxxxxxxxxxxx [INFO]: autoconnect: trying "profile:saml"
xxxxxxxxxxxxxxxxxxx [ERROR]: Error: Socket is closed
    at new NodeError (node:internal/errors:371:5)
    at Socket._writeGeneric (node:net:785:8)
    at Socket._write (node:net:807:8)
    at doWrite (node:internal/streams/writable:408:12)
    at clearBuffer (node:internal/streams/writable:569:7)
    at Socket.Writable.uncork (node:internal/streams/writable:348:7)
    at ClientRequest._flushOutput (node:_http_outgoing:969:10)
    at ClientRequest._flush (node:_http_outgoing:938:22)
    at onSocketNT (node:_http_client:818:9)
    at processTicksAndRejections (node:internal/process/task_queues:84:21) {
  code: 'NetworkingError',
  region: 'xxxxx',
  hostname: 'xxxxx',
  retryable: true,
  time: xxxxxxxxxxxxxxx,
  statusCode: 407
}

最佳答案

VsCode 内未配置代理,导致套接字关闭错误。我添加了代理详细信息并且连接成功。 文件 --> 首选项 -> 设置 --> 应用程序 --> 代理。

关于node.js - AWS Toolkit 无法通过 VSCode 中的共享凭证连接到 AWS 账户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74488765/

相关文章:

javascript - Algolia 即时搜索 Firebase 云功能 - 如何获取其他值?

javascript - 与 fs 和 bluebird 的 promise

node.js - 如何使用无服务器添加 AWS 用户权限?

node.js - ONBUILD 选项出错(Windows 中的 Docker 工具箱)

javascript - ".at()"在 JavaScript 中有何用途?它在普通 JavaScript(浏览器 JavaScript)中是否有效?

amazon-web-services - 在 Cloudwatch 中捕获 AWS Glue 事件

postgresql - 如何将CloudFormation中RDS实例的PostgreSQL日志导出到CloudWatch?

visual-studio-code - 在 Visual Studio Code 中禁用菜单栏时如何删除汉堡菜单按钮

python - VSCode 是否支持用于 IntelliSense 的 Python .pyi 文件?

node.js - 在 VSCode 中调试 CoffeeScript 转到 .js 文件