0

I am using this CloudFormation template https://github.com/widdix/aws-cf-templates/blob/master/jenkins/jenkins2-ha-agents.yaml to setup a jenkins server.

I want to now add an SSL to the ELB and have modified https://github.com/widdix/aws-cf-templates/blob/master/jenkins/jenkins2-ha-agents.yaml#L511-L519 to the following:

  MasterELBListener:
    Type: AWS::ElasticLoadBalancingV2::Listener
    Properties:
      DefaultActions:
        - Type: "redirect"
          RedirectConfig:
            Protocol: "HTTPS"
            Port: "443"
            Host: "#{host}"
            Path: "/#{path}"
            Query: "#{query}"
            StatusCode: "HTTP_301"
      LoadBalancerArn: !Ref MasterELB
      Port: 80
      Protocol: HTTP

  MasterHTTPSListener:
    Type: AWS::ElasticLoadBalancingV2::Listener
    Properties:
      Certificates:
        # - CertificateArn: !Ref CertificateARN
        - CertificateArn: !FindInMap
            - SSLmapping
            - ssl1
            - !FindInMap
              - AWSRegionsNameMapping
              - !Ref 'AWS::Region'
              - RegionName
      DefaultActions:
      - Type: forward
        TargetGroupArn: !Ref MasterELBTargetGroup
      LoadBalancerArn: !Ref MasterELB
      Port: 443
      Protocol: HTTPS

But when I try to to access the site, it just times.

Any advice is much appreciated

khinester
  • 3,398
  • 9
  • 45
  • 88

1 Answers1

0

ok, i needed to open access to 433 from the ELB, with:

  MasterELBHTTPSSGInWorld:
    Type: 'AWS::EC2::SecurityGroupIngress'
    Condition: HasNotAuthProxySecurityGroup
    Properties:
      GroupId: !Ref MasterELBSG
      IpProtocol: tcp
      FromPort: 443
      ToPort: 443
      CidrIp: '0.0.0.0/0'
khinester
  • 3,398
  • 9
  • 45
  • 88