为什么cfn-init会用这个奇怪的消息进行响应



我很难让cfn-init在Windows上运行。

我这样做:

cfn-init.exe -v -c config 
-s arn:aws:cloudformation:eu-north-1:894422057177:stack/Providence-Core-A47K89HAVG6V/20f830c0-05cd-12ea-9527-06c34fc32621 
-r MyHost  
--region eu-north-1

(为清晰起见,增加了换行符(

并得到结果:

('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'))

导致此错误的原因是什么?什么是无法到达的?(这不是我见过的最详细的错误消息:-(

cfn-init.exe是否真的试图访问网络上的某些内容?如果是,目标地址是什么?当涉及到网络ACL和SecurityGroup时,我的出站规则都相当严格。他们没有http/https的一般出站访问权限。这是原因吗?

底线:是的,cfn-init命令确实执行出站https请求。您的SecurityGroup、子网ACL等必须允许此操作。

cfn-init命令尝试从公共互联网上的AWS CloudFormation端点下载相关CloudFormation堆栈。因此,如果使用cfn-init特性,EC2实例必须具有对此类端点的出站访问权限。

如果你不想为你的EC2实例授予通用出站访问权限,那么亚马逊为AWS CloudFormation服务提供了VPC端点。

最新更新