Skip to content

How do I create a Storage Gateway for volumes that use Amazon EC2 as the host platform?

4 minute read
0

I want to create an AWS Storage Gateway and store the data in volumes. Also, I want to use Amazon Elastic Compute Cloud (Amazon EC2) as the host platform.

Resolution

Launch your EC2 instance and internet or NAT gateway

First, take the following actions:

  • Launch an EC2 instance with the IP address that you want to activate the gateway from.
  • Launch an EC2 instance with an IP address to connect iSCSI initiators with your gateway.
  • Launch an internet gateway or NAT gateway to connect your gateway to the Storage Gateway endpoints.

Note: It's best practice to have your initiator and gateway be in the same AWS Region. Or, make them as geographically close together as possible.

Set up a Volume Gateway

Complete the following steps:

  1. Complete steps 1-3 in Set up a Volume Gateway.
  2. In the Gateway options section, choose Volume Gateway, and then select Cached volumes.
    Note: You can't deploy stored volumes on Amazon EC2.
  3. In the Platform options section, select Amazon EC2.
  4. For Launch EC2 instance, select Customize your settings.
  5. Choose Launch Instance.
    Note:
    A Launch an instance window opens. Don't close the Storage Gateway console.

Configure the host platform in Amazon EC2

In the Launch an instance window, complete the following steps:

  1. (Optional) Add tags for the gateway's Amazon EC2 host.
  2. In the Instance type section, select m5.xlarge or one of the recommended instance types.
  3. Select the appropriate key pair.
  4. In the Configure storage section, set the Root volume for your use case.
  5. Choose Add new volume to add one Amazon Elastic Block Store (Amazon EBS) volume for cache storage with at least 165 GiB. Then, add at least one Amazon EBS volume for an upload buffer with at least 150 GiB.

Configure network settings

In a separate browser window, complete the following steps:

  1. Open the Amazon EC2 console.
  2. Find and record the IP address of the EC2 instance that you want to activate the gateway from.
    Note: If the activating instance is in a different Amazon Virtual Private Cloud (Amazon VPC) than the gateway, then record the public IP address of the activating instance.
  3. Find and record the IP address of the EC2 instance to act as the iSCSI initiator to the gateway's iSCSI targets.

In the Launch an instance window, complete the following steps:

  1. In the Network settings section, choose Edit.
  2. For VPC, select the VPC that you want your instance to run in.
  3. For Subnet, choose the subnet based on the internet gateway or NAT gateway that you use to connect to the Storage Gateway endpoints.
    Note: If you use an internet gateway, then choose its associated public subnet. If you use a NAT gateway, then choose its associated private subnet.
  4. For Inbound Security Group Rules, change the Source type for Security group rule 1 (TCP, 22) from Anywhere to Custom.
    Note: This allows inbound traffic from port 22 for SSH.
  5. For Source, add the IP address of the EC2 instance that you want to activate the gateway from.
  6. Choose Add security group rule, and then enter 80 for Port range.
    Note: This allows inbound traffic from port 80 for gateway activation.
  7. For Source, add the IP address of the EC2 instance that you want to activate the gateway from.
  8. Choose Add security group rule, and then enter 3260 for Port range.
    Note: This allows inbound traffic from port 3260 for the iSCSI initiators to connect to the gateway.
  9. For Source, add the IP address of the EC2 instance to act as the iSCSI initiator to the gateway's iSCSI targets.
  10. Review the Summary section, and then choose Launch.

Complete the gateway setup and create a volume

Return to your browser window in the Storage Gateway console. Complete the steps to connect to the gateway, activate the gateway, and configure the gateway. Then, create a volume.

AWS OFFICIALUpdated 4 months ago