cfn-init seems to ignore --http-proxy value for msi packages

0

Hi,
I've got CNF template creating Windows 2016 machines with UserData looking like this:

 "<script>\n",
            
            "cfn-init.exe --verbose --stack ",
            { "Ref" : "AWS::StackId" }, 
            " --resource MyResource",
            " --region ", 
            { "Ref" : "AWS::Region" }, 
            " --http-proxy http://", { "Ref" : "Proxy" },
            " --https-proxy http://", { "Ref" : "Proxy" },
            "\n", [...]

and CloudFormation::Init part:

"installCloudWatch":{
                "packages" : {
                  "msi" : {
                    "cloudwatch-msi" : "https://s3.amazonaws.com/amazoncloudwatch-agent/windows/amd64/latest/amazon-cloudwatch-agent.msi"
                  }
                }
              },

Problem: cfn-init still fails to download the msi. Error in UserdataExecution.log:
Message: The errors from user scripts: Error occurred during build: Failed to retrieve https://s3.amazonaws.com/amazoncloudwatch-agent/windows/amd64/latest/amazon-cloudwatch-agent.msi: ('Connection aborted.', error(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

I double checked that I can download the file using Powershell and --proxy flag, i.e.

Invoke-WebRequest -Uri https://s3.amazonaws.com/amazoncloudwatch-agent/windows/amd64/latest/amazon-cloudwatch-agent.msi -OutFile C:\Temp\agent.msi -Proxy
http://my-proxy:{proxy_port}

Important to note that signalling constructs (cfn-signal, ResourceSignal), which require internet access, work properly.

Edited by: dima-cnqr on Feb 4, 2019 8:49 AM

已提问 5 年前271 查看次数
1 回答
0

NOT answered yet- moved the question to the right forum (AWS CloudFormation ) - https://forums.aws.amazon.com/thread.jspa?threadID=297974

已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则