# Storage Gateway

**Introduction**

* Connects on-premises data to connect to AWS S3 for backup or caching purpose

**Feature**

* Storage Gateway's software appliance is available for download as a virtual machine image for client's data center
* Types:
  * File Gateway (NFS -> File Gateway -> S3)
    * File Gateway appliance is a virtual machine to bridge between your NFS and S3
    * Metadata and directory structures are preserved
    * Configured S3 buckets are accessible using the NFS and SMB protocol
    * Each File Gateway should have an IAM role to access S3
    * Most recently used data is cached in the File Gateway
    * Scenario
      * work with S3 lifecycle policy
      * work with S3 object versioning
        * Must use the "RefreshCache" API on File Gateway to be notified of restore
      * work with S3 object lock
        * Enables to have the File Gateway for Write Once Read Many (WORM) data
        * If there are file modifications or renames in the file share clients, the File Gateway creates a new version of the object without affecting prior versions, and the original locked version will remain unchanged
  * Volume Gateway (Block storage using iSCSI protocol backed by S3)
    * Data written to volumes can be asynchronously backed up as point-in-time snashots, stored in the cloud as EBS snashots. Snapshots are incremental and also comporessed. (accessing data from S3 through EBS, not to S3 directly)
    * Sub types:
      * Stored Volume&#x20;
        * Full data is stored on site, low-latency access, scheduled backups to S3
        * 1Gb \~ 512TB with 32 volumes
      * Cache Volume&#x20;
        * Full data is on S3, most frequent accessed data is cached on site
        * 1Gb \~ 1024TB with 32 volumes
    * Can configure [CHAP Authentication](https://docs.aws.amazon.com/storagegateway/latest/userguide/GettingStartedConfigureChap.html) to against playback attacks
  * Tape Gateway (or called Gateway Virtual Tape Library (VTL) for archiving)
    * Ingest data into Glacier
      * If needs further processing after ingestion, use other types of Storage Gateway.
    * Can't asscess single file within tapes, must restore the tape entirely.

**Architectures**

![Extensions with File Gateway](/files/-MEuN_At673UBO28K3mh)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ysfang82.gitbook.io/development-notes/aws-notes/service/storage/storage-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
