Facebooktwittergoogle_pluslinkedinmailby feather

In order to define the firewall rules of the Security Group that the instance will belong to, you need to define the “Resources” like as the following:

Resources:

  AWSEBSecurityGroup:

    Type: “AWS::EC2::SecurityGroup”

    Properties:

      GroupDescription: “Security group to allow HTTP, HTTPS,SSH”

      SecurityGroupIngress:

        – {CidrIp: “0.0.0.0/0”, IpProtocol: “tcp“, FromPort: “8080”, ToPort: “8080”}

        – {CidrIp: “0.0.0.0/0”, IpProtocol: “tcp“, FromPort: “8443”, ToPort: “8443”}

        – {CidrIp: “0.0.0.0/0”, IpProtocol: “tcp“, FromPort: “443”, ToPort: “443”}

        – {CidrIp: “0.0.0.0/0”, IpProtocol: “tcp“, FromPort: “80”, ToPort: “80”}

        – {CidrIp: “0.0.0.0/0”, IpProtocol: “tcp“, FromPort: “22”, ToPort: “22”}

Save the “resources.config” under “.ebextensions” folder and deploy!