Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (34 sloc) 762 Bytes
Resources:
alb:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Name: ${self:provider.name}-alb
Subnets:
- Ref: subnet1
- Ref: subnet2
SecurityGroups:
- Ref: sg
albListener:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
LoadBalancerArn:
Ref: alb
Port: 80
Protocol: HTTP
DefaultActions:
- Order: 2
Type: forward
TargetGroupArn:
Ref: ec2TargetGroup
ec2TargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
Port: 3000
TargetType: instance
Protocol: HTTP
VpcId:
Ref: vpc
Targets:
- Port: 3000
Id:
Ref: ec2Instance
You can’t perform that action at this time.