Question 470
Stateless container services need service availability under deployment events. The team confirms that a persistent file uploaded to a container vanishes after task replacement. Which approach most directly resolves this gap?
Explanation
Correct Answer
The scenario identifies this requirement: A persistent file uploaded to a container vanishes after task replacement. Select Store durable data in S3 or EFS instead of task ephemeral filesystem as the specified technical mechanism. Task storage is not durable across replacement. This response addresses the problem described rather than a different design goal.
Incorrect Answers
The option Use ECS service subnets across AZs and suitable task distribution addresses a separate condition: a service requires placement across distinct Availability Zones. Multi-AZ tasks survive a single-zone failure. The actual requirement is a persistent file uploaded to a container vanishes after task replacement. Recommended corrective action: Store durable data in S3 or EFS instead of task ephemeral filesystem. Task storage is not durable across replacement.
For the alternative failure a new ECS task version fails health checks and all previous tasks have been stopped, the control Configure ECS deployment circuit breaker/rollback and minimum healthy percent is relevant: deployment rollback prevents a bad revision from wiping healthy capacity. Here the evidence instead is a persistent file uploaded to a container vanishes after task replacement. The selected technical mechanism is Store durable data in S3 or EFS instead of task ephemeral filesystem: task storage is not durable across replacement.
Configure deregistration delay and graceful termination solves a different operational problem where a container remains routable while it is shutting down. Connection draining reduces dropped in-flight requests. It does not directly address a persistent file uploaded to a container vanishes after task replacement. The case calls for Store durable data in S3 or EFS instead of task ephemeral filesystem, since task storage is not durable across replacement.