diff --git a/builtin/aws/ecs/platform.go b/builtin/aws/ecs/platform.go index 6a2683eb2ad..f582aad87b0 100644 --- a/builtin/aws/ecs/platform.go +++ b/builtin/aws/ecs/platform.go @@ -1067,7 +1067,9 @@ func (p *Platform) Launch( SecurityGroups: []*string{sgecsport}, } - netCfg.AssignPublicIp = aws.String("ENABLED") + if !p.config.EC2Cluster { + netCfg.AssignPublicIp = aws.String("ENABLED") + } s.Status("Creating ECS Service (%s, cluster-name: %s)", serviceName, clusterName) servOut, err := ecsSvc.CreateService(&ecs.CreateServiceInput{