How to specify all ports in Security group - CloudFormation

后端 未结 3 1599
夕颜
夕颜 2021-02-07 00:21

I have my CloudFormation script like this now:

    \"SecurityGroupIngress\" : [{
      \"IpProtocol\" : \"tcp\",
      \"FromPort\" : \"0\",
      \"ToPort\" : \         


        
3条回答
  •  星月不相逢
    2021-02-07 01:23

    The original solution I posted (and accepted by the original poster) stopped working as AWS no longer supports it. To avoid the barrage of downvotes, I deleted the answer. The alternatives are:

    • Specify the ports 0 and 65535

    or

    Open all ports for all protocols not just TCP (as suggested by thewire247 below)

    "SecurityGroupIngress" : [{
      "IpProtocol" : "-1",
      "CidrIp" : "0.0.0.0/0"
    }]
    

提交回复
热议问题