---
title: Cloud checkpoint
description: >-
  Lightning is integrated with the major remote file systems including local
  filesystems and several cloud storage providers such as
canonical: >-
  https://lightning.ai/docs/pytorch/stable/reference/common/checkpointing_advanced
---
# Cloud checkpoint {#cloud-checkpoint}

## Cloud checkpoints {#cloud-checkpoints}

Lightning is integrated with the major remote file systems including local filesystems and several cloud storage providers such as
[S3](https://aws.amazon.com/s3/) on [AWS](https://aws.amazon.com/), [GCS](https://cloud.google.com/storage) on [Google Cloud](https://cloud.google.com/),
or [ADL](https://azure.microsoft.com/solutions/data-lake/) on [Azure](https://azure.microsoft.com/).

PyTorch Lightning uses [fsspec](https://filesystem-spec.readthedocs.io/) internally to handle all filesystem operations.

### Save a cloud checkpoint {#save-a-cloud-checkpoint}

To save to a remote filesystem, prepend a protocol like "s3:/" to the root_dir used for writing and reading model data.

```python
# `default_root_dir` is the default path used for logs and checkpoints
trainer = Trainer(default_root_dir="s3://my_bucket/data/")
trainer.fit(model)
```

### Resume training from a cloud checkpoint {#resume-training-from-a-cloud-checkpoint}

To resume training from a cloud checkpoint use a cloud url.

```python
trainer = Trainer(default_root_dir=tmpdir, max_steps=3)
trainer.fit(model, ckpt_path="s3://my_bucket/ckpts/classifier.ckpt")
```

PyTorch Lightning uses [fsspec](https://filesystem-spec.readthedocs.io/) internally to handle all filesystem operations.

---

**Navigation**

- Parent: [Common](/docs/pytorch/2.6.6/reference/common.md)
