16. AWS Storage Gateway

AWS Storage Gateway 是一种将本地软件应用与云存储整合的解决方案,提供与AWS存储基础设施的安全集成。它包括文件、卷和磁带网关,支持Amazon S3 File Gateway、Amazon FSx File Gateway和Tape Gateway等,适用于不同场景的数据存储和访问需求。配置要求包括Active Directory、网络带宽和硬件资源。文件网关提供NFS和SMB协议访问S3对象,而FSx File Gateway则提供低延迟访问Amazon FSx文件分享。维护工作包括磁盘管理和CloudWatch日志配置,确保数据安全和性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Overview

  • AWS Storage Gateway connects an on-premises software appliance with cloud-based storage to provide seamless integration with data security features between your on-premises IT environment and the AWS storage infrastructure.
  • AWS Storage Gateway offers file-based file gateways (Amazon S3 File and Amazon FSx File), volume-based (Cached and Stored), and tape-based storage solutions

Required prerequisites

  • Configure Microsoft Active Directory (AD).
  • Ensure that there is sufficient network bandwidth between the gateway and AWS. A minimum of 100 Mbps is required to successfully download, activate, and update the gateway.
  • Configure your private networking, VPN, or AWS Direct Connect between your Amazon Virtual Private Cloud (Amazon VPC) and the on-premises environment where you are deploying your gateway, You must also have on-premises access to FSx for Windows File Server.
  • Make sure your gateway can resolve the name of your Active Directory Domain Controller. You can use DHCP in your Active Directory domain to handle resolution, or specify a DNS server manually from the Network Configuration settings menu in the gateway local console.
  • Hardware requirements for on-premises VMs
    • Four virtual processors assigned to the VM
    • 16 GiB of reserved RAM for file gateways
    • 80 GiB of disk space for installation of VM image and system data
  • Storage requirements
    • In addition to 80 GiB of disk space for the VM, you also need additional disks for your gateway.

      Gateway type Cache (minimum) Cache (maximum)
      File gateway 150 GiB 64 TiB

Network and firewall requirements

  • Your gateway requires access to the internet, local networks, Domain Name Service (DNS) servers, firewalls, routers, and so on.

Amazon S3 File Gateway

  • Amazon S3 File Gateway supports a file interface into Amazon Simple Storage Service (Amazon S3) and combines a service and a virtual software appliance.
  • By using this combination, you can store and retrieve objects in Amazon S3 using industry-standard file protocols such as Network File System (NFS) and Server Message Block (SMB).
  • The software appliance, or gateway, is deployed into your on-premises environment as a virtual machine (VM) running on VMware ESXi, Microsoft Hyper-V, or Linux Kernel-based Virtual Machine (KVM) hypervisor.
  • The gateway provides access to objects in S3 as files or file share mount points.
  • How to use a file gateway:
    • downloading a VM image for the file gateway.
    • You then activate the file gateway from the AWS Management Console or through the Storage Gateway API. You can also create a file gateway using an Amazon EC2 image.
    • After the file gateway is activated, you create and configure your file share and associate that share with your Amazon Simple Storage Service (Amazon S3) bucket.
      • Doing this makes the share accessible by clients using either the Network File System (NFS) or Server Message Block (SMB) protocol.
      • Files written to a file share become objects in Amazon S3, with the path as the key.
      • There is a one-to-one mapping between files and objects, and the gateway asynchronously updates the objects in Amazon S3 as you change the files.
      • Existing objects in the Amazon S3 bucket appear as files in the file system, and the key becomes the path
  • Objects are encrypted with Amazon S3–server-side encryption keys (SSE-S3). All data transfer is done through HTTPS.
  • The service optimizes data transfer between the gateway and AWS using multipart parallel uploads or byte-range downloads, to better use the available bandwidth.
  • Local cache is maintained to provide low latency access to the recently accessed data and reduce data egress charges. 

  •  File gateway converts files to S3 objects when uploading files to Amazon S3.
  • Common file operations change file metadata, which results in the deletion of the current S3 object and the creation of a new S3 object
Type definition error: [simple type, class software.amazon.awssdk.services.s3.model.DeletedObject] 这个错误信息表明在使用 AWS SDK for Java 处理与 Amazon S3 相关的编程时,遇到了类型定义错误。这个错误通常发生在尝试将一个对象转换成一个简单的数据类型或者 `software.amazon.awssdk.services.s3.model.DeletedObject` 类型时,但是实际上转换的代码并不支持这种类型的转换。 在 AWS SDK for Java 中,`software.amazon.awssdk.services.s3.model.DeletedObject` 类型通常与删除 S3 存储桶中的对象相关联。当你执行删除操作后,你可能会尝试获取一个删除操作的响应,这个响应中就包含了 `DeletedObject` 类型的实例。 为了解决这个问题,你需要检查你尝试进行类型转换的代码部分。确保在进行转换之前,对象是正确的类型。你可以使用 Java 的 `instanceof` 操作符来检查对象的实际类型。 例如,如果你有如下代码段: ```java Object response = // ... 这里是 SDK 操作的响应 if (response instanceof software.amazon.awssdk.services.s3.model.DeletedObject) { software.amazon.awssdk.services.s3.model.DeletedObject deletedObject = (software.amazon.awssdk.services.s3.model.DeletedObject) response; // 进行后续处理... } ``` 在上述代码中,我们首先检查了响应对象是否是 `DeletedObject` 类型的实例,如果是,我们就安全地将其转换为正确的类型。这样可以避免类型转换异常。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值