Hello, this is Akakawa, who is in charge of infrastructure.
AWS Latest Announcement Announces StorageGateway to EC2 to S3 Mount It was done.
We have taken a benchmark to see if this update can solve the problems so far.
Prepared Environment
Clients
For comparison, we have prepared three instances below A to C.
A. Instance with DocumentRoot in the directory where the S3 bucket was mounted nfs via FileGateway B. Instance where the directory where the S3 bucket was mounted with s3fs as DocumentRoot C. Instance with DocumentRoot deployed in the local disk
Install httpd on each instance. Change the DocumentRoot for each server.
StorageGateway
See Gateway requirements
However, if I proceeded without reading it, I could not connect to the Gateway instance no matter how long it took. When I connected to the Gateway instance with ssh, I was warned that the vCPU was not enough. Read it carefully to check the specs. (This image is a warning on the CPU, but if there is not enough memory, Critical was displayed.) )

By the way, the default user for ssh connection to the Gateway instance is "sguser".

S3
Make a bucket to mount in advance.
FileGateway Configuration
First, create a File Gateway from the Storage Gateway menu.

Select EC2 for the Gateway type. Click the button outlined in red to open the EC2 startup screen.

Apparently there is an AMI for Gateway. Create an instance with the aforementioned caveats in mind.

Once you have created the instance, return to the File Gateway screen. Gateway IP address will be asked, so specify the IP of the instance you just created. This is followed by activation.

Next, set up file sharing. Select the Gateway you created and click Create File Share.

Enter the name of the S3 bucket to be mounted. You also set up IAM roles that can connect to S3.

When you're done, it will even display the mount command. It's kind.

Set up a Security Group so that clients can connect to the Gateway instance as appropriate. After that, prepare the client instance and change the http installation and DocumentRoot to the mount destination path.
Running an AB Bench
Deploy the test documentation on the mount destination and start httpd. Instances using S3FS and local disks are also launched and each benches are taken.
Results of S3 mounted instances via Gateway

Results of S3 mounted instances with s3fs

Local Disk Usage Instance Results

I benched it several times, and the results were comparable to those when using local disks. Great.
However, since the Gateway instance becomes SPOF and the specifications of the Gateway instance are required to a certain extent, it is necessary to consider whether the system is suitable for deployment.
See you then.