aws / aws/containers-roadmap

[ECS] [Multi VPC]: Support multi VPC for EC2 targets

Open
#417 0 comments 5 reactions 0 assignees View on GitHub
ECS Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

**Tell us about your request**
I see that you have multi target group support in Preview for ECS Services.
I would like you to add support for instances in different VPCs to be used as targets for the same ECS Services, and that the load balancer is able to route traffic to instances on any VPC. We can assume that VPC Peering is a requirement, for instance.

**Which service(s) is this request for?**
ECS,EC2

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.

I have a whole production ECS cluster setup on one VPC that was badly design and have all sorts of issues. I want to gracefully migrate this ECS cluster to a new VPC without having to go over hundreds of services and recreating everything in mirror. I tried spawning new ECS EC2 instances on the new VPC and having them registered to the existing ECS Clusters, but then the ECS Service cannot register that newly spawned tasks to the target group because the target group/load balancer sists on a different VPC (the bad one).

**Are you currently working around this issue?**
Tried as mentioned above, and it didn't work.

**Additional context**
I use EC2 launch type with Rolling deployments, each application (service) that I run has its own target group and it's own load balancer.

```
service my-service-name failed to register targets in target-group my-service-target-group with (error The following targets are not in the target group VPC 'vpc-xxxxxxxx': 'i-00000000000000')

Contributor guide

Open the contributing guide

Research direction

No repository files, tests, or implementation entry points are named. Start by reviewing how ECS Services with the EC2 launch type register tasks in target groups and how load balancers enforce VPC boundaries; done means tasks in peered VPCs can register and receive traffic through the existing service target group.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.