# Ephemeral Storage

Ephemeral storage is temporary storage whose data is not guaranteed to survive the end or replacement of its associated compute environment.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/ephemeral-storage

> Ephemeral storage holds disposable data such as caches, temporary files, and intermediate processing results. Its lifecycle is tied to a resource such as a virtual machine, container, or function execution environment, so applications must keep authoritative data elsewhere or be able to reconstruct it.

Practice exams covering Ephemeral Storage: [CLF-C02 AWS Certified Cloud Practitioner](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate).

## 6 key aspects of Ephemeral Storage

Ephemeral storage provides disposable working space whose lifecycle, capacity, and failure behavior must be accounted for in application design.

1. **Lifecycle-bound retention**: Data retention depends on the lifecycle of the associated instance, container, or execution environment. Identify the platform's exact deletion events rather than assuming every restart behaves the same way.
2. **Disposable working data**: Use ephemeral storage for caches, scratch files, and intermediate results that can be reconstructed. Keep the only copy of business-critical data in storage with appropriate durability guarantees.
3. **Separate interface and persistence**: Block storage describes how applications access data, not how long the data survives. EC2 instance store and Amazon EBS both expose block storage, but provide different lifecycle guarantees.
4. **Workload-dependent performance**: Host-local disks can provide low-latency working space, but ephemeral storage is not inherently faster than every persistent option. Evaluate capacity, throughput, IOPS, and cost for the actual platform.
5. **Recovery by design**: Make jobs retryable and save durable checkpoints when repeating all work would be expensive. Test replacement of the compute environment to confirm that local data loss does not cause permanent application data loss.
6. **Explicit space management**: Temporary files can exhaust storage while an environment is still running. Monitor usage and implement cleanup instead of relying solely on eventual resource deletion.

## Cloud services for Ephemeral Storage

EC2 instance store, Lambda temporary storage, and Fargate ephemeral storage provide working space tied to compute environments. Applications can use them to stage downloads, process files, or maintain disposable caches. Amazon S3 can retain original inputs and completed outputs independently of those environments. For EC2 workloads that need persistent block storage, Amazon EBS provides an alternative to instance store, with deletion behavior controlled separately through volume settings. The architectural distinction is whether data must survive compute replacement: temporary working data can remain ephemeral, while authoritative data requires durable storage and appropriate recovery protections.

- **[Amazon EC2](https://blowstack.com/tools/cloud-services-hub/amazon-ec2)**: Supported EC2 instance types provide instance store: temporary block storage on disks attached to the underlying host. Data survives an ordinary reboot but is lost on stop, hibernation, termination, or underlying disk failure.
- **[AWS Lambda](https://blowstack.com/tools/cloud-services-hub/aws-lambda)**: Lambda provides ephemeral file storage in the /tmp directory for each execution environment. Files may remain available when that environment is reused, but applications must not depend on their availability in future invocations.
- **[AWS Fargate](https://blowstack.com/tools/cloud-services-hub/aws-fargate)**: Fargate provides ephemeral storage for container workloads, including task-local storage for Amazon ECS tasks. Treat this storage as disposable and use persistent storage when data must outlive the task.
- **[Amazon S3](https://blowstack.com/tools/cloud-services-hub/amazon-s3)**: Amazon S3 is a durable object-storage destination, not an ephemeral disk. Applications commonly download inputs from S3 into temporary working storage and upload completed results before their compute environment is removed.

## Ephemeral Storage exam questions

Real practice exam questions on Ephemeral Storage, with the correct answer and its explanation.

### Question 1 (CLF-C02)

**Question:**

A company runs a data-processing application on Amazon EC2. The application needs a block storage volume for temporary intermediate results that can be recreated if lost. To meet its design requirements, the volume must use disks physically attached to the host running the instance rather than network-attached storage. Which solution should the company choose?

**Correct answer:** An EC2 instance store volume on a supported instance type

**Explanation:** Instance store provides temporary block storage on disks physically attached to the EC2 host. It is suitable for intermediate results that the application can recreate if the storage is lost.

### Question 2 (DEA-C01)

**Question:**

A data engineer runs an AWS Lambda function that downloads an archive from Amazon S3, extracts it, and uses a third-party library to transform the extracted files. The library requires writable local filesystem paths. The downloaded archive, extracted files, and intermediate results require up to 3 GiB of disk space in total per invocation. Memory utilization is low, but the function fails with a "No space left on device" error while using the default storage configuration.

Each invocation can reconstruct all working files from the source archive. Only the completed output must be retained in Amazon S3. Invocations do not need to share working files.

Which change meets these requirements with the LEAST operational overhead?

**Correct answer:** Configure the function's ephemeral storage to 4,096 MB. Use an invocation-specific directory under /tmp, upload completed output to Amazon S3, and remove the working files when processing finishes.

**Explanation:** Lambda supports configuring /tmp storage independently of memory, from 512 MB to 10,240 MB. A 4,096 MB allocation accommodates the 3 GiB working set without introducing a shared filesystem. Keeping completed output in S3 makes the workflow independent of the execution environment's lifecycle. Cleaning up working files prevents accumulation when an environment is reused.

### Question 3 (SAA-C03)

**Question:**

A company runs a recommendation service on Amazon EC2 instances. Each instance builds a large local index from an authoritative dataset in Amazon S3 and stores the index on host-attached NVMe disks. The local index provides the required query performance and can be regenerated. After the company stops and starts instances for scheduled maintenance, some instances fail health checks because their indexes are missing.

The company wants to retain the current storage performance without adding persistent volumes for the indexes. Instances must also recover automatically when replaced. Which solution should a solutions architect recommend?

**Correct answer:** Add startup automation that checks for a valid local index and rebuilds it from Amazon S3 when necessary. Keep the instance out of service until the index is ready.

**Explanation:** Host-attached instance store is suitable for a reproducible, performance-sensitive index, but its contents are lost when the instance stops or is terminated. Rebuilding missing indexes from the authoritative S3 dataset allows both restarted and replacement instances to recover while retaining local-disk query performance. Readiness checks prevent requests from reaching an instance before reconstruction finishes.

## Practice Ephemeral Storage in a full exam

Questions on Ephemeral Storage in each practice exam, with every answer option and an explanation for each:

- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 3 questions
- [CLF-C02](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner): 2 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 2 questions

## What is Ephemeral Storage

Ephemeral storage is defined by its retention guarantees, not by a particular disk technology or storage interface. It can be backed by local SSDs, other disks, or memory, depending on the platform. The important question is whether data remains available when the associated compute environment stops, is removed, fails, or is replaced. Applications should treat data on ephemeral storage as expendable unless a separate mechanism preserves it.

In cloud architectures, ephemeral storage provides working space close to application execution. A video-processing worker might download a source object, create temporary frames on its local disk, and upload the completed video to durable object storage. A build worker might use temporary storage for source checkouts and compilation artifacts. If either worker disappears, another worker can repeat the operation using the original inputs.

AWS exam questions commonly test this concept through the distinction between Amazon EC2 instance store and Amazon Elastic Block Store, or Amazon EBS. Instance store provides temporary block-level storage on disks physically attached to the host computer. It is available on supported EC2 instance types and is suitable for buffers, caches, scratch files, and reproducible intermediate results. Its data survives an ordinary instance reboot, but is lost when the instance is stopped, hibernated, or terminated, or when the underlying disk fails. Rebooting and stopping an instance are therefore not equivalent storage lifecycle events.

Amazon EBS provides persistent block storage with a lifecycle that can be managed separately from the instance. An EBS volume retains its data when its attached instance stops. Whether a volume is deleted when the instance terminates depends on its delete-on-termination setting; root volumes are commonly configured for deletion by default. Consequently, persistent does not mean impossible to delete, and an EBS volume used for temporary files does not become instance store. Both EBS and instance store provide block storage, but their persistence guarantees differ.

Ephemeral storage also appears in container and serverless platforms. A container's writable layer should not be treated as durable application storage. Function environments may retain temporary files between invocations when an environment is reused, but reuse is not guaranteed. Exact retention boundaries vary by platform, so applications must not assume that all temporary storage disappears after every request or survives every restart.

The main trade-off is convenient working storage versus responsibility for recovery. Host-local storage can provide low-latency access and avoid network storage traffic, but capacity and performance depend on the compute configuration. Ephemeral storage is not necessarily memory-backed, universally faster, or free. Applications must also monitor free space, remove obsolete temporary files, and handle out-of-space errors.

A reliable design stores authoritative inputs and completed outputs in durable storage, makes interrupted work safe to retry, and treats local caches as optional accelerators. Logs needed for troubleshooting should be exported rather than left only on a disposable disk. Replication or checkpointing can protect a workload using ephemeral disks, but those protections come from the surrounding architecture, not from the ephemeral storage itself.

## Learn Ephemeral Storage in lessons

4 short lessons on Ephemeral Storage in 3 certification courses.

- CLF-C02: Ephemeral Storage: EC2 instance store and data lifetime (Premium), https://app.blowstack.com/lessons/ephemeral-storage-ec2-instance-store-and-data-lifetime-clf-c02
- DEA-C01: Ephemeral Storage: Lambda temporary working space (Premium), https://app.blowstack.com/lessons/ephemeral-storage-lambda-temporary-working-space-dea-c01
- SAA-C03: Ephemeral Storage: compute-bound data lifecycles (Premium), https://app.blowstack.com/lessons/ephemeral-storage-compute-bound-data-lifecycles-saa-c03
- DEA-C01: Shared File Systems vs Ephemeral Storage: Lambda file visibility and lifetime (Premium), https://app.blowstack.com/lessons/shared-file-systems-vs-ephemeral-storage-lambda-file-visibility-and-lifetime-dea-c01
