HomeElementl

Include ENI infornmation in ECS task stubs

Description

Include ENI infornmation in ECS task stubs

Summary:
To run a new awsvpc Fargate task, we need to provide it with networking
configuration at launch. Providing just a subnet passes validation and
launches the task but you can't do a whole lot with it without also
passing at least one security group.

We're currently following a strategy where we inherit networking
configuration from a "parent" task and create a new task using the same
information. Unfortunately, security groups aren't part of the task
metadata. Instead, we have to get the security group from the network
interface.

However, ECS infers the network interface from the subnet. So we need
to:

  1. Pass in a subnet to launch a task
  2. Our stub then needs to look up the network interface associate with that subnet. Hence the EC2 client being added to the ECS stub. It will then tag the network interface on the task stub.
  3. Our EcsRunLauncher then needs to look up the security group from the network interface. Hence the EC2 client being added to the EcsRunLauncher.

Test Plan: unit

Reviewers: alangenfeld, dgibson

Reviewed By: dgibson

Differential Revision: https://dagster.phacility.com/D8475

Details

Provenance
jordansandersAuthored on Jun 18 2021, 7:36 PM
Reviewer
dgibson
Differential Revision
D8475: Include ENI infornmation in ECS task stubs
Parents
R1:6fe3738d59db: Tag runs with ECS info
Branches
Unknown
Tags
Unknown