AWS ECS Fargate Interview Questions
Reviewed by Mark Dickie · Last updated
15 questions on this page you can answer and see marked on the spot. Go to the first one
AWS ECS Fargate is a serverless compute engine for containers that runs on Amazon Elastic Container Service without requiring you to provision or manage EC2 instances. You define how much vCPU and memory each task needs, and Fargate allocates the compute automatically. For interviews, expect questions on the difference between Fargate and EC2 launch types, task definition anatomy, the awsvpc networking mode, IAM roles (task role vs execution role), service auto-scaling, and cost trade-offs. Most questions will test whether you understand what Fargate removes from your plate and what you are still responsible for configuring.
| Concept | What you control | What AWS manages |
|---|---|---|
| Compute | vCPU and memory per task | Server provisioning, patching, scaling |
| Networking | Security groups, subnets, ALB/NLB target groups | ENI creation and attachment in awsvpc mode |
| IAM | Task role (app permissions) and execution role (API permissions) | Credential injection into the task |
| Scheduling | Desired count, auto-scaling policies | Placing tasks across capacity |
| Storage | EFS mounts, ephemeral storage size | Underlying volume lifecycle |
What does an ECS Fargate interview typically cover?
- Launch type comparison: when to pick Fargate over EC2, and the cost implications at scale.
- Task definition internals: CPU/memory combinations, container definitions, the
requiresCompatibilitiesfield, and howFARGATEconstrains networking toawsvpc. - IAM model: the difference between the task role (permissions your application code assumes) and the task execution role (permissions ECS needs to pull images, log to CloudWatch, and fetch secrets).
- Networking: why every Fargate task gets its own ENI and private IP, how that interacts with VPC subnets, and what it means for DNS and security group rules.
- Auto-scaling: service auto-scaling via CloudWatch metrics (CPU utilization, memory utilization, or ALB request count per target) and how target tracking policies work.
What are the common mistakes interviewers look for?
Candidates often blur the two IAM roles or forget that Fargate requires the awsvpc network mode. Another frequent gap is not knowing that Fargate does not support host or bridge networking, daemon scheduling, or privileged containers. Interviewers also check whether you can articulate the cost break point: Fargate's per-second pricing is attractive for intermittent workloads, but steady-state, high-density workloads are often cheaper on EC2-backed ECS.
Key facts
- Tarmac has 28 AWS interview questions on this topic, 25 of them on this page, at difficulty 1–5 of 5.
- Tarmac tracked 5,372 job postings asking for AWS in September 2026.
- Roles asking for AWS advertise a median base salary of US$172,500, across 1,891 job postings as of September 2026.
- Tarmac last reviewed these AWS interview questions on 13 October 2026.
At a glance
| Questions | 25 shown · 28 in the bank |
|---|---|
| Difficulty | 1–5 of 5 |
| Formats | Multiple choice, Short answer, True / false, Fill in the blank, Multiple answer |
What you'll review
- ecs fargate
Practice questions
Try one before you open the answer. Pick an option and press Check; it's marked on the spot.
In AWS ECS, what does the Fargate launch type eliminate the need for you to manage?#
Options
Show answer
The Fargate launch type in AWS ECS eliminates the need to manage the underlying EC2 instances that host your containers. AWS provisions and scales the compute infrastructure automatically based on the CPU and memory you specify in the task definition, so you focus only on the application, not the servers.
With the Fargate launch type, AWS provisions and manages the compute infrastructure (the underlying EC2 instances/servers) for you. You specify the CPU and memory your task needs, and Fargate runs the containers without you having to provision, patch, or scale EC2 instances. You still manage your container images, IAM roles, and VPC/subnet networking. Contrast this with the EC2 launch type, where you register and manage your own container instances.
When running Amazon ECS tasks on AWS Fargate, what infrastructure component does AWS Fargate eliminate the need for you to provision and manage?#
Show answer
EC2 instances. With Fargate, AWS provisions and manages the underlying compute (the servers or EC2 instances that host the containers), so you only define the task's container CPU and memory requirements.
AWS Fargate is a serverless compute engine for containers. When you launch an ECS task on Fargate, AWS provisions and manages the underlying compute infrastructure on your behalf, so the component you no longer provision, patch, or scale is the EC2 instance (server) that hosts the containers. You specify the container-level CPU and memory requirements for the task, and Fargate handles the rest. This is the core distinction from the EC2 launch type, where you own and manage the cluster's EC2 instances directly.
True or false: With AWS Fargate, you specify the CPU and memory required for your Amazon ECS task, and AWS provisions the underlying compute resources automatically, so you never have to manage EC2 instances.#
Options
Show answer
True. AWS Fargate removes the need to manage EC2 instances when running Amazon ECS tasks. You specify the CPU and memory each task needs, and Fargate provisions and runs the underlying compute automatically. This serverless model is what distinguishes Fargate from the ECS EC2 launch type.
This statement is true. AWS Fargate is a serverless compute engine for containers that works with Amazon ECS. You define each task's CPU and memory requirements, and Fargate allocates the necessary compute capacity and runs the task without you provisioning, patching, or scaling any EC2 instances. This serverless model is the defining difference between Fargate and the ECS EC2 launch type, where you manage the container instances yourself.
True or false: with AWS Fargate, you must provision and manage the underlying EC2 instances that run your Amazon ECS tasks.#
Options
Show answer
False. AWS Fargate does not require you to provision or manage the EC2 instances that run Amazon ECS tasks. Fargate is a serverless compute engine for containers: you specify each task's CPU and memory, and AWS provisions and manages the underlying infrastructure automatically, unlike the EC2 launch type.
The statement is false. AWS Fargate is a serverless compute engine for containers. When used with Amazon ECS, you specify only the CPU and memory each task needs, and AWS provisions and manages the underlying compute infrastructure. There are no EC2 instances for you to manage, which is the defining difference from the EC2 launch type.
What does it mean that AWS Fargate is 'serverless' in the context of Amazon ECS?#
Show answer
It means you do not provision, manage, or scale the underlying EC2 instances. You specify the CPU and memory for your ECS task, and AWS Fargate provisions and manages the compute infrastructure to run it.
'Serverless' here means the servers that run your containers are abstracted away: with Fargate you never provision, patch, or scale the EC2 instances that host ECS tasks. You declare each task's vCPU and memory, and AWS allocates and manages the compute capacity behind the scenes. The term describes who operates the server infrastructure, not the absence of servers.
What does it mean for AWS Fargate to be a 'serverless' compute engine for containers?#
Show answer
You do not need to provision or manage any underlying servers or EC2 instances. You specify the CPU and memory for your ECS task, and AWS Fargate automatically provisions and manages the compute resources to run it.
AWS Fargate is called 'serverless' because it abstracts away the underlying server infrastructure. Instead of launching and managing EC2 instances in your ECS cluster, you define the CPU and memory your task needs and AWS handles the rest. The question is open-ended and has no fixed set of options, so it remains a short-answer question.
When you run tasks on Amazon ECS using the Fargate launch type, which of the following do you NOT need to provision, patch, or manage?#
Options
Show answer
With the Fargate launch type in Amazon ECS, you do not provision, patch, or manage the EC2 instances that host your containers, because AWS runs that compute layer for you. You still define task definitions, container images, and IAM task roles.
Fargate is serverless compute for ECS: AWS owns and maintains the underlying host machines, so you never provision, patch, or scale the EC2 instances that run your containers. The other three remain your responsibility under Fargate: you still author the task definition, supply the container image, and assign the IAM task role that the containers use.
With the AWS Fargate launch type in Amazon ECS, you pay for the vCPU and memory configured for your running tasks, and you are not charged for idle EC2 host capacity. True or false?#
Options
Show answer
True. Amazon ECS with the AWS Fargate launch type bills for the vCPU and memory configured for each running task. Because Fargate is serverless, you do not manage EC2 hosts, so idle host capacity is not charged to you.
True. Fargate is a serverless compute engine: AWS provisions the underlying capacity on demand and bills you for the vCPU and memory configured for each task while it runs. Because there is no EC2 instance in your account to keep warm, there is no idle-host charge.
True or false: In Amazon ECS, AWS Fargate removes the need for you to provision, patch, or scale the EC2 instances that host your containers.#
Options
Show answer
AWS Fargate removes the need to provision, patch, or scale the EC2 instances behind Amazon ECS containers, so the statement is true. You specify the container image and the task's vCPU and memory, and AWS manages the underlying compute. The EC2 launch type still requires you to manage the host instances.
True. Fargate is the serverless compute option for ECS. You define the container image and the vCPU and memory your task needs, and AWS provisions the underlying infrastructure, handles host OS patching, and scales the capacity. You never have to launch or maintain EC2 instances yourself. The EC2 launch type, by contrast, requires you to manage those hosts.
You are writing an ECS task definition that will run on the Fargate launch type. Which of the following configurations is REQUIRED at the task-definition level (not at the container level) for the task to be valid on Fargate?#
Options
Show answer
When running an ECS task on the Fargate launch type, you must specify cpu and memory at the task-definition level using one of Fargate's supported value combinations (e.g., 0.5 vCPU / 1 GB, 1 vCPU / 2 GB). Fargate has no underlying instances you manage, so the task-level resource declaration is what determines provisioning. Host port mappings, placement strategies, and privileged mode do not apply to Fargate.
Fargate is a serverless launch type, so there are no underlying EC2 instances to manage. AWS requires you to declare the task's total CPU and memory at the task-definition level, and the values must come from Fargate's fixed supported combinations (e.g., 0.5 vCPU / 1 GB, 1 vCPU / 2 GB, etc.). Specifying cpu and memory at the task level using Fargate-supported value combinations is correct. Mapping a hostPort for every containerPort defined in each container is wrong because Fargate enforces the awsvpc network mode, where hostPort is not used — the container port maps directly to the ENI. Defining a placementStrategy so Fargate can choose an optimal host is wrong because placement strategies are an EC2-launch-type concept for selecting which container instance to schedule on; Fargate provisioning is fully managed. Setting the privileged flag to true for containers that need elevated permissions is wrong because privileged containers are not supported on Fargate at all.
When running containers with Amazon ECS using the Fargate launch type, which infrastructure management responsibility does AWS take on that you must handle yourself with the EC2 launch type? In your answer, name the concrete things AWS manages (the servers/instances and their host operating system) rather than a feature or network mode name.#
Show answer
AWS provisions, patches, and maintains the underlying compute infrastructure — the EC2 host instances and their host operating system — so you do not have to manage, patch, or scale servers yourself.
With the ECS EC2 launch type you provision, patch, and maintain the EC2 instances and their host operating system yourself. With the Fargate launch type AWS takes over that responsibility: it provisions the underlying compute capacity and manages (patches, secures, and scales) the host OS and virtualization layer, so you only specify per-task CPU and memory requirements. The expected answer should name the underlying servers/instances and/or the host operating system — not a network mode such as awsvpc, which is available in both launch types and is not itself a management responsibility AWS takes on.
The only Amazon ECS network mode supported by the Fargate launch type is _____. This mode gives each task its own Elastic Network Interface (ENI) and private IP address.#
Show answer
The only Amazon ECS network mode supported by the Fargate launch type is awsvpc. This mode gives each task its own Elastic Network Interface (ENI) and private IP address.
Fargate tasks support only the awsvpc network mode. In this mode, ECS attaches a dedicated elastic network interface with its own private IP address to each task, so the task gets VPC-native networking and can use security groups directly. The other ECS network modes (bridge, host, and none) are not available on Fargate.
AWS Fargate requires the _____ network mode for every ECS task. In this mode each task receives its own elastic network interface (ENI) and private IP address, and security groups are attached at the task level rather than the container instance level. Fill in the name of this network mode.#
Show answer
AWS Fargate requires the awsvpc network mode for every ECS task. In this mode each task receives its own elastic network interface (ENI) and private IP address, and security groups are attached at the task level rather than the container instance level. Fill in the name of this network mode.
Fargate only supports the awsvpc network mode. That mode gives each task its own ENI with a dedicated private IP, so security groups and VPC routing are applied per task. The bridge and host network modes, which are commonly used with the EC2 launch type, are not available with Fargate because there is no shared host network namespace to attach to.
You are launching an ECS task on Fargate that runs a Node.js backend. The task needs to pull its container image from a private ECR repository and also make outbound HTTPS calls to a third-party API on the public internet. The task must NOT have a public IP address. Which combination correctly satisfies Fargate's networking requirements while meeting these constraints?#
Options
Show answer
ECS Fargate requires the awsvpc network mode, which gives each task its own elastic network interface. To keep the task off the public internet while still pulling from ECR and calling external APIs, place it in a private subnet that routes outbound traffic through a NAT gateway. The bridge, host, and none network modes are not supported on Fargate.
Fargate tasks require the awsvpc network mode; bridge, host, and none are not supported on Fargate. With awsvpc, each task receives its own ENI and private IP. Because the task must not have a public IP, it must be placed in a private subnet. To pull from ECR and reach the third-party API on the public internet, that private subnet needs a route through a NAT gateway (or NAT instance) in a public subnet. Setting the task definition networkMode to bridge and attaching a NAT gateway to the VPC is invalid because bridge is not supported by Fargate. Setting the task definition networkMode to host and enabling public IP assignment on the task is invalid because host is not supported by Fargate. Setting the task definition networkMode to none and configuring a VPC peering connection to a shared services VPC is invalid because none is not supported by Fargate and does not provide outbound connectivity. Setting the task definition networkMode to awsvpc and assigning each task an elastic network interface (ENI) in a private subnet with a route to a NAT gateway is the only configuration that satisfies all constraints.
Your team is migrating an ECS service from the EC2 launch type to Fargate. The existing task definition uses the bridge network mode with Docker port mappings to expose container ports on the host. Which statement correctly describes what must change?#
Options
Show answer
Fargate requires the awsvpc network mode, so an ECS task definition using bridge mode must switch to awsvpc. With awsvpc, each task receives its own elastic network interface and private IP address, so host-level port mappings from bridge mode no longer apply.
Fargate supports only the awsvpc network mode, so a bridge-mode task definition must be changed to awsvpc. Under awsvpc, each task gets its own elastic network interface with a private IP address, so there is no shared host network namespace and no host-level port mapping to rely on. The bridge and host modes depend on the Docker daemon running on a host EC2 instance, which Fargate does not expose, so keeping either one is not possible. The none mode would leave the task with no network connectivity at all, so it cannot serve traffic.
ECS Fargate requires the _____ network mode for all task definitions. With this mode, each Fargate task receives its own _____ with a private IP address, giving it the same networking properties as a standalone EC2 instance. On the EC2 launch type, the number of tasks that can run using this network mode is bounded by the _____ of the underlying EC2 instance type.#
Show answer
ECS Fargate requires the awsvpc network mode for all task definitions. With this mode, each Fargate task receives its own ENI with a private IP address, giving it the same networking properties as a standalone EC2 instance. On the EC2 launch type, the number of tasks that can run using this network mode is bounded by the ENI limit of the underlying EC2 instance type.
Fargate mandates the awsvpc network mode, under which each task is assigned its own elastic network interface (ENI) with a private IP. AWS automatically provisions and manages these ENIs on Fargate, so there is no per-instance ENI constraint. On the EC2 launch type, however, each awsvpc task consumes one of the ENIs available to the host EC2 instance, so the maximum number of concurrently running awsvpc tasks is limited by that instance type's ENI limit.
In Amazon ECS with the Fargate launch type, how does a task obtain network connectivity in your VPC?#
Show answer
Each Fargate task is provisioned with its own elastic network interface (ENI) in the VPC subnets you specify for the task. The ENI receives a private IP address from that subnet's range, and the task's security groups apply to that ENI.
AWS Fargate provisions and attaches a dedicated elastic network interface (ENI) for each running Fargate task. This ENI is placed in the subnets you select in your task definition or service configuration, and it receives a private IP address from that subnet's range. Because each task gets its own ENI, its networking (security groups, routing, and IP visibility) is isolated at the task level rather than shared on a host ENI as it would be with the EC2 launch type. A correct answer must name the ENI (elastic network interface) as the mechanism.
When using the Amazon ECS Fargate launch type, which of the following statements are true? Select all that apply.#
Options
Pick every one that applies.
Show answer
On Amazon ECS with the Fargate launch type, each task receives its own elastic network interface in the subnets you specify, and CPU and memory are declared at the task level using supported size combinations. Host network mode and privileged containers are not available on Fargate, since you do not manage the underlying hosts.
Fargate requires the awsvpc network mode, so each task gets its own elastic network interface in the subnets you specify. CPU and memory are set at the task level in the task definition, and the values must match one of the supported task-size combinations. Host network mode and privileged containers are not available on Fargate because there is no host instance you manage, so those two statements are false.
An ECS Fargate task definition specifies a container that must: (1) pull its image from a private ECR repository in the SAME AWS account, (2) inject a database password stored in AWS Secrets Manager as an environment variable via the container definition's secrets field, (3) at runtime write application logs to CloudWatch Logs using the awslogs log driver, and (4) at runtime read and write objects in an S3 bucket. Which statement correctly describes the required IAM role configuration?#
Options
Show answer
The task execution role needs ECR pull permissions, secretsmanager:GetSecretValue, and CloudWatch Logs write permissions; the task role needs S3 read/write permissions. The execution role is assumed by the Fargate infrastructure to pull images, retrieve secrets for environment-variable injection, and ship logs via the awslogs driver. The task role is assumed by the application at runtime for its own AWS API calls like S3 access.
ECS Fargate uses two distinct IAM roles per task. The task execution role (specified via executionRoleArn) is assumed by the Fargate infrastructure (the ECS agent) to perform setup-time actions on behalf of the container: pulling the container image from ECR, retrieving secrets referenced in the container definition's secrets field from Secrets Manager to inject as environment variables, and writing logs to CloudWatch Logs via the awslogs log driver. The task role (specified via taskRoleArn) is assumed by the application code running inside the container at runtime, and is used for the application's own AWS API calls — in this case, reading and writing objects in S3. The statement that the task execution role must include ECR pull permissions, secretsmanager:GetSecretValue, and CloudWatch Logs write permissions; the task role must include S3 read/write permissions is correct because it assigns ECR, Secrets Manager, and CloudWatch Logs permissions to the execution role and S3 permissions to the task role. The statement that the task role must include all of the above permissions (ECR, Secrets Manager, CloudWatch Logs, and S3) because the container performs every operation is wrong because the task role does not handle image pulls, secret injection, or log shipping — those are infrastructure-side operations. The statement that the task execution role must include ECR and S3 permissions; the task role must include Secrets Manager and CloudWatch Logs permissions is wrong because S3 access is an application-level operation (task role), while Secrets Manager retrieval and CloudWatch logging are infrastructure-side (execution role). The statement that the task execution role must include only ECR pull permissions; the task role must include Secrets Manager, CloudWatch Logs, and S3 permissions is wrong because it omits Secrets Manager and CloudWatch Logs permissions from the execution role, which are required for the agent to inject the secret and ship logs.
You are migrating an ECS service from the EC2 launch type (using bridge network mode with dynamic port mapping behind an Application Load Balancer) to Fargate. Which change to the ALB target group is required for the Fargate service to register targets and pass health checks?#
Options
Show answer
Under Fargate's awsvpc network mode, the ALB target group must use target type ip, because each task has its own ENI and private IP. The ALB registers those task IPs on the container port. Instance-type target groups and dynamic host port mapping from bridge mode do not apply to Fargate tasks.
Fargate supports only the awsvpc network mode. In awsvpc, each task gets its own ENI with a dedicated private IP and its own network namespace, so there is no shared host network namespace and no dynamic host port mapping as in bridge mode. The ALB target group must therefore use target type ip and register each task's ENI private IP on the container port. The instance target type applies only to EC2-backed ECS, where targets are host instance IDs reached through dynamic host ports. Registering host instances or an Auto Scaling group does not work for Fargate tasks, and tasks do not share the host network namespace.
When running an Amazon ECS task on the AWS Fargate launch type, which two of the following are required or enforced by the platform? Select two.#
Options
Pick every one that applies.
Show answer
On AWS Fargate, ECS tasks must use the awsvpc network mode, the only mode Fargate supports, and each task gets its own elastic network interface with a private IP address. Bridge mode with dynamic host port mapping and host network mode are not available on Fargate because each task runs in an isolated network namespace.
Fargate supports only the awsvpc network mode, so every task gets a dedicated elastic network interface (ENI) with its own private IP address and attachable security groups. Because of this, bridge mode with dynamic host port mapping does not apply, since that is an EC2-launch-type networking concept. host network mode is not supported on Fargate at all, because each task runs in its own isolated network namespace.
On AWS ECS Fargate using awsvpc network mode, containers within the same task definition instance (the same running task) can communicate with each other over localhost.#
Options
Show answer
Containers in the same ECS Fargate task can communicate over localhost. In awsvpc network mode, all containers in a task share one network namespace and one elastic network interface, so they reach each other on the ports they listen on. Separate tasks have their own IP addresses and must communicate through those IPs or service discovery.
In awsvpc mode, every container in a task shares the task's single elastic network interface and therefore one network namespace. Containers in the same task can reach each other on localhost using the ports they listen on, just as containers do in host mode. Communication between different tasks is different: those tasks have separate ENIs and private IPs, so they must reach each other by IP address or through service discovery.
Design the networking and load-balancing architecture for a multi-service application being deployed on ECS Fargate across two VPC subnets (public and private). Your service runs ~80 concurrent tasks, each exposing a container port of 8080. Requirements: (1) internet-facing traffic must be terminated at an ALB in public subnets, (2) Fargate tasks must have no public IPs, (3) tasks must be reachable from the ALB and from each other for internal gRPC calls, and (4) you must stay within Fargate ENI density limits. Describe the subnet placement, security group design, target group configuration, and service-discovery approach you would use.#
Show answer
Subnet placement: Put the ALB in public subnets (one per AZ) with a route to an Internet Gateway. Put Fargate tasks in private subnets (one per AZ) whose route tables send outbound traffic through a NAT Gateway, so tasks have no public IPs but can call external APIs. Use awsvpc networking mode so each task gets its own ENI and private IP. Each task consumes one private IP, so size the private subnets generously: 80 concurrent tasks need at least 80 IPs, and a /24 provides 251 usable addresses, leaving headroom for deployments and scaling. Security group design: The ALB security group allows inbound 80/443 from 0.0.0.0/0 and outbound 8080 only to the task security group. The task security group allows inbound 8080 from the ALB security group (referenced by group ID, not raw IPs) and a self-referencing inbound rule on the gRPC port so tasks can call each other. Outbound from tasks is allowed to the task security group itself for gRPC and to 0.0.0.0/0 for external calls via NAT. Target group configuration: Create the target group with target type 'ip' (not 'instance') because awsvpc tasks have no instance registration; the ALB registers each task's private IP directly, and ECS updates registrations as tasks start and stop. Use port 8080 and, for gRPC, set the protocol version to GRPC (or HTTP/2) rather than plain HTTP/1.1, with a health check against the task's health endpoint. Service discovery: Use ECS Service Discovery backed by AWS Cloud Map with a private DNS namespace. Each task registers its private IP as a DNS record when it starts and deregisters when it stops. Calling services resolve the target service's Cloud Map DNS name to get the current task IPs and connect for gRPC, so internal east-west traffic does not need a second load balancer and no IPs are hardcoded.
A strong answer must cover all four requirements with a consistent design. Fargate uses awsvpc networking, so each task gets its own ENI and private IP, which means private subnets must be sized for at least 80 IPs per deployment and headroom beyond that (a /24 gives 251 usable addresses). The ALB sits in public subnets behind an Internet Gateway, while tasks in private subnets reach the internet through a NAT Gateway and have no public IPs. Security groups should reference each other by group ID (ALB to task on 8080, and a task self-reference for gRPC) rather than hardcoding IPs, because task IPs change on every deployment. The target group must use target type 'ip' because awsvpc tasks are not registered by instance ID, and the protocol version should be set for gRPC. Cloud Map private DNS gives services a runtime way to find each other's task IPs without hardcoded addresses or a second internal ALB.
An ECS Fargate task in a private subnet with a NAT Gateway and platform version 1.4.0 fails with ResourceInitializationError: unable to pull secrets or registry auth. The task execution role has correct IAM permissions for ECR and Secrets Manager. The task's security group allows inbound TCP 8080 from the ALB and outbound TCP 443 only to the ALB's security group. The identical task definition and networking configuration works on Fargate platform version 1.3.0.#
Options
Show answer
On Fargate platform version 1.4.0, all task traffic—including ECR image pulls, Secrets Manager calls, and CloudWatch Logs—egresses through the task's own awsvpc ENI and is subject to the task's security group. In platform version 1.3.0, those control-plane operations used a separate Fargate-managed ENI not governed by the task security group. A restrictive egress rule that works on 1.3.0 can therefore block image pulls and secret fetches on 1.4.0.
Fargate platform version 1.4.0 consolidated networking onto a single task ENI: all traffic—application data, ECR image pulls, CloudWatch Logs delivery, and Secrets Manager/SSM Parameter Store API calls—now egresses through the awsvpc ENI attached to the task and is therefore governed by the task's own security group and subnet route table. In platform version 1.3.0, Fargate provisioned additional Fargate-managed ENIs for these control-plane operations; those ENIs were not subject to the task's security group, so a restrictive egress rule that only allowed TCP 443 to the ALB would still permit image pulls and secret fetches. Under 1.4.0, the same restrictive rule blocks outbound 443 to ECR and Secrets Manager endpoints (which are not the ALB), producing the ResourceInitializationError. The claim that platform version 1.4.0 introduced stricter IAM evaluation for task execution roles, requiring an explicit sts:AssumeRole permission that 1.3.0 did not enforce, is wrong because no new sts:AssumeRole requirement was introduced. The claim that platform version 1.4.0 mandates VPC endpoints for ECR and Secrets Manager when tasks run in private subnets, whereas 1.3.0 could route these calls through the NAT Gateway transparently, is wrong because 1.4.0 can still use a NAT Gateway; VPC endpoints are an optimization, not a requirement—the real blocker is the security group, not the route. The claim that platform version 1.4.0 changed the default Docker network mode from bridge to awsvpc for Fargate tasks, causing the task security group to apply to traffic that was previously unfiltered, is wrong because Fargate has always required awsvpc network mode; 1.4.0 did not change the Docker network mode.
You are the platform architect for a B2B SaaS company that runs 40+ microservices on ECS Fargate across three AWS regions. Workloads are bursty (5x daytime peak), multi-tenant (each tenant isolated at the network layer), and subject to SOC 2 (audit logging, least-privilege, no shared credentials). Cost pressure is high: current Fargate on-demand spend is 2x budget. Design a production ECS Fargate platform that addresses (1) network isolation per tenant, (2) cost reduction without sacrificing availability SLAs (99.9%), (3) east-west service-to-service traffic and discovery, (4) centralized observability and audit logging, and (5) a security posture satisfying least-privilege and secret-management requirements. Specify the concrete AWS services, Fargate-specific configuration, and trade-offs you accept.#
Show answer
Network isolation: run every Fargate task in awsvpc network mode so each task gets its own ENI and private IP. Place each tenant's tasks in dedicated private subnets within shared, multi-AZ VPCs, and give every service its own security group so ingress is allowed only from the specific upstream service security groups. This gives L3/L4 tenant isolation without a VPC per tenant; the trade-off is more subnets and security group rules to manage, and a per-tenant subnet must be sized for its task ENI count. North-south: one Application Load Balancer per region, with target groups using the awsvpc IP targets. East-west: register each service in AWS Cloud Map (private DNS namespace) so services resolve healthy task IPs at runtime, avoiding a load balancer per internal hop. Cost: use a capacity provider strategy that weights FARGATE_SPOT (roughly 80%) with FARGATE on-demand (roughly 20%) for stateless, idempotent services; cover the steady on-demand baseline with Compute Savings Plans; and right-size with Application Auto Scaling target tracking on the ALB ALBRequestCountPerTarget metric plus ECS CPU and memory utilization. Availability: Spot tasks receive SIGTERM with a 2-minute warning, so the application handles SIGTERM to drain in-flight requests; the ALB target group deregistration delay (deregistration_delay.timeout_seconds) is set to match that drain window; and the ECS service sets healthCheckGracePeriodSeconds so replacement tasks get time to start before health checks count against them. Spread tasks across at least three AZs to support the 99.9% SLA. Observability: enable ECS Container Insights at cluster level for metrics, and use a FireLens (Fluent Bit) sidecar to route stdout/stderr to CloudWatch Logs, and to S3 with KMS encryption and a lifecycle policy for long-term audit; optionally stream through Kinesis Data Firehose to OpenSearch for search. Security: separate the task execution role (pull images from ECR, write logs) from the task role (only the specific DynamoDB and KMS actions each service needs), so no shared credentials are used. Inject secrets from AWS Secrets Manager through the task definition secrets field so they never appear in plain environment variables, and rotate them with rotation Lambdas. Run containers as a non-root user and set readonlyRootFilesystem to true in the task definition.
This is an open design question, so it stays a short-answer item graded against its keywords rather than a single keyed choice. A strong answer must show Fargate-specific depth: awsvpc gives each task its own ENI, which makes per-tenant isolation a network-layer control enforced by subnets and security groups. It must pick a cost mechanism that does not hurt availability, namely Fargate Spot via a capacity provider strategy paired with SIGTERM draining, deregistration delay, and healthCheckGracePeriodSeconds, plus Compute Savings Plans for the on-demand baseline. Discovery should use Cloud Map, observability should use Container Insights and FireLens, and security should separate the execution role from the task role and inject Secrets Manager secrets through the task definition. The answer must also name the trade-offs it accepts, such as Spot interruption risk and subnet sizing overhead.
Related interview questions
Job market
See aws salaries and hiring demand from live job postings.
The other 3 questions
This page shows 25 and marks what you pick. That's as far as a page can go. A free account opens the other 3 and keeps every answer. What you miss comes back until it's right: after a day, then at longer gaps.
Free · the whole bank · 100 marked answers per 30 days · written feedback on the paid plan