aws / aws/containers-roadmap

[Fargate] [Network config in task definition]: Allow the task definition to contain the network configuration

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

Description

**Tell us about your request**
Allow the task definition to contain network configuration such as subnets and security group.

**Which service(s) is this request for?**
Fargate

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Currently the subnets and security groups to run a Fargate task in have to be specified when the task is run, and cannot be specified in the task definition.

This complicates things because it may be unnatural for the application starting a task to have to know these things. Its job may just be to start jobs, and it has no opinion about subnets and security groups. It might even be the case that the ops team would prefer it if the application couldn't choose these things, so that they could set up a task definition and have and application run tasks, and the ops team would know where these tasks were being run.

It would be great if Fargate could be used like Lamda: an application can invoke a function and it doesn't have to care about where the function runs (the function may even have an ENI and for all practical purposes do exactly the same thing as a Fargate task could do, run in the same VPC, or another VPC). With Fargate the caller needs to know the subnets where the task should run, and the security group, etc. – things that are unrelated to the work the caller wants to be performed.

Whether or not the network configuration should be in the task definition or not I don't know. I think it would make sense to have them in the cluster resource (because what's a cluster if not physical resource like a network?). The important thing is to minimize the amount of config that the runner of a task has to know to run the task.

**Are you currently working around this issue?**
By having lots of copies of values like subnet ID, security group, all over the place.

**Additional context**
This is related to #90

Contributor guide

Open the contributing guide

Research direction

No repository files, tests, or entry points are named. Start by reading issue #91 alongside related issue #90 and investigate the current Fargate task-run network configuration; the work is done when the network placement configuration can be owned outside the task runner and its intended resource and behavior are clearly specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.