ECS UI Cluster creation

0

Good day,

With the old ECS UI, i was able to create clusters and in the steps, i was also able to add load balancers, auto-scaling groups, and so on.

With this new UI, I am only able to create the cluster. On completion, I see a capacity provider that is linked to an ASG but no instance associated to the cluser, even though there are registered instances on the ASG.

How can i switch back to the old UI? or better still, how can i ashieve all these with the new UI?

asked 24 days ago143 views
3 Answers
1

Creating a Cluster with Associated Resources in the New ECS UI ** Create the ECS Cluster:**

Navigate to the ECS service in the AWS Management Console.

Click on "Create Cluster".

Select the cluster template you need (EC2 + Networking, Networking only, etc.).

Follow the steps to configure your cluster settings, such as VPC, subnets, and other networking options.

Complete the cluster creation process.

Add Auto-Scaling Group (ASG) to the Cluster:

After the cluster is created, you will notice that a capacity provider linked to an ASG is created automatically.

Ensure that the ASG has the desired number of instances and the correct launch template or configuration.

Register Instances with the Cluster:

Ensure that your EC2 instances are in the correct VPC and subnets and have the ECS agent running and configured to point to your cluster.

Check the ECS instances section within the cluster to verify that the instances are registered.

Create and Attach a Load Balancer:

Go to the EC2 service in the AWS Management Console.

Create an Application Load Balancer (ALB) or Network Load Balancer (NLB) as per your requirements.

Ensure the load balancer is in the same VPC and subnets as your ECS cluster.

Configure listeners and target groups for your load balancer.

Update ECS Service to Use the Load Balancer:

Navigate back to the ECS service and select your cluster.

Create a new service or update an existing service.

During the service creation/update process, you can specify the load balancer settings:

Choose the load balancer type (ALB or NLB).

Select the target group created earlier.

Configure the container to use the load balancer (specify the container and port).

Configure Auto-Scaling for the Service:

In the ECS service configuration, navigate to the "Auto Scaling" tab.

Set up scaling policies based on your desired metrics (CPU utilization, memory usage, etc.).

Configure the desired, minimum, and maximum number of tasks

answered 24 days ago
  • These options were available on the old interface. They are not present in the new interface for creating a cluster in the console.

0

Step 1: Create an ECS Cluster Open the ECS Console: Navigate to the Amazon ECS console. Create Cluster: Click on "Clusters" in the left navigation pane, then click on "Create Cluster". Select Cluster Template: Choose the appropriate cluster template. For example, choose "EC2 Linux + Networking" for an EC2-based cluster. Configure Cluster: Enter a cluster name. Configure the VPC and subnets. Choose the appropriate VPC and subnets where your instances will run. Leave the rest of the settings at their defaults or configure them as needed. Create Cluster: Click "Create" to create the cluster.

Step 2: Create an Auto Scaling Group (ASG) and Capacity Provider Navigate to EC2: Open the Amazon EC2 console. Launch Configuration: Create a new launch configuration or launch template for your instances if you don't have one already. Auto Scaling Group: In the EC2 console, navigate to "Auto Scaling Groups" under the "Auto Scaling" section. Create a new Auto Scaling Group using the launch configuration/template you created. Ensure the ASG is configured to use the same VPC and subnets as your ECS cluster. Configure the desired, minimum, and maximum number of instances. Capacity Provider: Return to the ECS console. Go to "Clusters" and select your cluster. Navigate to the "Capacity Providers" tab. Click on "Create Capacity Provider". Configure the capacity provider to use the ASG you created. Set the Auto Scaling group settings and specify the managed scaling and managed termination protection settings as needed.

Step 3: Register Instances with the Cluster Attach EC2 Instances: Ensure your instances are launched in the ASG you created. ECS agent should be running on the instances. This is typically configured automatically if you use the ECS-optimized AMI in your launch configuration/template. Check Instance Registration: Go back to the ECS console. Select your cluster and navigate to the "ECS Instances" tab to ensure your instances are registered with the cluster.

Step 4: Create Task Definitions and Services Create Task Definition: In the ECS console, go to "Task Definitions" and click "Create new Task Definition". Choose "EC2" launch type. Configure the task definition by adding containers, defining resource limits, and setting environment variables. Create Service: In the ECS console, go to "Clusters", select your cluster, and then go to the "Services" tab. Click "Create" to create a new service. Select the task definition you created. Configure the service, including the number of desired tasks, deployment type, and load balancing settings. If you need to integrate a load balancer, select the Application Load Balancer (ALB) or Network Load Balancer (NLB) and configure it accordingly.

Step 5: Configure Load Balancer Navigate to EC2: Open the Amazon EC2 console. Load Balancers: Create a new Application Load Balancer or Network Load Balancer. Configure the load balancer with appropriate listeners and target groups. Ensure the target groups are linked to the ECS service you created. Update ECS Service: Go back to the ECS console, select your service, and update the service to use the target groups associated with your load balancer.

answered 24 days ago
0

Hi,

When you create a new ECS Cluster with the EC2 launch type using the AWS Management Console, the ECS service automatically sets up a CloudFormation stack. This stack includes several resources:

  • An ECS cluster with capacity providers linked to the ASG.
  • An EC2 launch template and an Auto Scaling group (ASG), Security group for EC2 instances.

The capacity providers manage the underlying EC2 instances. When you create a new standalone ECS task or service, the capacity providers will launch EC2 instances as needed, register to the ECS cluster and place your ECS tasks on these instances.

To read more about ECS Capacity providers for EC2 launch type: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html

To add Load balancers to the cluster, Create a task definition for the application, and then you can create an ECS service and configure Load balancing to distribute traffic across ECS tasks. You can read about service load balancing: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html

To create a Service and attach a Load balancer: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-service-console-v2.html

profile picture
answered 24 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions