-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
@gwdp, thank you for supporting this plugin!
My ECS/Fargate Task had "Stopped reason: Task failed ELB health checks" because AWS::ECS::Service created by this plugin did not have a security group to allow ALB to access this Service.
Please replace the workaround below with proper fix of the plugin code:
resources:
Resources:
AlbToServiceSecGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: "Allows ALB to access ECS Service"
VpcId: REDACTED
AlbToServiceSecGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
DependsOn:
- ${self:custom.albSecGroupResourceName}
Properties:
GroupId: !Ref AlbToServiceSecGroup
SourceSecurityGroupId: !Ref ${self:custom.albSecGroupResourceName}
IpProtocol: -1
custom:
albSecGroupResourceName: REDACTED_ServerlessService_Stage_ALBSecGroup_Stage_EcsService
# Security group created by serverless-ecs-plugin for ALB
ecs:
- vpc:
securityGroupIds:
- !Ref AlbToServiceSecGroupEven with this workaround, all securityGroupIds (AlbToServiceSecGroup and e.g. RdsClientSecGroup) are applied both to AWS::ECS::Service (OK) and to ALB, which does not need these security groups.
Please implement additional serviceSecurityGroupIds option with a list of security groups for AWS::ECS::Service only.
Metadata
Metadata
Assignees
Labels
No labels