我已在 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/