在 Win10 node.js 命令提示符下放大初始化错误

Amplify init error on Win10 node.js command prompt

我已经通过

创建了一个 AdministratorAccess 用户
amplify configure

我确实完全验证了我的 AWS 账户,但我仍然收到此错误

 Initializing project in the cloud...An error occurred when creating the CloudFormation stack
× Root stack creation failed
init failed
Error: connect ETIMEDOUT 54.239.29.24:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
  errno: -4039,
  code: 'TimeoutError',
  syscall: 'connect',
  address: '54.239.29.24',
  port: 443,
  time: 2022-02-25T07:55:57.713Z,
  region: 'us-east-1',
  hostname: 'cloudformation.us-east-1.amazonaws.com',
  retryable: true
}

我公司是用代理来保证安全的,请问有没有cli代理设置的问题?

嗯,是代理让我无法访问AWS,

我的解决办法是在win10 cmd中输入这些命令


setx HTTP_PROXY http://username:password@proxy.example.com:1234
setx HTTPS_PROXY http://username:password@proxy.example.com:5678

您可以在 https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-proxy.html