How can I create a Storage Gateway file share using an Amazon S3 prefix?
2 minute read
I want to create an AWS Storage Gateway file share that maps to a single Amazon Simple Storage Service (Amazon S3) prefix. How can I do that?
When creating a file share for S3 File Gateways, you can specify an S3 prefix that allows you to organize your file share objects. For example, if your bucket is named examplebucket and it has the prefix exampleprefix/, you can specify this prefix while creating the file share. To do this in the console, feed examplebucket for the Amazon S3 bucket name field, and feed exampleprefix/ for the S3 prefix name field. This allows you to organize all the objects that are created in the root of the file share inside the prefix of the S3 bucket, rather than the root of the bucket. For more information on S3 prefixes, see Organizing objects using prefixes.
Before you create a file share that maps to an Amazon S3 prefix, you must confirm that the prefix doesn't overlap with the prefix of another file share. It's a best practice to not create file shares with overlapping prefixes because this can lead to Read/Write conflicts. If you already created a file share that maps to the root of the bucket, then you must first update the existing file share to point to another prefix within the bucket.
After you confirm that no other file shares point to the Amazon S3 prefix that you want to map your new file share to, follow the steps to create a Network File System (NFS) file share or Server Message Block (SMB) file share. For Amazon S3 bucket name, enter the name of the relevant bucket. For Prefix name, enter the prefix that you want to map the file share to.
Note the following requirements for mapping a file share to an Amazon S3 prefix:
The prefix must end with "/".
After you create a file share with a specified prefix, you can't modify or delete the prefix on the file share's settings.