简体   繁体   English

AWS Tookit 无法通过 VSCode 中的共享凭证连接到 AWS 帐户

[英]AWS Tookit not able to connect to AWS account via shared credentials in VSCode

I have installed the AWS Toolkit in VSCode and trying to connect to my AWS account.我已经在 VSCode 中安装了 AWS 工具包并尝试连接到我的 AWS 账户。 It is throwing socket closed error.它正在抛出套接字关闭错误。

Apparently, it works just fine in intelliJ显然,它在 intelliJ 中工作得很好

Check the below logs: Which socket is closed for this action?检查以下日志:为此操作关闭了哪个套接字?

Credentials File凭据文件

[saml]
aws_access_key_id        = xxxxxxx
aws_secret_access_key    = xxxxxxx

Logs日志

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
}

Proxy was not configured inside VsCode that lead to socket closed error.代理未在 VsCode 中配置导致套接字关闭错误。 I added proxy details and it connected successfully.我添加了代理详细信息并成功连接。 File --> Preferences -> Settings --> Applications --> Proxy.文件 --> 首选项 -> 设置 --> 应用程序 --> 代理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM