0 votes
1 view
in AWS by (19.2k points)

In all tutorials for ECS you need to create a cluster and after that an autoscaling group, that will spawn instances. Somehow in all these tutorials the instances magically show up in the cluster, but no one gives a hint what's connecting the autoscaling group and the cluster.

my autoscaling group spawns instances as expected, but they just don't show up on my ecs cluster, who holds my docker definitions.

Where is the connection I'm missing?

1 Answer

0 votes
by (44.6k points)

To get instances in the autoscaling group with your ECS cluster is in the user data. When you arrive at step 3 “Configure details” while you are creating your launch configuration. Now, click on the advanced tab and enter this bash script for your user data.

#!/usr/bin/env bash

echo ECS_CLUSTER=your_cluster_name >> /etc/ecs/ecs.config

All the parameters for configuring your agent can be found in this document.

http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...