SOA-C02 Monitoring, Logging, and Remediation Practice Question
An application running on Amazon ECS (Fargate) is experiencing intermittent failures. The logs show 'CannotPullContainerError: error pulling image configuration: download failed after attempts=6'. The SysOps team has verified that the image exists in Amazon ECR and the task role has permissions to pull from ECR. What is the most likely cause?
⚠ Common exam trap
Test-takers frequently assume the error is due to missing IAM permissions or a corrupted image, overlooking the fact that ECS tasks in private subnets require explicit network paths (NAT gateway or VPC endpoints) to reach ECR and S3, even when permissions are correctly configured.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The ECS tasks are in a private subnet without a NAT gateway or VPC endpoints for ECR and S3.
The error 'CannotPullContainerError: error pulling image configuration: download failed after attempts=6' indicates that the ECS task is unable to download the image layers from Amazon ECR. Since the image exists and the task role has permissions, the most likely cause is a network connectivity issue. When ECS tasks run in a private subnet without a NAT gateway or VPC endpoints for ECR and S3, they cannot reach the public ECR API endpoints or the S3 buckets that store image layers, causing the pull to fail after multiple retries.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The container image is corrupted.
Why it's wrong here
Container image corruption is an unlikely cause because ECR stores images with a content-addressable digest and verifies integrity during pull; a corrupted image would raise a manifest or checksum mismatch error, not a network failure. The error message described in the scenario points to a connectivity issue (such as a timeout), not a data corruption issue. Since the image is present in ECR and permissions are confirmed, corruption does not explain the pull failure.
- ✗
The ECR repository policy is not allowing the task role.
Why it's wrong here
If the ECR repository policy did not allow the task role, the pull attempt would fail with an AccessDenied or Unauthorized error from the ECR API. The team explicitly verified task role permissions, so authentication and authorization are not the issue. Additionally, the error pattern typical of this scenario—like a connection timeout or 'no route to host'—indicates the task cannot reach ECR at the network level, not that it was denied access.
- ✗
The ECS task definition has an incorrect memory allocation.
Why it's wrong here
An incorrect memory allocation in the ECS task definition would only affect the container's runtime resource limits; the image pull occurs before the container is instantiated and is performed by the Fargate infrastructure, independent of the task's configured memory. If memory were too low, the container might be killed or fail to start after being pulled, but the error would be an OOM or a resource-limitation error, not an image-pull failure. Therefore, memory allocation is unrelated to the described symptom.
- ✓
The ECS tasks are in a private subnet without a NAT gateway or VPC endpoints for ECR and S3.
Why this is correct
Fargate tasks running in a private subnet do not have public IP addresses, so they cannot reach the internet without a NAT gateway. To pull images from ECR, the task also needs access to the Amazon S3 endpoints that store image layers, which requires either a NAT gateway or VPC endpoints for both ECR and S3. Without these routes, the image pull attempts time out or fail with a network connectivity error, exactly matching the scenario. This is the correct cause.
Visual reference
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
One of 1,169 original SOA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.