Question: Two problems: one of my ECS ASG instances became unresponsive. I terminated the instance and let the ASG create a new instance. Unfortunately, the task wasn't rerun once the instance was up again, is there a way to automate that? Also the new ASG instance didn't register with the load balancer, how do I automate that as well? :anguished:

Asked By
konrad
Asked At
2018-03-09 16:01:03

Found 15 possible answers.

User Answered At Possible Answer
nocode 2018-03-09 16:38:50 Your ECS service should handle the load balancer registration so if the task wasn't placed, then you would need to look at your ECS logs ont he new instance
konrad 2018-03-09 17:18:10 Okay, after I autoscaled to two instances, that worked out of the box. New instance, task running, registered with the load balancer :slightly_smiling_face:
rlister 2018-03-09 17:24:15 @konrad check your max/min healthy settings. In general, with ECS classic you want more instances than tasks, so there is excess capacity to place tasks during failure/deploy, etc. It is the task that registers with the LB, so check your healthchecks there.
konrad 2018-03-09 17:31:40 If mean, if I want at least two tasks running, I should aim for desired capacity 3 and max 4?
rlister 2018-03-09 17:44:34 For ASG? Yes, I would.
phroggyy 2018-03-09 18:14:01 Hm, having an issue with setting up ECS – have a launch configuration and ASG, but the instance appears to attach to an ECS cluster "Default" instead of the cluster it should be attaching to I'm not writing it to the ecs config :face_palm: oh I'm an idiot
atm which _should_ be enough
echo ECS_CLUSTER=unbork
The user data for the launch config is
#!/bin/bash
tyagiapurv 2018-03-09 18:20:23 I'm getting the error ERR_CONTENT_DECODING_FAILED when try to access the below url http://d2l7hi7d3iesvu.cloudfront.net/057b0dadb85e69413a62a633159aed89.png . but sometime the image is load and sometime it gives the error ERR_CONTENT_DECODING_FAILED the image is on s3 and we are using cloudfront to view the image
AWS_News_Blog 2018-03-09 18:25:18 Join the AWS Quest – Help me to Rebuild Ozz! http://feedproxy.google.com/~r/AmazonWebServicesBlog/~3/cg9T5wBl4mU/ If you have been watching my weekly videos, you may have noticed an orange robot in the background from time to time. That’s Ozz, my robot friend and helper. Built from the ground up in my home laboratory, Ozz is an invaluable part of the AWS blogging process! Sadly, when we announced we are adding […]
minasys 2018-03-09 18:38:30 Is there a way to redirect http to https behind ALB? As you can use X-Forwarded-Proto with ELB to make that work, but not sure if ALB can support that?
david.bailey 2018-03-09 18:39:38 It does. Are you using apache?
minasys 2018-03-09 18:41:08 we are using Angular and NodeJS @david.bailey
david.bailey 2018-03-09 18:42:39 We use apache but we successfully use X-Forwarded-Proto behind alb’s
minasys 2018-03-09 18:43:29 can you send me the steps or a page explains how to do it please? @david.bailey
phroggyy 2018-03-09 18:44:19 question about ECS and ALBs: I'm launching a task into ECS, with the bridge network mode (considering switching to awsvpc though), and have a containerPort: 80 in my port mappings, which should mean the container gets assigned a dynamic port in the ephemeral range, which I should be able to target with my ALB, right? any ideas on the best place to start looking? At the moment, the task in ECS just dies, just stops, and I'm not sure why
david.bailey 2018-03-09 18:48:10 @minasys I pm’d you

Related Questions