id
stringlengths
8
78
source
stringclasses
743 values
chunk_id
int64
1
5.05k
text
stringlengths
593
49.7k
storagegateway-s3file-ug-040
storagegateway-s3file-ug.pdf
40
mount your SMB file share and map to a drive accessible to your client. • Using file shares on buckets with pre-existing objects - Learn how to export a file share on an Amazon S3 bucket with objects created outside of the File Gateway using either NFS or SMB. • Test your S3 File Gateway - Learn how to test your gateway by copying files and folders to your mapped drive and verifying that they appear in your Amazon S3 bucket automatically. Mount your NFS file share on your client Use the following procedure to mount your NFS file share on a drive on your client and map it to your Amazon S3 bucket. To mount a file share and map it to an Amazon S3 bucket 1. If you are using a Microsoft Windows client, we recommend that you create an SMB file share and access it using an SMB client that is already installed on Windows client. If you use NFS, turn on Services for NFS in Windows. 2. Mount your NFS file share: Mount your NFS file share on your client API Version 2013-06-30 99 AWS Storage Gateway Amazon S3 File Gateway User Guide • For Linux clients, type the following command at the command prompt. sudo mount -t nfs -o nolock,hard [GatewayVMIPAddress]:/[FileShareName] [ClientMountPath] • For Windows clients, type the following command at the command prompt (cmd.exe). mount –o nolock -o mtype=hard [GatewayVMIPAddress]:/[FileShareName] [WindowsDriveLetter] For example, suppose that on a Windows client your VM's IP address is 123.123.1.2 and your file share name name is test-fileshare. Suppose also that you want to map to drive T. In this case, your command looks like the following. mount -o nolock -o mtype=hard 123.123.1.2:/test-fileshare T: Note When mounting file shares, be aware of the following: • S3 File Gateway does not support NFS file locking. Always use the -o nolock option to turn off file locking when mounting NFS file shares. • You might have a case where a folder and an object exist in an Amazon S3 bucket and have the same name. In this case, if the object name doesn't contain a trailing slash, only the folder is visible in a File Gateway. For example, if a bucket contains an object named test or test/ and a folder named test/test1, only test/ and test/test1 are visible in a File Gateway. • You might need to remount your file share after a reboot of your client. • By default Windows uses a soft mount for mounting your NFS share. Soft mounts time out more easily when there are connection issues. We recommend using a hard mount because a hard mount is safer and better preserves your data. The soft mount command omits the -o mtype=hard switch. The Windows hard mount command uses the -o mtype=hard switch. • If you are using Windows clients, check your mount options after mounting by running the mount command with no options. The response should that confirm the Mount your NFS file share on your client API Version 2013-06-30 100 AWS Storage Gateway Amazon S3 File Gateway User Guide file share was mounted using the latest options you provided. It also should confirm that you are not using cached old entries, which take at least 60 seconds to clear. Next Step Test your S3 File Gateway Mount your SMB file share on your client Use the following procedures to mount your SMB file share and map to a drive accessible to your client. The console's File Gateway section shows the supported mount commands that you can use for SMB clients. Following, you can find some additional options to try. You can use several different methods for mounting SMB file shares, including the following: • Command Prompt (cmdkey and net use) – Use the command prompt to mount your file share. Store your credentials with cmdkey, then mount the drive with net use and include the / persistent:yes and /savecred switches if you want the connection to persist across system reboots. The specific commands you use will be different depending on whether you want to mount the drive for Microsoft Active Directory (AD) access or guest user access. Examples are provided below. • File Explorer (Map Network Drive) – Use Windows File Explorer to mount your file share. Configure settings to specify whether you want the connection to persist across system reboots and prompt for network credentials. • PowerShell script – Create a custom PowerShell script to mount your file share. Depending on the parameters you specify in the script, the connection can be persistent across system reboots, and the share can be either visible or invisible to the operating system while mounted. Note If you are a Microsoft AD user, check with your administrator to ensure that you have access to the SMB file
storagegateway-s3file-ug-041
storagegateway-s3file-ug.pdf
41
(Map Network Drive) – Use Windows File Explorer to mount your file share. Configure settings to specify whether you want the connection to persist across system reboots and prompt for network credentials. • PowerShell script – Create a custom PowerShell script to mount your file share. Depending on the parameters you specify in the script, the connection can be persistent across system reboots, and the share can be either visible or invisible to the operating system while mounted. Note If you are a Microsoft AD user, check with your administrator to ensure that you have access to the SMB file share before mounting the file share to your local system. If you are a guest user, make sure that you have the guest user password before attempting to mount the file share. Mount your SMB file share on your client API Version 2013-06-30 101 AWS Storage Gateway Amazon S3 File Gateway User Guide To mount your SMB file share for authorized Microsoft AD users using the command prompt: 1. Make sure the Microsoft AD user has the necessary permissions to the SMB file share before mounting the file share to the user's system. 2. Enter the following at the command prompt to mount the file share: net use WindowsDriveLetter: \\GatewayIPAddress\FileShareName / persistent:yes To mount your SMB file share with a specific sign-in credentials combination using the command prompt: 1. Make sure that the user has access to the SMB file share before mounting the file share to the system. 2. Enter the following at the command prompt to save the user credentials in Windows Credential Manager: cmdkey /add:GatewayIPAddress /user:DomainName\UserName /pass:Password 3. Enter the following at the command prompt to mount the file share: net use WindowsDriveLetter: \\GatewayIPAddress\FileShareName / persistent:yes /savecred To mount your SMB file share for guest users using the command prompt: 1. Make sure that you have the guest user password before mounting the file share. 2. Type the following at the command prompt to save the guest credentials in Windows Credential Manager: cmdkey /add:GatewayIPAddress /user:DomainName\smbguest /pass:Password 3. Type the following at the command prompt. net use WindowsDriveLetter: \\$GatewayIPAddress\$Path /user:$Gateway ID\smbguest /persistent:yes /savecred Mount your SMB file share on your client API Version 2013-06-30 102 AWS Storage Gateway Amazon S3 File Gateway User Guide Note When mounting file shares, be aware of the following: • You might have a case where a folder and an object exist in an Amazon S3 bucket and have the same name. In this case, if the object name doesn't contain a trailing slash, only the folder is visible in a File Gateway. For example, if a bucket contains an object named test or test/ and a folder named test/test1, only test/ and test/test1 are visible in a File Gateway. • Unless you configure your file share connection to save your user credentials and persist across system restarts, you might need to remount your file share each time you restart your client system. To mount an SMB file share using Windows File Explorer 1. Press the Windows key and type File Explorer in the Search Windows box, or press Win+E. 2. 3. 4. 5. 6. In the navigation pane, choose This PC. Then, on the Computer tab, choose Map Network Drive. In the Map Network Drive dialog box, choose a drive letter for Drive. For Folder, type \\[File Gateway IP]\[SMB File Share Name], or choose Browse to select your SMB file share from the dialog box. (Optional) Select Reconnect at sign-up if you want your mount point to persist after reboots. (Optional) Select Connect using different credentials if you want a user to enter the Microsoft AD logon or guest account user password. 7. Choose Finish to complete your mount point. Note Any files or directories that start with a dot (.) character will be marked hidden in Windows. To make these files and directories visible, you must select the Hidden items checkbox on the View tab in Windows File Explorer. Mount your SMB file share on your client API Version 2013-06-30 103 AWS Storage Gateway Amazon S3 File Gateway User Guide You can edit file share settings, edit allowed and denied users and groups, and change the guest access password from the Storage Gateway Management Console. You can also refresh the data in the file share's cache and delete a file share from the console. To modify your SMB file share's properties 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose File Shares. 3. On the File Share page, select the check box by the SMB file share that you want to modify. 4. For Actions, choose the action that you want: • Choose Edit file share settings to modify share access. • Choose Edit allowed/denied users to add or delete users and groups, and then
storagegateway-s3file-ug-042
storagegateway-s3file-ug.pdf
42
Storage Gateway Management Console. You can also refresh the data in the file share's cache and delete a file share from the console. To modify your SMB file share's properties 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose File Shares. 3. On the File Share page, select the check box by the SMB file share that you want to modify. 4. For Actions, choose the action that you want: • Choose Edit file share settings to modify share access. • Choose Edit allowed/denied users to add or delete users and groups, and then type the allowed and denied users and groups into the Allowed Users, Denied Users, Allowed Groups, and Denied Groups boxes. Use the Add Entry buttons to create new access rights, and the (X) button to remove access. Note Groups must be prefixed with the @ character. Acceptable formats include: DOMAIN \User1, user1, @group1, and @DOMAIN\group1. 5. When you're finished, choose Save. When you enter allowed users and groups, you are creating an allow list. Without an allow list, all authenticated Microsoft AD users can access the SMB file share. Any users and groups that are marked as denied are added to a deny list and can't access the SMB file share. In instances where a user or group is on both the deny list and allow list, the deny list takes precedence. You can turn on Access Control Lists(ACLs) on your SMB file share. For information about how to turn on ACLs, see Using Windows ACLs to limit SMB file share access. Next Step Test your S3 File Gateway Mount your SMB file share on your client API Version 2013-06-30 104 AWS Storage Gateway Amazon S3 File Gateway User Guide Using file shares on buckets with pre-existing objects You can export a file share on an Amazon S3 bucket with objects created outside of the File Gateway using either NFS or SMB. Objects in the bucket that were created outside of the gateway display as files in either the NFS or SMB file system when your file system clients access them. Standard Portable Operating System Interface (POSIX) access and permissions are used in the file share. When you write files back to an Amazon S3 bucket, the files assume the properties and access rights that you give them. You can upload objects to an S3 bucket at any time. For the file share to display these newly added objects as files, you need to refresh the S3 bucket. For more information, see the section called “Refreshing Amazon S3 bucket object cache”. Note We don't recommend having multiple writers for one Amazon S3 bucket. If you do, be sure to read the section "Can I have multiple writers to my Amazon S3 bucket?" in the Storage Gateway FAQ. To assign metadata defaults to objects accessed using NFS, see Editing Metadata Defaults in Managing your Amazon S3 File Gateway. For SMB, you can export a share using Microsoft AD or guest access for an Amazon S3 bucket with pre-existing objects. Objects exported through an SMB file share inherits POSIX ownership and permissions from the parent directory right above it. For objects under the root folder, root Access Control Lists (ACL) are inherited. For Root ACL, the owner is smbguest and the permissions for files are 666 and the directories are 777. This applies to all forms of authenticated access (Microsoft AD and guest). Test your S3 File Gateway Use the following procedure to test your gateway by copying files and folders to your mapped drive and verifying that they appear in your Amazon S3 bucket automatically. To upload files from your Windows client to Amazon S3 1. On your Windows client, navigate to the drive that you mounted your file share on. The name of your drive is preceded by the name of your S3 bucket. Using file shares on buckets with pre-existing objects API Version 2013-06-30 105 AWS Storage Gateway Amazon S3 File Gateway User Guide 2. Copy files or a folder to the drive. 3. On the Amazon S3 Management Console, navigate to your mapped bucket. You should see the files and folders that you copied in the Amazon S3 bucket that you specified. You can see the file share that you created in the File shares tab in the AWS Storage Gateway Management Console. Your NFS or SMB client can write, read, delete, rename, and truncate files. Note File Gateways don't support creating hard or symbolic links on a file share. Keep in mind these points about how File Gateways work with S3: • Reads are served from a read-through cache. In other words, if data isn't available, it's fetched from S3 and added to the cache. • Writes are sent to S3 through optimized multipart uploads by using
storagegateway-s3file-ug-043
storagegateway-s3file-ug.pdf
43
bucket that you specified. You can see the file share that you created in the File shares tab in the AWS Storage Gateway Management Console. Your NFS or SMB client can write, read, delete, rename, and truncate files. Note File Gateways don't support creating hard or symbolic links on a file share. Keep in mind these points about how File Gateways work with S3: • Reads are served from a read-through cache. In other words, if data isn't available, it's fetched from S3 and added to the cache. • Writes are sent to S3 through optimized multipart uploads by using a write-back cache. • Read and writes are optimized so that only the parts that are requested or changed are transferred over the network. • Deletes remove objects from S3. • Directories are managed as folder objects in S3, using the same syntax as in the Amazon S3 console. You can rename empty directories. • Recursive file system operation performance (for example ls –l) depends on the number of objects in your bucket. Test your S3 File Gateway API Version 2013-06-30 106 AWS Storage Gateway Amazon S3 File Gateway User Guide Managing your Amazon S3 File Gateway The topics in this section provide information about how to manage your Amazon S3 File Gateway resources. Gateway management includes granting permissions for your gateway to access file shares and Amazon S3 buckets, editing information and settings for gateways and file shares, deleting file shares, refreshing cached objects, and understanding operational status indicators for gateways and file shares. Topics • Edit basic gateway information - Learn how to use the Storage Gateway console to edit basic information for an existing gateway, including the gateway name, time zone, and CloudWatch log group. • Granting access and permissions - Learn how use IAM roles to provide your gateway with access permissions for Amazon S3 buckets and Amazon VPC endpoints, prevent certain security issues, and connect file shares to buckets across AWS accounts. • Delete a file share - Learn how to delete a file share using the Storage Gateway console. • Editing gateway SMB settings - Learn how to edit gateway-level SMB settings that control security strategy, Active Directory authentication, guest access, local group permissions, and file share visibility for the SMB file shares on a gateway. • Edit SMB file share settings - Learn how to edit settings to configure name, logging, cache refresh, storage class, file export, and more for an SMB file share. • Limit SMB file share access - Learn how to add allowed or denied users or groups to limit access to your SMB file share. • Edit NFS file share settings - Learn how to edit settings to configure name, logging, cache refresh, storage class, file export, and more for an NFS file share. • Edit NFS file share metadata defaults - Learn how to edit default metadata values that include Unix permissions for files and folders on NFS files shares. • Limit NFS file share access - Learn how to to limit access to clients from specific IP addresses or IP ranges for your NFS fileshare. • Refreshing Amazon S3 bucket object cache - Learn how to refresh the S3 bucket object cache for a file share and configure a schedule to refresh the cache automatically. • Using S3 Object Lock - Learn about how Amazon S3 File Gateway works with the S3 Object Lock feature. API Version 2013-06-30 107 AWS Storage Gateway Amazon S3 File Gateway User Guide • File share status - Learn how to view and interpret file share status. • Gateway status - Learn how to view and interpret gateway status. • Managing bandwidth for your Amazon S3 File Gateway - Learn how to limit the upload throughput from your gateway to AWS to control the amount of network bandwidth the gateway uses. Edit basic information for an S3 File Gateway You can use the Storage Gateway console to edit basic information for an existing gateway, including the gateway name, time zone, and CloudWatch log group. To edit basic information for an existing gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways, then choose the gateway for which you want to edit basic information. 3. 4. 5. 6. From the Actions dropdown menu, choose Edit gateway information. For Gateway name, enter a name for your gateway. You can search for this name to find your gateway on the list pages in the Storage Gateway console. Note Gateway names must be between 2 and 255 characters, and cannot include a slash (\ or /). Changing a gateway's name will disconnect any CloudWatch alarms set up to monitor the gateway. To reconnect the alarms, update the GatewayName for each alarm in the CloudWatch console. For Gateway time zone, choose the local time
storagegateway-s3file-ug-044
storagegateway-s3file-ug.pdf
44
to edit basic information. 3. 4. 5. 6. From the Actions dropdown menu, choose Edit gateway information. For Gateway name, enter a name for your gateway. You can search for this name to find your gateway on the list pages in the Storage Gateway console. Note Gateway names must be between 2 and 255 characters, and cannot include a slash (\ or /). Changing a gateway's name will disconnect any CloudWatch alarms set up to monitor the gateway. To reconnect the alarms, update the GatewayName for each alarm in the CloudWatch console. For Gateway time zone, choose the local time zone for the part of the world where you want to deploy your gateway. For Choose how to set up log group, choose how to set up Amazon CloudWatch Logs to monitor the health of your gateway. You can choose from the following options: • Create a new log group – Set up a new log group to monitor your gateway. • Use an existing log group – Choose an existing log group from the corresponding dropdown list. Edit basic gateway information API Version 2013-06-30 108 AWS Storage Gateway Amazon S3 File Gateway User Guide • Deactivate logging – Do not use Amazon CloudWatch Logs to monitor your gateway. 7. When you finish modifying the settings you want to change, choose Save changes. Granting access and permissions for file shares and buckets After your S3 File Gateway is activated and running, you can add additional file shares and grant access to Amazon S3 buckets, including buckets in different AWS accounts than your gateways and file shares. The following sections describe how to use IAM roles to provide your gateway with access permissions for Amazon S3 buckets and VPC endpoints, prevent certain security issues, and connect file shares to buckets across AWS accounts. For information about how to create a new file share, see Creating a file share. This section contains the following topics, which provide additional information about how to grant access and permissions for file shares and Amazon S3 buckets: Topics • Granting access to an Amazon S3 bucket - Learn how to grant access for your File Gateway to upload files into your Amazon S3 bucket, and to perform actions on any access points or Amazon Virtual Private Cloud (Amazon VPC) endpoints that it uses to connect to the bucket. • Cross-service confused deputy prevention - Learn how to prevent a common security issue where an entity that doesn't have permission to perform an action can coerce a more-privileged entity to perform the action. • Using a file share for cross-account access - Learn how to grant access for an Amazon Web Services account and users of that account to access resources that belong to another Amazon Web Services account. Granting access to an Amazon S3 bucket When you create a file share, your File Gateway requires access to upload files into your Amazon S3 bucket, and to perform actions on any access points or virtual private cloud (VPC) endpoints that it uses to connect to the bucket. To grant this access, your File Gateway assumes an AWS Identity and Access Management (IAM) role that is associated with an IAM policy that grants this access. The role requires this IAM policy and a security token service trust (STS) relationship for it. The policy determines which actions the role can perform. In addition, your S3 bucket and any Granting access and permissions API Version 2013-06-30 109 AWS Storage Gateway Amazon S3 File Gateway User Guide associated access points or VPC endpoints must have an access policy that allows the IAM role to access them. You can create the role and access policy yourself, or your File Gateway can create them for you. If your File Gateway creates the policy for you, the policy contains a list of S3 actions. For information about roles and permissions, see Creating a role to delegate permissions to an AWS service in the IAM User Guide. The following example is a trust policy that allows your File Gateway to assume an IAM role. { "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "Service": "storagegateway.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } Important Storage Gateway can assume existing service roles that are passed using the iam:PassRole policy action, but it does not support IAM policies that use the iam:PassedToService context key to limit the action to specific services. For more information, see the following topics in the AWS Identity and Access Management User Guide: • IAM: Pass an IAM role to a specific AWS service • Granting a user permissions to pass a role to an AWS service • Available keys for IAM If you don't want your File Gateway to create a policy on your behalf, you can create your own policy
storagegateway-s3file-ug-045
storagegateway-s3file-ug.pdf
45
Storage Gateway can assume existing service roles that are passed using the iam:PassRole policy action, but it does not support IAM policies that use the iam:PassedToService context key to limit the action to specific services. For more information, see the following topics in the AWS Identity and Access Management User Guide: • IAM: Pass an IAM role to a specific AWS service • Granting a user permissions to pass a role to an AWS service • Available keys for IAM If you don't want your File Gateway to create a policy on your behalf, you can create your own policy and attach it to your file share. For more information about how to do this, see Creating a file share. Granting access to an S3 bucket API Version 2013-06-30 110 AWS Storage Gateway Amazon S3 File Gateway User Guide The following example policy allows your File Gateway to perform all the Amazon S3 actions listed in the policy. The first part of the statement allows all the actions listed to be performed on the S3 bucket named amzn-s3-demo-bucket. The second part allows the listed actions on all objects in amzn-s3-demo-bucket. { "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:GetAccelerateConfiguration", "s3:GetBucketLocation", "s3:GetBucketVersioning", "s3:ListBucket", "s3:ListBucketVersions", "s3:ListBucketMultipartUploads" ], "Resource": "arn:aws:s3:::amzn-s3-demo-bucket", "Effect": "Allow" }, { "Action": [ "s3:AbortMultipartUpload", "s3:DeleteObject", "s3:DeleteObjectVersion", "s3:GetObject", "s3:GetObjectAcl", "s3:GetObjectVersion", "s3:ListMultipartUploadParts", "s3:PutObject", "s3:PutObjectAcl" ], "Resource": "arn:aws:s3:::amzn-s3-demo-bucket/*", "Effect": "Allow" } ] } The following example policy is similar to the preceding one, but allows your File Gateway to perform actions required to access a bucket through an access point. { Granting access to an S3 bucket API Version 2013-06-30 111 AWS Storage Gateway Amazon S3 File Gateway User Guide "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:AbortMultipartUpload", "s3:DeleteObject", "s3:DeleteObjectVersion", "s3:GetObject", "s3:GetObjectAcl", "s3:GetObjectVersion", "s3:ListMultipartUploadParts", "s3:PutObject", "s3:PutObjectAcl" ], "Resource": "arn:aws:s3:us-east-1:123456789:accesspoint/ TestAccessPointName/*", "Effect": "Allow" } ] } Note If you need to connect your file share to an S3 bucket through a VPC endpoint, see Endpoint policies for Amazon S3 in the AWS PrivateLink User Guide. Note For encrypted buckets, the fileshare must use the key in the destination S3 bucket account. Note If your File Gateway uses SSE-KMS or DSSE-KMS for encryption, make sure the IAM role associated with the file share includes kms:Encrypt, kms:Decrypt, kms:ReEncrypt*, kms:GenerateDataKey, and kms:DescribeKey permissions. For more information, see Using Identity-Based Policies (IAM Policies) for Storage Gateway. Granting access to an S3 bucket API Version 2013-06-30 112 AWS Storage Gateway Amazon S3 File Gateway User Guide Cross-service confused deputy prevention The confused deputy problem is a security issue where an entity that doesn't have permission to perform an action can coerce a more-privileged entity to perform the action. In AWS, cross-service impersonation can result in the confused deputy problem. Cross-service impersonation can occur when one service (the calling service) calls another service (the called service). The calling service can be manipulated to use its permissions to act on another customer's resources in a way it should not otherwise have permission to access. To prevent this, AWS provides tools that help you protect your data for all services with service principals that have been given access to resources in your account. We recommend using the aws:SourceArn and aws:SourceAccount global condition context keys in resource policies to limit the permissions that AWS Storage Gateway gives another service to the resource. If you use both global condition context keys, the aws:SourceAccount value and the account in the aws:SourceArn value must use the same account ID when used in the same policy statement. The value of aws:SourceArn must be the ARN of the Storage Gateway with which your file share is associated. The most effective way to protect against the confused deputy problem is to use the aws:SourceArn global condition context key with the full ARN of the resource. If you don't know the full ARN of the resource or if you are specifying multiple resources, use the aws:SourceArn global context condition key with wildcards (*) for the unknown portions of the ARN. For example, arn:aws:servicename::123456789012:*. The following example shows how you can use the aws:SourceArn and aws:SourceAccount global condition context keys in Storage Gateway to prevent the confused deputy problem. { "Version": "2012-10-17", "Statement": { "Sid": "ConfusedDeputyPreventionExamplePolicy", "Effect": "Allow", "Principal": { "Service": "storagegateway.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "StringEquals": { Cross-service confused deputy prevention API Version 2013-06-30 113 AWS Storage Gateway Amazon S3 File Gateway User Guide "aws:SourceAccount": "123456789012" }, "ArnLike": { "aws:SourceArn": "arn:aws:storagegateway:us-east-1:123456789012:gateway/ sgw-712345DA" } } } ] } Using a file share for cross-account access Cross-account access is when an Amazon Web Services account and users for that account are granted access to resources that belong to another Amazon Web Services account. With File Gateways, you can use a file share in one Amazon Web Services account to access objects in an Amazon S3 bucket that belongs to a different
storagegateway-s3file-ug-046
storagegateway-s3file-ug.pdf
46
"storagegateway.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "StringEquals": { Cross-service confused deputy prevention API Version 2013-06-30 113 AWS Storage Gateway Amazon S3 File Gateway User Guide "aws:SourceAccount": "123456789012" }, "ArnLike": { "aws:SourceArn": "arn:aws:storagegateway:us-east-1:123456789012:gateway/ sgw-712345DA" } } } ] } Using a file share for cross-account access Cross-account access is when an Amazon Web Services account and users for that account are granted access to resources that belong to another Amazon Web Services account. With File Gateways, you can use a file share in one Amazon Web Services account to access objects in an Amazon S3 bucket that belongs to a different Amazon Web Services account. To use a file share owned by one Amazon Web Services account to access an S3 bucket in a different Amazon Web Services account 1. Make sure that the S3 bucket owner has granted your Amazon Web Services account access to the S3 bucket that you need to access and the objects in that bucket. For information about how to grant this access, see Example 2: Bucket owner granting cross-account bucket permissions in the Amazon Simple Storage Service User Guide. For a list of the required permissions, see Granting access to an Amazon S3 bucket. 2. Make sure that the IAM role that your file share uses to access the S3 bucket includes permissions for operations such as s3:GetObjectAcl and s3:PutObjectAcl. In addition, make sure that the IAM role includes a trust policy that allows your account to assume that IAM role. For an example of such a trust policy, see Granting access to an Amazon S3 bucket. If your file share uses an existing role to access the S3 bucket, you should include permissions for s3:GetObjectAcl and s3:PutObjectAcl operations. The role also needs a trust policy that allows your account to assume this role. For an example of such a trust policy, see Granting access to an Amazon S3 bucket. 3. Choose Gateway files acccessible to S3 bucket owner when creating your file share or editing file share settings in the https://console.aws.amazon.com/storagegateway/home. Using a file share for cross-account access API Version 2013-06-30 114 AWS Storage Gateway Amazon S3 File Gateway User Guide When you have created or updated your file share for cross-account access and mounted the file share on-premises, we highly recommend that you test your setup. You can do this by listing directory contents or writing test files and making sure the files show up as objects in the S3 bucket. Important Make sure to set up the policies correctly to grant cross-account access to the account used by your file share. If you don't, updates to files through your on-premises applications don't propagate to the Amazon S3 bucket that you're working with. Resources For additional information about access policies and access control lists, see the following: Guidelines for using the available access policy options in the Amazon Simple Storage Service User Guide Access Control List (ACL) overview in the Amazon Simple Storage Service User Guide Delete a file share If you no longer need a file share, you can delete it from the Storage Gateway console. When you delete a file share, the gateway is detached from the Amazon S3 bucket that the file share maps to. However, the S3 bucket and its contents aren't deleted. If your gateway is uploading data to a S3 bucket when you delete a file share, the delete process doesn't complete until all the data is uploaded. The file share has the DELETING status until the data is completely uploaded. If you don't want to wait for your data to be completely uploaded, see the To forcibly delete a file share procedure later in this topic. To delete a file share 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares, then select one or more file shares to delete. Delete a file share API Version 2013-06-30 115 AWS Storage Gateway Amazon S3 File Gateway User Guide 3. For Actions, choose Delete file share. The confirmation dialog box appears. 4. Verify that you want to delete the specified file shares, then type the word delete in the confirmation box and choose Delete. In certain cases, you might not want to wait until all the data written to files on the Network File System (NFS) file share is uploaded before deleting the file share. For example, you might want to intentionally discard data that was written but has not yet been uploaded, or the Amazon S3 bucket that backs the file share might have already been deleted, meaning that uploading the specified data is no longer possible. In these cases, you can forcibly delete the file share by using the AWS Management Console or the DeleteFileShare API operation. This operation stops the data upload process. When it does, the file share enters the FORCE_DELETING
storagegateway-s3file-ug-047
storagegateway-s3file-ug.pdf
47
the data written to files on the Network File System (NFS) file share is uploaded before deleting the file share. For example, you might want to intentionally discard data that was written but has not yet been uploaded, or the Amazon S3 bucket that backs the file share might have already been deleted, meaning that uploading the specified data is no longer possible. In these cases, you can forcibly delete the file share by using the AWS Management Console or the DeleteFileShare API operation. This operation stops the data upload process. When it does, the file share enters the FORCE_DELETING status. To forcibly delete a file share using the Storage Gateway console, see the procedure following. To forcibly delete a file share 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. 3. From the File shares list page, choose file share that you flagged for deletion in the procedure above to view its details. After a few seconds, a deletion notification message appears on the Details tab. In the message that appears on the Details tab, verify the ID of the file share that you want to forcibly delete, select the confirmation box, and choose Force delete now. Note You cannot undo the force delete operation. When you forcibly delete a file share, pieces of partially-transferred files from multi- part uploads might remain on Amazon S3 where they can incur storage charges. We recommend configuring an Amazon S3 bucket lifecycle rule to delete these file parts automatically. For more information, see Best practices: managing multipart uploads. You can also use the DeleteFileShare API operation to forcibly delete the file share. Deleting a file share using the API requires the storagegateway:DeleteFileShare IAM policy permission. Delete a file share API Version 2013-06-30 116 AWS Storage Gateway Amazon S3 File Gateway User Guide Editing SMB settings for a gateway Gateway-level SMB settings let you configure the security strategy, Active Directory authentication, guest access, local group permissions, and file share visibility for the SMB file shares on a gateway. To edit gateway level SMB settings 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways, then choose the gateway for which you want to edit SMB settings. 3. From the Actions dropdown menu, choose Edit SMB settings, then choose the settings you want to edit. This section contains the following topics, which provide additional information and procedures related to configuring each of the individual SMB settings for your gateway. Topics • Set gateway security level - Learn how to set a security level to specify connection requirements such as Server Message Block (SMB) signing and encryption, and whether to allow connections from SMB version 1 clients. • Configure Active Directory authentication - Learn how to configure your corporate Active Directory or AWS Managed Microsoft AD for user authenticated access to your SMB file share. • Provide guest access - Learn how to configure your gateway to allow guest access for any user that provides the correct guest account username and password. • Configure local groups - Learn how to configure local groups to grant Active Directory users special file share permissions. • Set file share visibility - Learn how to specify whether the shares on a gateway are visible when listing shares to users. Set a security level for your gateway By using a S3 File Gateway, you can specify a security level for your gateway. By specifying this security level, you can set whether your gateway should require Server Message Block (SMB) signing or SMB encryption, or whether you want to allow SMB version 1. Editing gateway SMB settings API Version 2013-06-30 117 AWS Storage Gateway To configure security level Amazon S3 File Gateway User Guide 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways, then choose the gateway for which you want to edit SMB settings. 3. From the Actions dropdown menu, choose Edit SMB settings, then choose SMB security settings. 4. For Security level, choose one of the following: Note For information about configuring this setting using the AWS API, see UpdateSMBSecurityStrategy in the AWS Storage Gateway API Reference. A higher security strategy level can affect performance of the gateway. • Mandatory encryption – If you choose this option, S3 File Gateway only allows connections from SMBv3 clients that use 256-bit AES encryption algorithms. 128-bit algorithms are not allowed. This option is recommended for environments that handle sensitive data. It works with all current SMB clients on Microsoft Windows. • Enforce encryption – If you choose this option, S3 File Gateway only allows connections from SMBv3 clients that have encryption turned on. Both 256-bit and 128-bit algorithms are allowed. This option is recommended for environments that handle sensitive data. It works with all current SMB clients on Microsoft Windows. • Enforce signing – If you
storagegateway-s3file-ug-048
storagegateway-s3file-ug.pdf
48
you choose this option, S3 File Gateway only allows connections from SMBv3 clients that use 256-bit AES encryption algorithms. 128-bit algorithms are not allowed. This option is recommended for environments that handle sensitive data. It works with all current SMB clients on Microsoft Windows. • Enforce encryption – If you choose this option, S3 File Gateway only allows connections from SMBv3 clients that have encryption turned on. Both 256-bit and 128-bit algorithms are allowed. This option is recommended for environments that handle sensitive data. It works with all current SMB clients on Microsoft Windows. • Enforce signing – If you choose this option, S3 File Gateway only allows connections from SMBv2 or SMBv3 clients that have signing turned on. This option works with all current SMB clients on Microsoft Windows. • Client negotiated – If you choose this option, requests are established based on what is negotiated by the client. This option is recommended when you want to maximize compatibility across different clients in your environment. Note For gateways activated before June 20, 2019, the default security level is Client negotiated. Set gateway security level API Version 2013-06-30 118 AWS Storage Gateway Amazon S3 File Gateway User Guide For gateways activated on June 20, 2019 and later, the default security level is Enforce encryption. 5. Choose Save. Use Active Directory to authenticate users To use your corporate Active Directory or AWS Managed Microsoft AD for user authenticated access to your SMB file share, edit the SMB settings for your gateway with your Microsoft AD domain credentials. Doing this allows your gateway to join your Active Directory domain and allows members of the domain to access the SMB file share. Note Using AWS Directory Service, you can create a hosted Active Directory domain service in the AWS Cloud. To use AWS Managed Microsoft AD with an Amazon EC2 gateway, you must create the Amazon EC2 instance in the same VPC as the AWS Managed Microsoft AD, add the _workspaceMembers security group to the Amazon EC2 instance, and join the AD domain using the Admin credentials from the AWS Managed Microsoft AD. For more information about AWS Managed Microsoft AD, see the AWS Directory Service Administration Guide. For more information about Amazon EC2, see the Amazon Elastic Compute Cloud Documentation. You can also activate access control lists (ACLs) on your SMB file share. For information about how to activate ACLs, see Using Windows ACLs to limit SMB file share access. To turn on Active Directory authentication 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways, then choose the gateway for which you want to edit SMB settings. 3. From the Actions drop-down menu, choose Edit SMB settings, then choose Active Directory settings. Configure Active Directory authentication API Version 2013-06-30 119 AWS Storage Gateway Amazon S3 File Gateway User Guide 4. For Domain name, enter the name of the Active Directory domain you want your gateway to join. Note Active Directory status shows Detached when a gateway has never joined a domain. Your Active Directory service account must have the requisite permissions. For more information, see Active Directory service account permission requirements. Joining a domain creates an Active Directory computer account in the default computers container (which is not an OU), using the gateway's Gateway ID as the account name (for example, SGW-1234ADE). It is not possible to customize the name of this account. If your Active Directory environment requires that you pre-stage accounts to facilitate the join domain process, you will need to create this account ahead of time. If your Active Directory environment has a designated OU for new computer objects, you must specify that OU when joining the domain. If your gateway can't join an Active Directory directory, try joining with the directory's IP address by using the JoinDomain API operation. 5. 6. 7. For Domain user and Domain password, enter the credentials for the Active Directory service account that the gateway will use to join the domain. (Optional) For Organization unit (OU), enter the designated OU that your Active Directory uses for new computer objects. (Optional) For Domain controller(s) (DC), enter the name of one or more DCs through which your gateway will connect to Active Directory. You can enter multiple DCs as a comma- separated list. You can leave this field blank to allow DNS to automatically select a DC. 8. Choose Save changes. To limit file share access to specific AD users and groups 1. 2. 3. In the Storage Gateway console, choose the file share that you want to limit access to. From the Actions drop-down menu, choose Edit file share access settings. In the User and group file share access section, choose your settings. Configure Active Directory authentication API Version 2013-06-30 120 AWS Storage Gateway Amazon S3 File Gateway User Guide For
storagegateway-s3file-ug-049
storagegateway-s3file-ug.pdf
49
Directory. You can enter multiple DCs as a comma- separated list. You can leave this field blank to allow DNS to automatically select a DC. 8. Choose Save changes. To limit file share access to specific AD users and groups 1. 2. 3. In the Storage Gateway console, choose the file share that you want to limit access to. From the Actions drop-down menu, choose Edit file share access settings. In the User and group file share access section, choose your settings. Configure Active Directory authentication API Version 2013-06-30 120 AWS Storage Gateway Amazon S3 File Gateway User Guide For Allowed users and groups, choose Add allowed user or Add allowed group and enter an AD user or group that you want to allow file share access. Repeat this process to allow as many users and groups as necessary. For Denied users and groups, choose Add denied user or Add denied group and enter an AD user or group that you want to deny file share access. Repeat this process to deny as many users and groups as necessary. Note The User and group file share access section appears only if Active Directory is selected. Groups must be prefixed with the @ character. Acceptable formats include: DOMAIN \User1, user1, @group1, and @DOMAIN\group1. If you configure Allowed and Denied Users and Groups lists, then Windows ACLs will not grant any access that overrides those lists. The Allowed and Denied Users and Groups lists are evaluated before ACLs, and control which users can mount or access the file share. If any users or groups are placed on the Allowed list, the list is considered active, and only those users can mount the file share. After a user has mounted a file share, ACLs then provide more granular protection that controls which specific files or folders the user can access. For more information, see Activating Windows ACLs on a new SMB file share. 4. When you finish adding your entries, choose Save. Provide guest access to your file share You can configure your S3 File Gateway to allow guest access for any user that is able to provide the correct guest account username and password. If you want this to be the only method by which users can access your file gateway, then you do not need to join the gateway to a Microsoft Active Directory domain. You can also use this guest access method to create file shares on an S3 File Gateway that is a member of an Active Directory domain. Provide guest access API Version 2013-06-30 121 AWS Storage Gateway Amazon S3 File Gateway User Guide When you configure a file share to use the Guest Access authentication method, the guest access username is smbguest. Before you can create a file share using guest access, you need to change the default password for the smbguest user. You can use the following procedure to change the password for the guest user smbguest. To change the guest access password 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways from the navigation pane on the left side of the console page, and then choose the Name of the gateway for which you want to provide guest access. 3. 4. From the Actions drop down menu, choose Edit SMB settings, and then choose Guest access settings. For Guest password, enter the guest access password you want to set, and then choose Save changes. Configure local groups for your gateway Local Group settings allow you to grant Active Directory users or groups special permissions for the SMB file shares on your gateway. You can use Local Group settings to assign Gateway Admin permissions. Gateway Admins can use the Shared Folders Microsoft Management Console snap-in to force-close files that are open and locked. Note You must add at least one Gateway Admin user or group before you can join your gateway to an Active Directory domain. To assign Gateway Admins 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways, then choose the gateway for which you want to edit SMB settings. Configure local groups API Version 2013-06-30 122 AWS Storage Gateway Amazon S3 File Gateway User Guide 3. 4. From the Actions dropdown menu, choose Edit SMB settings, then choose Local Group settings. In the Local Group settings section, choose your settings. This section appears only for file shares that use Active Directory. For Gateway Admins, add Active Directory users and groups that you want to grant local Gateway Admin permissions. Add one user or group per line, including the domain name. For example, corp\Domain Admins. To create additional lines, choose Add new Gateway Admin. Note Editing Gateway Admins disconnects and reconnects all SMB file shares. 5. Choose Save changes, then choose Proceed to acknowledge the warning message that appears.
storagegateway-s3file-ug-050
storagegateway-s3file-ug.pdf
50
the Actions dropdown menu, choose Edit SMB settings, then choose Local Group settings. In the Local Group settings section, choose your settings. This section appears only for file shares that use Active Directory. For Gateway Admins, add Active Directory users and groups that you want to grant local Gateway Admin permissions. Add one user or group per line, including the domain name. For example, corp\Domain Admins. To create additional lines, choose Add new Gateway Admin. Note Editing Gateway Admins disconnects and reconnects all SMB file shares. 5. Choose Save changes, then choose Proceed to acknowledge the warning message that appears. Set file share visibility File share visibility controls whether the shares on a gateway are visible when listing shares to users, such as in a net view or browse list. If the file shares on a gateway are visible, then clients can easily discover the shares using a file browser if they know the gateway IP address or DNS name. If the file shares are not visible, then clients need to know the file share name in addition to the gateway IP or DNS name to be able to discover the shares. Note This setting is not an effective method for securing access to the file shares in your deployment. For security, we recommend configuring permissions to limit access to specific users and groups. For instructions, see Limit user and group access for your SMB file share. To set file share visibility 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways, then choose the gateway for which you want to edit SMB settings. Set file share visibility API Version 2013-06-30 123 AWS Storage Gateway Amazon S3 File Gateway User Guide 3. 4. From the Actions drop-down menu, choose Edit SMB settings, then choose File share visibility settings. For Visibility status, select the check box if you want the shares on this gateway to appear when the gateway lists shares to users. Keep the check box cleared if you do not want the shares on this gateway to appear when the gateway lists shares to users. Edit settings for your SMB file share You can edit the following settings for an existing SMB file share: • File share name - choose a name for the file share • Audit logs - turn audit logs on or off • Existing log group list - choose an existing log group for audit logs • Non-gateway file cache refresh time - specify the interval at which to refresh the file share's cache Note Setting this value shorter than 30 minutes can negatively impact gateway performance in situations where large numbers of Amazon S3 objects are frequently created or deleted. • Upload events settling time - specify the number of seconds to wait after the last point in time that a client wrote to a file before generating an ObjectUploaded notification • Storage class for new objects - choose a storage class to use for new objects created in your Amazon S3 bucket • Guess MIME type - choose whether you want Storage Gateway to guess the MIME type for uploaded objects based on file extensions • Gateway files acccessible to S3 bucket owner - choose whether to make files on the gateway accessible to the AWS account that owns the Amazon S3 bucket that is linked to the file share • Enable requester pays - choose whether to require accounts that read or request data from the file share to to pay for access charges, rather than the bucket owner • Export as - choose whether files are exported in read-write or read-only state • File and directory access controlled by - choose whether to use Windows ACLs or POSIX permissions to control file and directory access Edit SMB file share settings API Version 2013-06-30 124 AWS Storage Gateway Amazon S3 File Gateway User Guide • Opportunistic lock (oplock) - choose whether allow the file share to use opportunistic locking to optimize the file buffering strategy • Force case sensitivity - choose whether the client or the gateway controls case sensitivity for file and directory names • Access based enumeration for files and directories - choose whether to make the files and folders on the share visible to all users during directory enumeration, or only to users who have read access Note You cannot edit an existing file share to point to a new bucket or access point, or modify the VPC endpoint settings. You can configure those settings only when creating a new file share. To edit the file share settings 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares, and then choose the file share that you want to update. 3. 4. For Actions, choose Edit file share settings. Edit any settings that you want
storagegateway-s3file-ug-051
storagegateway-s3file-ug.pdf
51
and folders on the share visible to all users during directory enumeration, or only to users who have read access Note You cannot edit an existing file share to point to a new bucket or access point, or modify the VPC endpoint settings. You can configure those settings only when creating a new file share. To edit the file share settings 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares, and then choose the file share that you want to update. 3. 4. For Actions, choose Edit file share settings. Edit any settings that you want to change. 5. Choose Save. Limit user and group access for your SMB file share We recommend adding allowed or denied users or groups to limit access to your file share. If you don't, the file share will be available to all authenticated users. To edit SMB access settings 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares, and then choose the SMB file share that you want to edit. 3. For Actions, choose Edit file share access settings. Limit SMB file share access API Version 2013-06-30 125 AWS Storage Gateway Amazon S3 File Gateway User Guide 4. In the User and group file share access section, choose your settings. For Allowed users and groups, choose Add allowed user or Add allowed group and enter an AD user or group that you want to allow file share access. Repeat this process to allow as many users and groups as necessary. Any users not in the Allowed user and groups list will be denied access. For Denied users and groups, choose Add denied user or Add denied group and enter an AD user or group that you want to deny file share access. Repeat this process to deny as many users and groups as necessary. If the Allowed users and groups list is empty, all users other than those on the Denied users and groups list will be granted access. Note Enter only the AD user or group name. The domain name is implied by the membership of the gateway in the specific AD that the gateway is joined to. If you don't specify any allowed or denied users or groups, any authenticated AD user can export the file share. Change the server-side encryption method for an existing file share The following procedure describes how to change the server-side encryption method for an existing NFS or SMB file share using the Storage Gateway console. To perform this action using the Storage Gateway API, see see UpdateNFSFileShare or UpdateSMBFileShare in the AWS Storage Gateway API Reference. Note Updating the encryption method applies the new method to existing objects stored in the Amazon S3 buckets after the update. If you configure your File Gateway to use SSE-KMS for encryption, you must manually add kms:Encrypt, kms:Decrypt, kms:ReEncrypt*, kms:GenerateDataKey, and kms:DescribeKey permissions to the IAM role associated with the file share. For more information, see Using Identity-Based Policies (IAM Policies) for Storage Gateway. Change file share encryption method API Version 2013-06-30 126 AWS Storage Gateway Amazon S3 File Gateway User Guide To change the server-side encryption method for an NFS or SMB file share 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares, and then choose the file share for which you want to change the 3. 4. encryption method. For Actions, choose Edit file share encryption. For Encryption, choose the type of encryption you want to use for files at rest in Amazon S3: • To use server-side encryption managed with Amazon S3 (SSE-S3), choose S3-Managed Keys (SSE-S3). For more information, see Using server-side encryption with Amazon S3 managed keys in the Amazon Simple Storage Service User Guide. • To use server-side encryption managed with AWS Key Management Service (SSE-KMS), choose KMS-Managed Keys (SSE-KMS). For Primary KMS key, choose an existing AWS KMS key, or choose Create a new KMS key to create a new KMS key in the AWS Key Management Service (AWS KMS) console. For more information about AWS KMS, see What is AWS Key Management Service? in the AWS Key Management Service Developer Guide. • To use dual-layer server-side encryption managed with AWS Key Management Service (DSSE-KMS), choose Dual-layer server-side encryption with AWS Key Management Service keys (DSSE-KMS). For Primary KMS key, choose an existing AWS KMS key, or choose Create a new KMS key to create a new KMS key in the AWS Key Management Service (AWS KMS) console. For more information about DSSE-KMS, see Using dual-layer server-side encryption with AWS KMS keys in the Amazon Simple Storage Service User Guide. Note There are additional charges for using DSSE-KMS and AWS KMS keys. For more information, see AWS KMS pricing. To specify an AWS KMS key with an alias that is not
storagegateway-s3file-ug-052
storagegateway-s3file-ug.pdf
52
Key Management Service (DSSE-KMS), choose Dual-layer server-side encryption with AWS Key Management Service keys (DSSE-KMS). For Primary KMS key, choose an existing AWS KMS key, or choose Create a new KMS key to create a new KMS key in the AWS Key Management Service (AWS KMS) console. For more information about DSSE-KMS, see Using dual-layer server-side encryption with AWS KMS keys in the Amazon Simple Storage Service User Guide. Note There are additional charges for using DSSE-KMS and AWS KMS keys. For more information, see AWS KMS pricing. To specify an AWS KMS key with an alias that is not listed or to use an AWS KMS key from a different AWS account, you must use the AWS Command Line Interface. Asymmetric KMS keys are not supported. For more information, see CreateSMBFileShare in the AWS Storage Gateway API Reference. Change file share encryption method API Version 2013-06-30 127 AWS Storage Gateway Amazon S3 File Gateway User Guide 5. Choose Save changes when finished. Edit settings for your NFS file share Use the following procedure to edit settings for an existing NFS file share after you create it. Note You cannot edit an existing file share to point to a new bucket or access point, or modify the VPC endpoint settings. You can configure those settings only when creating a new file share. To edit the file share settings 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares, and then choose the file share that you want to update. 3. 4. 5. For Actions, choose Edit file share settings. For File share name, enter a name for the file share. For Audit logs, select one of the following: • To create a new log group for this file share, choose Create a new log group. • To send health and resource notifications for this file share to an existing log group, choose Use and existing log group, and then choose the desired group from the list. • To turn off logging for this file share, choose Deactivate logging. For more information about audit logs, see Understanding S3 File Gateway audit logs. 6. For Non-gateway file cache refresh time, choose Set refresh interval, and then set the time in Minutes or Days to refresh the file share's cache using Time To Live (TTL). TTL is the length of time since the last refresh. After the TTL interval has elapsed, accessing a directory causes the File Gateway to refresh that directory's contents from the Amazon S3 bucket. Edit NFS file share settings API Version 2013-06-30 128 AWS Storage Gateway Amazon S3 File Gateway User Guide Note Setting this value shorter than 30 minutes can negatively impact gateway performance in situations where large numbers of Amazon S3 objects are frequently created or deleted. 7. For Upload events settling time, choose Set settling time, and then enter the settling time in seconds. Settling time controls the minimum delay between the most recent client write operation and generation of the ObjectUploaded log notification. Because clients can make many small writes to files in a short time, we recommend setting this parameter for as long as possible to avoid generating multiple notifications for the same file in rapid succession. For more information, see Getting file upload notification. 8. For Storage class for new objects, choose a storage class from the dropdown list. For more information about storage classes, see Using storage classes with a File Gateway. 9. Under Object metadata, do the following: a. b. Select Guess MIME type if you want to allow Storage Gateway to guess the media type for uploaded objects based on their file extensions. Select Gateway files accessible to S3 bucket owner, if you want the AWS account that owns the S3 bucket to have full ownership of files created by the gateway, including read, write, edit, and delete permissions. 10. Select Enable requester pays if you want the file requester rather than the bucket owner to pay the cost of the data request and download from the S3 bucket. 11. 12. For Access level, choose one of the following: • Root squash (default): Access for the remote superuser (root) is mapped to UID (65534) and GID (65534). • All squash: All user access is mapped to User ID (UID) (65534) and Group ID (GID) (65534). • No root squash: The remote superuser (root) receives access as root. 13. For Export as, select one of the following: • To allow clients to read and write files on the file share, select Read/Write. • To allow clients to read files but not write to the file share, select Read-only. Edit NFS file share settings API Version 2013-06-30 129 AWS Storage Gateway Amazon S3 File Gateway User Guide Note For file shares that are mounted on a Microsoft Windows client,
storagegateway-s3file-ug-053
storagegateway-s3file-ug.pdf
53
• All squash: All user access is mapped to User ID (UID) (65534) and Group ID (GID) (65534). • No root squash: The remote superuser (root) receives access as root. 13. For Export as, select one of the following: • To allow clients to read and write files on the file share, select Read/Write. • To allow clients to read files but not write to the file share, select Read-only. Edit NFS file share settings API Version 2013-06-30 129 AWS Storage Gateway Amazon S3 File Gateway User Guide Note For file shares that are mounted on a Microsoft Windows client, if you choose Read- only, you might see a message about an unexpected error keeping you from creating the folder. You can ignore this message. 14. When you are done editing settings, choose Save changes. Edit metadata defaults for your NFS file share If you don't set metadata values for your files or directories in your bucket, your S3 File Gateway sets default metadata values. These values include Unix permissions for files and folders. You can edit the metadata defaults on the Storage Gateway console. When your S3 File Gateway stores files and folders in Amazon S3, the Unix file permissions are stored in object metadata. When your S3 File Gateway discovers objects that weren't stored by the S3 File Gateway, these objects are assigned default Unix file permissions. You can find the default Unix permissions in the following table. Metadata Description Directory permissions File permissions User ID Group ID The Unix directory mode in the form "nnnn". For example, "0666" represents the access mode for all directories inside the file share. The default value is 0777. The Unix file mode in the form "nnnn". For example, "0666" represents the file mode inside the file share. The default value is 0666. The default owner ID for files in the file share. The default value is 65534. The default group ID for the file share. The default value is 65534. Edit NFS file share metadata defaults API Version 2013-06-30 130 AWS Storage Gateway To edit metadata defaults Amazon S3 File Gateway User Guide 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares, and then choose the file share that you want to update. 3. 4. For Actions, choose Edit file metadata defaults. In the Edit file metadata defaults dialog box, provide the metadata information and choose Save. Limit client access for your NFS file share We recommend editing the NFS client access settings to to define a list of specific client IP addresses or CIDR block ranges for NFS clients that are allowed to connect to your NFS file share. If you choose not to limit access, any client on your network can mount to your file share. To limit client access for your NFS file share 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares from the navigation pane on the left side of the console page, and then choose the File share ID of the NFS file share that you want to edit. 3. From the Actions drop down menu, choose Edit file share access settings. The Access object section displays a list of IP addresses and CIDR blocks that are currently allowed to connect to the NFS file share. If access is not currently limited, you will see an entry under Allowed clients for the 0.0.0.0/0 CIDR block, which indicates that all possible IPv4 addresses are allowed to connect. 4. Under Allowed clients, to the right of the 0.0.0.0/0 CIDR block, choose Remove. 5. Choose Add client, and then provide an IP address or address range in CIDR notation for the clients that you want to allow. 6. Repeat the previous step to add more IP addresses or ranges as necessary. If make a mistake or need to revoke access, you can choose Remove to the right of the IP address or range that you want to delete from the list. 7. Choose Save changes when finished. Limit NFS file share access API Version 2013-06-30 131 AWS Storage Gateway Amazon S3 File Gateway User Guide Refreshing Amazon S3 bucket object cache As your NFS or SMB client performs file system operations, your gateway maintains an inventory of the objects in the Amazon S3 object cache associated with your file share. Your gateway uses this cached inventory to reduce the latency and frequency of Amazon S3 requests. This operation does not import files into the S3 File Gateway cache storage. It only updates the cached inventory to reflect changes in the inventory of the objects in the Amazon S3 object cache. To refresh the S3 bucket object cache for your file share, select the method that best fits your use case from the following list, then complete the corresponding procedure below.
storagegateway-s3file-ug-054
storagegateway-s3file-ug.pdf
54
operations, your gateway maintains an inventory of the objects in the Amazon S3 object cache associated with your file share. Your gateway uses this cached inventory to reduce the latency and frequency of Amazon S3 requests. This operation does not import files into the S3 File Gateway cache storage. It only updates the cached inventory to reflect changes in the inventory of the objects in the Amazon S3 object cache. To refresh the S3 bucket object cache for your file share, select the method that best fits your use case from the following list, then complete the corresponding procedure below. Note Regardless of the method you use, listing a directory for the first time initializes it, which causes the gateway to list the directory's meta data contents from Amazon S3. The time required to initialize a directory is proportional to the number of entries in that directory. Topics • Configure an automated cache refresh schedule using the Storage Gateway console • Configure an automated cache refresh schedule using AWS Lambda with an Amazon CloudWatch rule • Perform a manual cache refresh using the Storage Gateway console • Perform a manual cache refresh using the Storage Gateway API Configure an automated cache refresh schedule using the Storage Gateway console The following procedure configures an automatic cache refresh schedule based on a Time To Live (TTL) value that you specify. Before you configure a TTL-based cache refresh schedule, consider the following: • TTL is measured as the length of time since the last cache refresh for a given directory. • TTL-based cache refresh occurs only when a given directory is accessed after the specified TTL period has expired. Refreshing Amazon S3 bucket object cache API Version 2013-06-30 132 AWS Storage Gateway Amazon S3 File Gateway User Guide • The refresh is non-recursive. It occurs only on the specific directories being accessed. • The refresh incurs Amazon S3 API costs only on directories that have not been synchronized since TTL expiration. • Directories are only synchronized if they are accessed by NFS or SMB activity. • Synchronization does not occur more frequently than the TTL period that you specify. • Configuring TTL-based cache refresh is recommended only if you frequently update the contents of your Amazon S3 bucket directly, outside of the workflow between the gateway and the Amazon S3 bucket. • NFS and SMB operations that access directories with expired TTLs will be blocked while the gateway refreshes the contents of the directory. Note Because cache refresh can block directory access operations, we recommend configuring the longest TTL period that is practical for your deployment. To configure an automated cache refresh schedule using the Storage Gateway console 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares. 3. Choose the file share for which you want to configure the refresh schedule. 4. 5. For Actions, choose Edit file share settings. For Automated cache refresh from S3 after, select the check box and set the time in days, hours, and minutes to refresh the file share's cache using Time To Live (TTL). TTL is the length of time since the last refresh after which access to the directory would cause the File Gateway to first refresh that directory's contents from the Amazon S3 bucket. 6. Choose Save changes. Configure an automated cache refresh schedule using the Storage Gateway console API Version 2013-06-30 133 AWS Storage Gateway Amazon S3 File Gateway User Guide Configure an automated cache refresh schedule using AWS Lambda with an Amazon CloudWatch rule To configure an automated cache refresh schedule using AWS Lambda with an Amazon CloudWatch rule 1. Identify the S3 bucket used by the S3 File Gateway. 2. Check that the Event section is blank. It populates automatically later. 3. Create an IAM role, and allow Trust Relationship for Lambda lambda.amazonaws.com. 4. Use the following policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "StorageGatewayPermissions", "Effect": "Allow", "Action": "storagegateway:RefreshCache", "Resource": "*" }, { "Sid": "CloudWatchLogsPermissions", "Effect": "Allow", "Action": [ "logs:CreateLogStream", "logs:CreateLogGroup", "logs:PutLogEvents" ], "Resource": "*" } ] } 5. Create a Lambda function from the Lambda console. 6. Use the following function for your Lambda task. import json import boto3 client = boto3.client('storagegateway') def lambda_handler(event, context): Configure an automated cache refresh schedule using AWS Lambda with an Amazon CloudWatch rule API Version 2013-06-30 134 AWS Storage Gateway print(event) Amazon S3 File Gateway User Guide response = client.refresh_cache( FileShareARN='arn:aws:storagegateway:ap-southeast-2:672406474878:share/ share-E51FBS9C' ) print(response) return 'Your FileShare cache has been refreshed' 7. For Execution role, choose the IAM role you created. 8. Optional: add a trigger for Amazon S3 and select the event ObjectCreated or ObjectRemoved. Note RefreshCache needs to complete one process before starting another. When you create or delete many objects in a bucket, performance might degrade. Therefore, we recommend against using S3 triggers. Instead, use the
storagegateway-s3file-ug-055
storagegateway-s3file-ug.pdf
55
Configure an automated cache refresh schedule using AWS Lambda with an Amazon CloudWatch rule API Version 2013-06-30 134 AWS Storage Gateway print(event) Amazon S3 File Gateway User Guide response = client.refresh_cache( FileShareARN='arn:aws:storagegateway:ap-southeast-2:672406474878:share/ share-E51FBS9C' ) print(response) return 'Your FileShare cache has been refreshed' 7. For Execution role, choose the IAM role you created. 8. Optional: add a trigger for Amazon S3 and select the event ObjectCreated or ObjectRemoved. Note RefreshCache needs to complete one process before starting another. When you create or delete many objects in a bucket, performance might degrade. Therefore, we recommend against using S3 triggers. Instead, use the Amazon CloudWatch rule described following. 9. Create a CloudWatch rule on the CloudWatch console and add a schedule. Generally, we recommend a fixed rate of 30 minutes. However, you can use 1–2 hours on large S3 bucket. 10. Add a new trigger for CloudWatch events and choose the rule you just created. 11. Save your Lambda configuration. Choose Test. 12. Choose S3 PUT and customize the test to your requirements. 13. The test should succeed. If not, modify the JSON to your requirements and retest. 14. Open the Amazon S3 console, and verify that the event you created and the Lambda function ARN are present. 15. Upload an object to your S3 bucket using the Amazon S3 console or the AWS CLI. The CloudWatch console generates a CloudWatch output similar to the following. { u'Records': [ {u'eventVersion': u'2.0', u'eventTime': u'2018-09-10T01:03:59.217Z', u'requestParameters': {u'sourceIPAddress': u'MY-IP-ADDRESS'}, u's3': {u'configurationId': u'95a51e1c-999f-485a-b994-9f830f84769f', u'object': {u'sequencer': u'00549CC2BF34D47AED', u'key': u'new/filename.jpeg'}, u'bucket': {u'arn': u'arn:aws:s3:::amzn-s3-demo-bucket', u'name': u'MY-GATEWAY-NAME', u'ownerIdentity': {u'principalId': u'A3OKNBZ72HVPP9'}}, u's3SchemaVersion': u'1.0'}, Configure an automated cache refresh schedule using AWS Lambda with an Amazon CloudWatch rule API Version 2013-06-30 135 AWS Storage Gateway Amazon S3 File Gateway User Guide u'responseElements': {u'x-amz-id-2': u'76tiugjhvjfyriugiug87t890nefevbck0iA3rPU9I/s4NY9uXwtRL75tCyxasgsdgfsq+IhvAg5M=', u'x-amz-request-id': u'651C2D4101D31593'}, u'awsRegion': u'MY-REGION', u'eventName': u'ObjectCreated:PUT', u'userIdentity': {u'principalId': u'AWS:AROAI5LQR5JHFHDFHDFHJ:MY-USERNAME'}, u'eventSource': u'aws:s3'} ] } The Lambda invocation gives you output similar to the following. { u'FileShareARN': u'arn:aws:storagegateway:REGION:ACCOUNT-ID:share/MY-SHARE- ID', 'ResponseMetadata': {'RetryAttempts': 0, 'HTTPStatusCode': 200, 'RequestId': '6663236a-b495-11e8-946a-bf44f413b71f', 'HTTPHeaders': {'x-amzn-requestid': '6663236a-b495-11e8-946a- bf44f413b71f', 'date': 'Mon, 10 Sep 2018 01:03:59 GMT', 'content-length': '90', 'content-type': 'application/x-amz- json-1.1' } } } Your NFS share mounted on your client will reflect this update. Note For caches updating large object creation or deletion in large buckets with millions of objects, updates may take hours. 16. Delete your object manually using the Amazon S3 console or AWS CLI. 17. View the NFS share mounted on your client. Verify that your object is gone (because your cache refreshed). 18. Check your CloudWatch logs to see the log of your deletion with the event ObjectRemoved:Delete. { u'account': u'MY-ACCOUNT-ID', u'region': u'MY-REGION', u'detail': {}, u'detail- type': u'Scheduled Event', u'source': u'aws.events', Configure an automated cache refresh schedule using AWS Lambda with an Amazon CloudWatch rule API Version 2013-06-30 136 AWS Storage Gateway Amazon S3 File Gateway User Guide u'version': u'0', u'time': u'2018-09-10T03:42:06Z', u'id': u'6468ef77-4db8-0200-82f0-04e16a8c2bdb', u'resources': [u'arn:aws:events:REGION:MY-ACCOUNT-ID:rule/FGw-RefreshCache-CW'] } Note For cron jobs or scheduled tasks, your CloudWatch log event is u'detail-type': u'Scheduled Event'. Perform a manual cache refresh using the Storage Gateway console To perform a manual cache refresh using the Storage Gateway console 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose File shares, and then choose the file share for which you want to perform the refresh. 3. For Actions, choose Refresh cache. The time that the refresh process takes depends on the number of objects cached on the gateway and the number of objects that were added to or removed from the S3 bucket. Perform a manual cache refresh using the Storage Gateway API The following procedure performs a manual cache refresh using the Storage Gateway API. Before you perform an API-based cache refresh, consider the following: • You can specify a recursive or non-recursive refresh. • A recursive refresh is more resource-intensive, and more expensive. • The refresh incurs Amazon S3 API costs only on directories that you pass as arguments in the request, and descendants of those directories if you specify a recursive refresh. • The refresh executes concurrently with other operations while the gateway is in use. • NFS and SMB operations generally do not become blocked during refreshes, unless a refresh is active for the directory being accessed by the operation. Perform a manual cache refresh using the Storage Gateway console API Version 2013-06-30 137 AWS Storage Gateway Amazon S3 File Gateway User Guide • The gateway is unable to determine whether current cache contents are stale, and uses its current contents for NFS and SMB operations regardless of freshness. • Because a cache refresh utilizes gateway virtual hardware resources, gateway performance might be negatively impacted while the refresh is in progress. • Performing API-based cache refresh is recommended only if you update the contents of your Amazon S3 bucket directly, outside of the workflow between the gateway and the Amazon S3 bucket. Note If you know
storagegateway-s3file-ug-056
storagegateway-s3file-ug.pdf
56
the Storage Gateway console API Version 2013-06-30 137 AWS Storage Gateway Amazon S3 File Gateway User Guide • The gateway is unable to determine whether current cache contents are stale, and uses its current contents for NFS and SMB operations regardless of freshness. • Because a cache refresh utilizes gateway virtual hardware resources, gateway performance might be negatively impacted while the refresh is in progress. • Performing API-based cache refresh is recommended only if you update the contents of your Amazon S3 bucket directly, outside of the workflow between the gateway and the Amazon S3 bucket. Note If you know the specific directories where you are updating Amazon S3 content outside of the gateway workflow, we recommend specifying these directories in your API-based refresh request to reduce Amazon S3 API costs and gateway performance impact. To perform a manual cache refresh using the Storage Gateway API • Send an HTTP POST request to invoke the RefreshCache operation with your desired parameters through the Storage Gateway API. For more information, see RefreshCache in the AWS Storage Gateway API Reference. Note Sending the RefreshCache request only initiates the cache refresh operation. When the cache refresh completes, it doesn't necessarily mean that the file refresh is complete. To determine that the file refresh operation is complete before you check for new files on the gateway file share, use the refresh-complete notification. To do this, you can subscribe to be notified through an Amazon CloudWatch event. For more information, see Getting notified about file operations. Using S3 Object Lock with Amazon S3 File Gateway Amazon S3 File Gateway supports accessing S3 buckets that have Amazon S3 Object Lock turned on. Amazon S3 Object Lock allows you to store objects using a "Write Once Read Many" (WORM) model. When you use Amazon S3 Object Lock, you can prevent an object in your S3 bucket from Using S3 Object Lock API Version 2013-06-30 138 AWS Storage Gateway Amazon S3 File Gateway User Guide being deleted or overwritten. Amazon S3 Object Lock works together with object versioning to protect your data. If you turn on Amazon S3 Object Lock, you can still modify the object. For example, it can be written to, deleted, or renamed through a file share on a S3 File Gateway. When you modify an object in this way, S3 File Gateway places a new version of the object without affecting the previous version (that is, the locked object). For example, If you use the S3 File Gateway NFS or SMB interface to delete a file and the corresponding S3 object is locked, the gateway places an S3 delete marker as the next version of the object, and leaves the original object version in place. Similarly, If a S3 File Gateway modifies the contents or metadata of a locked object, a new version of the object is uploaded with the changes, but the original locked version of the object remains unchanged. For more information about Amazon S3 Object Lock, see Locking objects using S3 Object Lock in the Amazon Simple Storage Service User Guide. Understanding file share status You can view the health of a file share at a glance by looking at its status. If the status indicates that the file share is functioning normally, no action is needed on your part. If the status indicates that there's a problem, you can investigate to determine whether action could be required. You can view a file share's status on the Storage Gateway console in the Status column. A file share that's functioning properly shows a status of AVAILABLE. This should be the status most of the time. The following table describes file share statuses, what they mean, and whether action might be required. Status Meaning AVAILABLE CREATING The file share is configured properly and is available to use. This is the standard status for a file share that's working properly. The file share is not yet fully created and is not ready for use. The CREATING status is transitional. No action is required. If the file share gets stuck in this status, it's probably because the gateway VM lost connection to AWS. File share status API Version 2013-06-30 139 AWS Storage Gateway Amazon S3 File Gateway User Guide Status Meaning UPDATING DELETING The file share configuration is currently updating. The UPDATING status is transitional. No action is required. If a file share gets stuck in this status, it's probably because the gateway VM lost connection to AWS. The file share is being deleted. The file share is not deleted until all data is uploaded to AWS. The DELETING status is transitional, and no action is required. FORCE_DELETING The file share is being deleted forcibly. The file share is deleted immediately and data is not uploaded to AWS. The FORCE_DELETING status is transitional, and no
storagegateway-s3file-ug-057
storagegateway-s3file-ug.pdf
57
File Gateway User Guide Status Meaning UPDATING DELETING The file share configuration is currently updating. The UPDATING status is transitional. No action is required. If a file share gets stuck in this status, it's probably because the gateway VM lost connection to AWS. The file share is being deleted. The file share is not deleted until all data is uploaded to AWS. The DELETING status is transitional, and no action is required. FORCE_DELETING The file share is being deleted forcibly. The file share is deleted immediately and data is not uploaded to AWS. The FORCE_DELETING status is transitional, and no action is required. UNAVAILABLE The file share is in an unhealthy state. Action is required. Some possible causes include role policy errors or mapping to an Amazon S3 bucket that doesn't exist. When the issue that caused the unhealthy state is resolved, the file share returns to a status of AVAILABLE. Understanding gateway status Each gateway in your AWS Storage Gateway deployment has an associated status that tells you at a glance what the health of the gateway is. Most of the time, the status indicates that the gateway is functioning normally and that no action is needed on your part. In some cases, the status indicates a problem that might or might not require action on your part. You can see the status for each gateway in your deployment on the Gateways page of the Storage Gateway console. The gateway status appears in the Status column next to the name of the gateway. A gateway that is functioning normally has a status of RUNNING. In the following table, you can find a description of each gateway status, and whether you should act based on the status. A gateway should have RUNNING status all or most of the time it's in use. Status RUNNING Gateway status Meaning The gateway is configured properly and is available to use. API Version 2013-06-30 140 AWS Storage Gateway Amazon S3 File Gateway User Guide Status OFFLINE Meaning Your gateway might be in an OFFLINE status for one or more of the following reasons: • The gateway can't reach the Storage Gateway service endpoints. • The gateway had an unexpected shutdown. • The gateway has an associated cache disk that is disconnected, has been modified, or has failed. Managing bandwidth for your Amazon S3 File Gateway You can limit the upload throughput from your gateway to AWS to control the amount of network bandwidth the gateway uses. By default, an activated gateway has no rate limits. You can configure a bandwidth-rate-limit schedule using the AWS Management Console, an AWS Software Development Kit (SDK), or the AWS Storage Gateway API (see UpdateBandwidthRateLimitSchedule in the AWS Storage Gateway API Reference.). Using a bandwidth rate limit schedule, you can configure limits to change automatically throughout the day or week. For more information, see View and edit the bandwidth-rate-limit schedule for your gateway using the Storage Gateway console. You can monitor your gateway's upload throughput using the CloudBytesUploaded metric on the Monitoring tab in the Storage Gateway console, or in Amazon CloudWatch. Note Bandwidth rate limits apply to Storage Gateway file uploads only. Other gateway operations are not affected. Bandwidth rate limiting works by balancing the throughput of all files being uploaded, averaged over every second. While it is possible for uploads to cross the bandwidth rate limit briefly for any given micro- or millisecond, this does not typically result in large spikes over longer periods of time. Configuring bandwidth rate limits and schedules is not currently supported for the Amazon FSx File Gateway type. Managing bandwidth API Version 2013-06-30 141 AWS Storage Gateway Topics Amazon S3 File Gateway User Guide • View and edit the bandwidth-rate-limit schedule for your gateway using the Storage Gateway console • Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for Java • Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for .NET • Updating Gateway Bandwidth-Rate Limits Using the AWS Tools for Windows PowerShell View and edit the bandwidth-rate-limit schedule for your gateway using the Storage Gateway console This section describes how to view and edit the bandwidth rate limit schedule for your gateway. To view and edit the bandwidth rate limit schedule 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. In the left navigation pane, choose Gateways, and then choose the gateway that you want to manage. 3. For Actions, choose Edit bandwidth rate limit schedule. The gateway's current bandwidth-rate-limit schedule is displayed on the Edit bandwidth rate limit schedule page. By default, a new gateway has no defined bandwidth-rate limits. 4. (Optional) Choose Add new bandwidth rate limit to add a new configurable interval to the schedule. For each interval you add, enter the following information: • Upload rate – Enter the upload rate limit, in megabits per second
storagegateway-s3file-ug-058
storagegateway-s3file-ug.pdf
58
1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. In the left navigation pane, choose Gateways, and then choose the gateway that you want to manage. 3. For Actions, choose Edit bandwidth rate limit schedule. The gateway's current bandwidth-rate-limit schedule is displayed on the Edit bandwidth rate limit schedule page. By default, a new gateway has no defined bandwidth-rate limits. 4. (Optional) Choose Add new bandwidth rate limit to add a new configurable interval to the schedule. For each interval you add, enter the following information: • Upload rate – Enter the upload rate limit, in megabits per second (Mbps). The minimum value is 100 Mbps. • Days of week – Select the day or days during each week when you want the interval to apply. You can apply the interval on weekdays (Monday through Friday), weekends (Saturday and Sunday), every day of the week, or on one specific day each week. To apply the bandwidth-rate limit uniformly and constantly on all days and at all times, choose No schedule. • Start time – Enter the start time for the bandwidth interval, using the HH:MM format and the time-zone offset from UTC for your gateway. Edit bandwidth-rate-limit schedule API Version 2013-06-30 142 AWS Storage Gateway Amazon S3 File Gateway User Guide Note Your bandwidth-rate-limit interval begins at the start of the minute that you specify here. • End time – Enter the end time for the bandwidth interval, using the HH:MM format and the time-zone offset from GMT for your gateway. Important The bandwidth-rate-limit interval ends at the end of the minute specified here. To schedule an interval that ends at the end of an hour, enter 59. To schedule consecutive continuous intervals, transitioning at the start of the hour, with no interruption between the intervals, enter 59 for the end minute of the first interval. Enter 00 for the start minute of the succeeding interval. 5. (Optional) Repeat the previous step as necessary until your bandwidth-rate-limit schedule is complete. If you need to delete an interval from your schedule, choose Remove. Important Bandwidth-rate-limit intervals cannot overlap. The start time of an interval must occur after the end time of a preceding interval, and before the start time of a following interval. 6. When finished, choose Save changes. Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for Java By updating bandwidth-rate limits programmatically, you can adjust these limits automatically over a period of time—for example, by using scheduled tasks. The following example demonstrates how to update a gateway's bandwidth-rate limits using the AWS SDK for Java. To use the example code, you should be familiar with running a Java console application. For more information, see Getting Started in the AWS SDK for Java Developer Guide. Using the AWS SDK for Java API Version 2013-06-30 143 AWS Storage Gateway Amazon S3 File Gateway User Guide Example : Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for Java The following Java code example updates a gateway's bandwidth-rate limits. To use this example code, you must provide the service endpoint, your gateway Amazon Resource Name (ARN), and the upload limit. For a list of AWS service endpoints that you can use with Storage Gateway, see AWS Storage Gateway Endpoints and Quotas in the AWS General Reference. import java.io.IOException; import com.amazonaws.AmazonClientException; import com.amazonaws.auth.PropertiesCredentials; import com.amazonaws.services.storagegateway.AWSStorageGatewayClient; import com.amazonaws.services.storagegateway.model. UpdateBandwidthRateLimitScheduleRequest; import com.amazonaws.services.storagegateway.model. UpdateBandwidthRateLimitScheduleReturn; import java.util.Arrays; import java.util.Collections; import java.util.List; public class UpdateBandwidthExample { public static AWSStorageGatewayClient sgClient; // The gatewayARN public static String gatewayARN = "*** provide gateway ARN ***"; // The endpoint static String serviceURL = "https://storagegateway.us-east-1.amazonaws.com"; // Rates static long uploadRate = 100 * 1024 * 1024; // Bits per second, minimum 100 Megabits/second public static void main(String[] args) throws IOException { // Create a Storage Gateway client sgClient = new AWSStorageGatewayClient(new PropertiesCredentials( UpdateBandwidthExample.class.getResourceAsStream("AwsCredentials.properties"))); sgClient.setEndpoint(serviceURL); Using the AWS SDK for Java API Version 2013-06-30 144 AWS Storage Gateway Amazon S3 File Gateway User Guide UpdateBandwidth(gatewayARN, uploadRate, null); // download rate not supported by S3 File Gateways } private static void UpdateBandwidth(String gatewayArn, long uploadRate, long downloadRate) { try { BandwidthRateLimit bandwidthRateLimit = new BandwidthRateLimit(downloadRate, uploadRate); BandwidthRateLimitInterval noScheduleInterval = new BandwidthRateLimitInterval() .withBandwidthRateLimit(bandwidthRateLimit) .withDaysOfWeek(Arrays.asList(1, 2, 3, 4, 5, 6, 0)) .withStartHourOfDay(0) .withStartMinuteOfHour(0) .withEndHourOfDay(23) .withEndMinuteOfHour(59); UpdateBandwidthRateLimitScheduleRequest updateBandwidthRateLimitScheduleRequest = new UpdateBandwidthRateLimitScheduleRequest() .withGatewayARN(gatewayArn) .with BandwidthRateLimitIntervals(Collections.singletonList(noScheduleInterval)); UpdateBandwidthRateLimitScheduleReturn updateBandwidthRateLimitScheuduleResponse = sgClient.UpdateBandwidthRateLimitSchedule(updateBandwidthRateLimitScheduleRequest); String returnGatewayARN = updateBandwidthRateLimitScheuduleResponse.getGatewayARN(); System.out.println("Updated the bandwidth rate limits of " + returnGatewayARN); System.out.println("Upload bandwidth limit = " + uploadRate + " bits per second"); } catch (AmazonClientException ex) { System.err.println("Error updating gateway bandwith.\n" + ex.toString()); } } Using the AWS SDK for Java API Version 2013-06-30 145 AWS Storage Gateway } Amazon S3 File Gateway User Guide Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for .NET By updating bandwidth-rate limits programmatically, you can adjust these limits automatically over a period of time—for example, by using scheduled tasks.
storagegateway-s3file-ug-059
storagegateway-s3file-ug.pdf
59
updateBandwidthRateLimitScheduleRequest = new UpdateBandwidthRateLimitScheduleRequest() .withGatewayARN(gatewayArn) .with BandwidthRateLimitIntervals(Collections.singletonList(noScheduleInterval)); UpdateBandwidthRateLimitScheduleReturn updateBandwidthRateLimitScheuduleResponse = sgClient.UpdateBandwidthRateLimitSchedule(updateBandwidthRateLimitScheduleRequest); String returnGatewayARN = updateBandwidthRateLimitScheuduleResponse.getGatewayARN(); System.out.println("Updated the bandwidth rate limits of " + returnGatewayARN); System.out.println("Upload bandwidth limit = " + uploadRate + " bits per second"); } catch (AmazonClientException ex) { System.err.println("Error updating gateway bandwith.\n" + ex.toString()); } } Using the AWS SDK for Java API Version 2013-06-30 145 AWS Storage Gateway } Amazon S3 File Gateway User Guide Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for .NET By updating bandwidth-rate limits programmatically, you can adjust these limits automatically over a period of time—for example, by using scheduled tasks. The following example demonstrates how to update a gateway's bandwidth-rate limits by using the AWS Software Development Kit (SDK) for .NET. To use the example code, you should be familiar with running a .NET console application. For more information, see Getting Started in the AWS SDK for .NET Developer Guide. Example : Updating Gateway Bandwidth-Rate Limits by Using the AWS SDK for .NET The following C# code example updates a gateway's bandwidth-rate limits. To use this example code, you must provide the service endpoint, your gateway Amazon Resource Name (ARN), and the upload limit. For a list of AWS service endpoints that you can use with Storage Gateway, see AWS Storage Gateway Endpoints and Quotas in the AWS General Reference. using System; using System.Collections.Generic; using System.Linq; using System.Text; using Amazon.StorageGateway; using Amazon.StorageGateway.Model; namespace AWSStorageGateway { class UpdateBandwidthExample { static AmazonStorageGatewayClient sgClient; static AmazonStorageGatewayConfig sgConfig; // The gatewayARN public static String gatewayARN = "*** provide gateway ARN ***"; // The endpoint static String serviceURL = "https://storagegateway.us- east-1.amazonaws.com"; // Rates static long uploadRate = 100 * 1024 * 1024; // Bits per second, minimum 100 Megabits/second Using the AWS SDK for .NET API Version 2013-06-30 146 AWS Storage Gateway Amazon S3 File Gateway User Guide public static void Main(string[] args) { // Create a Storage Gateway client sgConfig = new AmazonStorageGatewayConfig(); sgConfig.ServiceURL = serviceURL; sgClient = new AmazonStorageGatewayClient(sgConfig); UpdateBandwidth(gatewayARN, uploadRate, null); Console.WriteLine("\nTo continue, press Enter."); Console.Read(); } public static void UpdateBandwidth(string gatewayARN, long uploadRate, long downloadRate) { try { BandwidthRateLimit bandwidthRateLimit = new BandwidthRateLimit(downloadRate, uploadRate); BandwidthRateLimitInterval noScheduleInterval = new BandwidthRateLimitInterval() .withBandwidthRateLimit(bandwidthRateLimit) .withDaysOfWeek(Arrays.asList(1, 2, 3, 4, 5, 6, 0)) .withStartHourOfDay(0) .withStartMinuteOfHour(0) .withEndHourOfDay(23) .withEndMinuteOfHour(59); List <BandwidthRateLimitInterval> bandwidthRateLimitIntervals = new List<BandwidthRateLimitInterval>(); bandwidthRateLimitIntervals.Add(noScheduleInterval); UpdateBandwidthRateLimitScheduleRequest updateBandwidthRateLimitScheduleRequest = new UpdateBandwidthRateLimitScheduleRequest() .withGatewayARN(gatewayARN) .with BandwidthRateLimitIntervals(bandwidthRateLimitIntervals); UpdateBandwidthRateLimitScheduleReturn updateBandwidthRateLimitScheuduleResponse = sgClient.UpdateBandwidthRateLimitSchedule(updateBandwidthRateLimitScheduleRequest); String returnGatewayARN = updateBandwidthRateLimitScheuduleResponse.GatewayARN; Console.WriteLine("Updated the bandwidth rate limits of " + returnGatewayARN); Using the AWS SDK for .NET API Version 2013-06-30 147 AWS Storage Gateway Amazon S3 File Gateway User Guide Console.WriteLine("Upload bandwidth limit = " + uploadRate + " bits per second"); } catch (AmazonStorageGatewayException ex) { Console.WriteLine("Error updating gateway bandwith.\n" + ex.ToString()); } } } } Updating Gateway Bandwidth-Rate Limits Using the AWS Tools for Windows PowerShell By updating bandwidth-rate limits programmatically, you can adjust these limits automatically over a period of time—for example, by using scheduled tasks. The following example demonstrates how to update a gateway's bandwidth-rate limits using the AWS Tools for Windows PowerShell. To use the example code, you should be familiar with running a PowerShell script. For more information, see Getting Started in the AWS Tools for Windows PowerShell User Guide. Example : Updating Gateway Bandwidth-Rate Limits by Using the AWS Tools for Windows PowerShell The following PowerShell script example updates a gateway's bandwidth-rate limits. To use this example script, you must provide your gateway Amazon Resource Name (ARN) and the upload limit. <# .DESCRIPTION Update Gateway bandwidth limits schedule .NOTES PREREQUISITES: 1) AWS Tools for PowerShell from https://aws.amazon.com/powershell/ 2) Credentials and region stored in session using Initialize-AWSDefault. For more info, see https://docs.aws.amazon.com/powershell/latest/userguide/ specifying-your-aws-credentials.html .EXAMPLE Using the AWS Tools for Windows PowerShell API Version 2013-06-30 148 AWS Storage Gateway Amazon S3 File Gateway User Guide powershell.exe .\SG_UpdateBandwidth.ps1 #> $UploadBandwidthRate = 100 * 1024 * 1024 $gatewayARN = "*** provide gateway ARN ***" $bandwidthRateLimitInterval = New-Object Amazon.StorageGateway.Model.BandwidthRateLimitInterval $bandwidthRateLimitInterval.StartHourOfDay = 0 $bandwidthRateLimitInterval.StartMinuteOfHour = 0 $bandwidthRateLimitInterval.EndHourOfDay = 23 $bandwidthRateLimitInterval.EndMinuteOfHour = 59 $bandwidthRateLimitInterval.DaysOfWeek = 0,1,2,3,4,5,6 $bandwidthRateLimitInterval.AverageUploadRateLimitInBitsPerSec = $UploadBandwidthRate #Update Bandwidth Rate Limits Update-SGBandwidthRateLimitSchedule -GatewayARN $gatewayARN ` -BandwidthRateLimitInterval @($bandwidthRateLimitInterval) $schedule = Get-SGBandwidthRateLimitSchedule -GatewayARN $gatewayARN Write-Output("`nGateway: " + $gatewayARN); Write-Output("`nNew bandwidth throttle schedule: " + $schedule.BandwidthRateLimitIntervals.AverageUploadRateLimitInBitsPerSec) Using the AWS Tools for Windows PowerShell API Version 2013-06-30 149 AWS Storage Gateway Amazon S3 File Gateway User Guide Monitoring Storage Gateway The topics in this section describe how to monitor a gateway using Amazon CloudWatch, including monitoring cache storage and other resources associated with the gateway. You use the Storage Gateway console to view metrics and alarms for your gateway. For example, you can view the number of bytes used in read and write operations, the time spent in read and write operations, and the time taken to retrieve data from the AWS Cloud. With metrics, you can track the health of your gateway and set up alarms to notify you when
storagegateway-s3file-ug-060
storagegateway-s3file-ug.pdf
60
Amazon S3 File Gateway User Guide Monitoring Storage Gateway The topics in this section describe how to monitor a gateway using Amazon CloudWatch, including monitoring cache storage and other resources associated with the gateway. You use the Storage Gateway console to view metrics and alarms for your gateway. For example, you can view the number of bytes used in read and write operations, the time spent in read and write operations, and the time taken to retrieve data from the AWS Cloud. With metrics, you can track the health of your gateway and set up alarms to notify you when one or more metrics fall outside a defined threshold. Storage Gateway provides CloudWatch metrics at no additional charge. Storage Gateway metrics are recorded for a period of two weeks. By using these metrics, you can access historical information and get a better perspective on how your gateways are performing. Storage Gateway also provides CloudWatch alarms, except high-resolution alarms, at no additional charge. For more information about CloudWatch pricing, see Amazon CloudWatch pricing. For more information about CloudWatch, see the Amazon CloudWatch User Guide. Topics • Understanding CloudWatch alarms - Learn basic information about CloudWatch alarms, including alarm states and recommended configurations. • Create recommended CloudWatch alarms - Learn how you can quickly and automatically configure all recommended CloudWatch alarms as part of the initial File Gateway setup process. • Create a custom CloudWatch alarm - Learn how you can create a custom CloudWatch alarm to monitor a specific metric using specific evaluation criteria to trigger alarm states and send notifications. • Monitoring your S3 File Gateway - Learn how to view CloudWatch logs and audit logs, and find information about the specific gateway and file sharefile system metrics that are reported by your gateway. Understanding CloudWatch alarms CloudWatch alarms monitor information about your gateway based on metrics and expressions. You can add CloudWatch alarms for your gateway and view their statuses in the Storage Gateway console. For more information about the metrics that are used to monitor S3 File Gateway, see Understanding CloudWatch alarms API Version 2013-06-30 150 AWS Storage Gateway Amazon S3 File Gateway User Guide Understanding gateway metrics and Understanding file share metrics. For each alarm, you specify conditions that will activate its ALARM state. Alarm status indicators in the Storage Gateway console turn red when in the ALARM state, making it easier for you to monitor status proactively. You can configure alarms to invoke actions automatically based on sustained changes in state. For more information about CloudWatch alarms, see Using Amazon CloudWatch alarms in the Amazon CloudWatch User Guide. Note If you don't have permission to view CloudWatch, you can't view the alarms. For each activated gateway, we recommend that you create the following CloudWatch alarms: • High IO wait: IoWaitpercent >= 20 for 3 datapoints in 15 minutes • Cache percent dirty: CachePercentDirty > 80 for 4 datapoints within 20 minutes • Files failing upload: FilesFailingUpload >= 1 for 1 datapoint within 5 minutes • File shares unavailable: FileSharesUnavailable >= 1 for 1 datapoint within 5 minutes • Health notifications: HealthNotifications >= 1 for 1 datapoints within 5 minutes. When configuring this alarm, set Missing data treatment to notBreaching. Note You can set a health notification alarm only if the gateway had a previous health notification in CloudWatch. For gateways on VMware host platforms that are part of a VMware High Availability cluster, we also recommend this additional CloudWatch alarm: • Availability notifications: AvailabilityNotifications >= 1 for 1 datapoints within 5 minutes. When configuring this alarm, set Missing data treatment to notBreaching. The following table describes CloudWatch alarm states. Understanding CloudWatch alarms API Version 2013-06-30 151 AWS Storage Gateway Amazon S3 File Gateway User Guide State OK Alarm Insufficient data None Unavailable Description The metric or expression is within the defined threshold. The metric or expression is outside of the defined threshold. The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state. No alarms are created for the gateway. To create a new alarm, see Create a custom CloudWatch alarm for your gateway. The state of the alarm is unknown. Choose Unavailable to view error information in the Monitoring tab. Creating recommended CloudWatch alarms for your gateway When you create a new gateway using the Storage Gateway console, you can choose to create all recommended CloudWatch alarms automatically as part of the initial setup process. For more information, see Configure your Amazon S3 File Gateway. If you want to add or update recommended CloudWatch alarms for an existing gateway after you have already completed the first-time setup, use the following procedure. To add or update recommended CloudWatch alarms for an existing gateway Note This feature requires CloudWatch policy permissions, which are not
storagegateway-s3file-ug-061
storagegateway-s3file-ug.pdf
61
to view error information in the Monitoring tab. Creating recommended CloudWatch alarms for your gateway When you create a new gateway using the Storage Gateway console, you can choose to create all recommended CloudWatch alarms automatically as part of the initial setup process. For more information, see Configure your Amazon S3 File Gateway. If you want to add or update recommended CloudWatch alarms for an existing gateway after you have already completed the first-time setup, use the following procedure. To add or update recommended CloudWatch alarms for an existing gateway Note This feature requires CloudWatch policy permissions, which are not automatically granted as part of the preconfigured Storage Gateway full access policy. Make sure your security policy grants the following permissions before you attempt to create recommended CloudWatch alarms: • cloudwatch:PutMetricAlarm - create alarms Create recommended CloudWatch alarms API Version 2013-06-30 152 AWS Storage Gateway Amazon S3 File Gateway User Guide • cloudwatch:DisableAlarmActions - turn alarm actions off • cloudwatch:EnableAlarmActions - turn alarm actions on • cloudwatch:DeleteAlarms - delete alarms 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home/. 2. In the navigation pane on the left side of the page, choose Gateways, and then choose the gateway for which you want to create recommended CloudWatch alarms. 3. On the Details page for the gateway, choose the Monitoring tab. 4. Under Alarms, choose Create recommended alarms. The recommended alarms are created automatically. The Alarms section lists all CloudWatch alarms for a specific gateway. From here, you can select and delete one or more alarms, turn alarm actions on or off, and create new alarms. Create a custom CloudWatch alarm for your gateway CloudWatch uses Amazon Simple Notification Service (Amazon SNS) to send alarm notifications when an alarm changes state. An alarm watches a single metric over a time period that you specify, and performs one or more actions based on the value of the metric relative to a given threshold over a number of time periods. The action is a notification that's sent to an Amazon SNS topic. You can create an Amazon SNS topic when you create a CloudWatch alarm. For more information about Amazon SNS, see What is Amazon SNS? in the Amazon Simple Notification Service Developer Guide. To create a CloudWatch alarm in the Storage Gateway console 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home/. 2. In the navigation pane, choose Gateways, then choose the gateway for which you want to create an alarm. 3. On the gateway details page, choose the Monitoring tab. 4. Under Alarms, choose Create alarm to open the CloudWatch console. 5. Use the CloudWatch console to create the type of alarm that you want. You can create the following types of alarms: Create a custom CloudWatch alarm API Version 2013-06-30 153 AWS Storage Gateway Amazon S3 File Gateway User Guide • Static threshold alarm: An alarm based on a set threshold for a chosen metric. The alarm enter the ALARM state when the metric breaches the threshold for a specified number of evaluation periods. To create a static threshold alarm, see Creating a CloudWatch alarm based on a static threshold in the Amazon CloudWatch User Guide. • Anomaly detection alarm: Anomaly detection mines past metric data and creates a model of expected values. You set a value for the anomaly detection threshold, and CloudWatch uses this threshold with the model to determine the "normal" range of values for the metric. A higher value for the threshold produces a thicker band of "normal" values. You can choose to activate the alarm only when the metric value is above the band of expected values, only when it's below the band, or when it's above or below the band. To create an anomaly detection alarm, see Creating a CloudWatch alarm based on anomaly detection in the Amazon CloudWatch User Guide. • Metric math expression alarm: An alarm based one or more metrics used in a math expression. You specify the expression, threshold, and evaluation periods. To create a metric math expression alarm, see Creating a CloudWatch alarm based on a metric math expression in the Amazon CloudWatch User Guide. • Composite alarm: An alarm that determines its alarm state by watching the alarm states of other alarms. A composite alarm can help you reduce alarm noise. To create a composite alarm, see Creating a composite alarm in the Amazon CloudWatch User Guide. 6. After you create the alarm in the CloudWatch console, return to the Storage Gateway console. You can view the alarm by doing one of the following: • In the navigation pane, choose Gateways, then choose the gateway for which you want to view alarms. On the Details tab, under Alarms, choose CloudWatch Alarms. • In the navigation pane, choose Gateways, choose the gateway for which you want to view alarms, then
storagegateway-s3file-ug-062
storagegateway-s3file-ug.pdf
62
of other alarms. A composite alarm can help you reduce alarm noise. To create a composite alarm, see Creating a composite alarm in the Amazon CloudWatch User Guide. 6. After you create the alarm in the CloudWatch console, return to the Storage Gateway console. You can view the alarm by doing one of the following: • In the navigation pane, choose Gateways, then choose the gateway for which you want to view alarms. On the Details tab, under Alarms, choose CloudWatch Alarms. • In the navigation pane, choose Gateways, choose the gateway for which you want to view alarms, then choose the Monitoring tab. The Alarms section lists all of the CloudWatch alarms for a specific gateway. From here, you can select and delete one or more alarms, turn alarm actions on or off, and create new alarms. Create a custom CloudWatch alarm API Version 2013-06-30 154 AWS Storage Gateway Amazon S3 File Gateway User Guide • In the navigation pane, choose Gateways, then choose the alarm state of the gateway for which you want to view alarms. For information about how to edit or delete an alarm, see Editing or deleting a CloudWatch alarm. Note When you delete a gateway using the Storage Gateway console, all CloudWatch alarms associated with the gateway are also automatically deleted. Monitoring your S3 File Gateway You can monitor your S3 File Gateway and associated resources in AWS Storage Gateway by using Amazon CloudWatch metrics and audit logs. You can also use CloudWatch Events to get notified when your file operations are done. Topics • Getting S3 File Gateway health logs with CloudWatch log groups • Using Amazon CloudWatch metrics • Getting notified about file operations • Understanding gateway metrics • Understanding file share metrics • Understanding S3 File Gateway audit logs Getting S3 File Gateway health logs with CloudWatch log groups You can use Amazon CloudWatch Logs to get information about the health of your S3 File Gateway and related resources. You can use the logs to monitor your gateway for errors that it encounters. In addition, you can use Amazon CloudWatch subscription filters to automate processing of the log information in real time. For more information, see Real-time Processing of Log Data with Subscriptions in the Amazon CloudWatch User Guide. For example, you can configure a CloudWatch log group to monitor your gateway and get notified when your S3 File Gateway fails to upload files to an Amazon S3 bucket. You can configure the group either when you are activating the gateway or after your gateway is activated and up and Monitoring your S3 File Gateway API Version 2013-06-30 155 AWS Storage Gateway Amazon S3 File Gateway User Guide running. For information about how to configure a CloudWatch log group when activating a gateway, see Configure your Amazon S3 File Gateway. For general information about CloudWatch log groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch User Guide. The following is an example of an error reported by an S3 File Gateway. { "severity": "ERROR", "bucket": "bucket-smb-share2", "roleArn": "arn:aws:iam::123456789012:role/amzn-s3-demo-bucket", "source": "share-E1A2B34C", "type": "InaccessibleStorageClass", "operation": "S3Upload", "key": "myFolder/myFile.text", "gateway": "sgw-B1D123D4", "timestamp": "1565740862516" } This error means that the S3 File Gateway is unable to upload the object myFolder/myFile.text to Amazon S3 because it has transitioned out of the Amazon S3 Standard storage class to either the S3 Glacier Flexible Retrieval or the S3 Glacier Deep Archive storage class. In the preceding gateway health log, these items specify the given information: • source: share-E1A2B34C indicates the file share that encountered this error. • "type": "InaccessibleStorageClass" indicates the type of error that occurred. In this case, this error was encountered when the gateway was trying to upload the specified object to Amazon S3 or read from Amazon S3. However, in this case, the object has transitioned to Amazon S3 Glacier. The value of "type" can be any error that the S3 File Gateway encounters. For a list of possible errors, see Troubleshooting: File Gateway issues. • "operation": "S3Upload" indicates that this error occurred when the gateway was trying to upload this object to S3. • "key": "myFolder/myFile.text" indicates the object that caused the failure. • gateway": "sgw-B1D123D4 indicates the S3 File Gateway that encountered this error. • "timestamp": "1565740862516" indicates the time that the error occurred. For information about how to troubleshoot the errors that may be reported by S3 File Gateway, see Troubleshooting: File Gateway issues. Getting S3 File Gateway health logs API Version 2013-06-30 156 AWS Storage Gateway Amazon S3 File Gateway User Guide Configuring a CloudWatch log group after your gateway is activated The following procedure shows you how to configure a CloudWatch Log Group after your gateway is activated. To configure a CloudWatch log group to work with your S3 File Gateway 1. Sign in to the
storagegateway-s3file-ug-063
storagegateway-s3file-ug.pdf
63
Gateway that encountered this error. • "timestamp": "1565740862516" indicates the time that the error occurred. For information about how to troubleshoot the errors that may be reported by S3 File Gateway, see Troubleshooting: File Gateway issues. Getting S3 File Gateway health logs API Version 2013-06-30 156 AWS Storage Gateway Amazon S3 File Gateway User Guide Configuring a CloudWatch log group after your gateway is activated The following procedure shows you how to configure a CloudWatch Log Group after your gateway is activated. To configure a CloudWatch log group to work with your S3 File Gateway 1. Sign in to the AWS Management Console and open the Storage Gateway console at https:// console.aws.amazon.com/storagegateway/home. 2. 3. In the navigation pane, choose Gateways, and then choose the gateway that you want to configure the CloudWatch log group for. For Actions, choose Edit gateway information. Or, on the Details tab, under Health logs and Not Enabled, choose Configure log group to open the Edit CustomerGatewayName dialog box. 4. For Gateway health log group, choose one of the following: • Disable logging if you don't want to monitor your gateway using CloudWatch log groups. • Create a new log group to create a new CloudWatch log group. • Use an existing log group to use a CloudWatch log group that already exists. Choose a log group from the Existing log group list. 5. Choose Save changes. 6. To see the health logs for your gateway, do the following: 1. In the navigation pane, choose Gateways, and then choose the gateway that you configured the CloudWatch log group for. 2. Choose the Details tab, and under Health logs, choose CloudWatch Logs. The Log group details page opens in the CloudWatch console. Using Amazon CloudWatch metrics You can get monitoring data for your S3 File Gateway by using either the AWS Management Console or the CloudWatch API. The console displays a series of graphs based on the raw data from the CloudWatch API. The CloudWatch API can also be used through one of the AWS SDKs or Amazon CloudWatch API tools. Depending on your needs, you might prefer to use either the graphs displayed in the console or retrieved from the API. Using Amazon CloudWatch metrics API Version 2013-06-30 157 AWS Storage Gateway Amazon S3 File Gateway User Guide Regardless of which method you use to work with metrics, you must specify the following information: • The metric dimension to work with. A dimension is a name-value pair that helps you to uniquely identify a metric. The dimensions for Storage Gateway are GatewayId and GatewayName. In the CloudWatch console, you can use the Gateway Metrics view to select gateway-specific dimensions. For more information about dimensions, see Dimensions in the Amazon CloudWatch User Guide. • The metric name, such as ReadBytes. The following table summarizes the types of Storage Gateway metric data that are available to you. Amazon CloudWatch namespace Dimension Description AWS/Stora GatewayId , geGateway GatewayName These dimensions filter for metric data that describes aspects of the gateway. You can identify a S3 File Gateway to work with by specifying both the GatewayId and the GatewayName dimensions. Throughput and latency data of a gateway are based on all the file shares in the gateway. Data is available automatically in 5-minute periods at no charge. Working with gateway and file metrics is similar to working with other service metrics. You can find a discussion of some of the most common metrics tasks in the CloudWatch documentation listed following: • Viewing available metrics • Getting statistics for a metric • Creating CloudWatch alarms Using Amazon CloudWatch metrics API Version 2013-06-30 158 AWS Storage Gateway Amazon S3 File Gateway User Guide Getting notified about file operations Storage Gateway can initiate the following CloudWatch Events when your file operations are done: • You can get notified when the gateway finishes the asynchronous uploading of your files from the file share to Amazon S3. Use the NotificationPolicy parameter to request a file upload notification. This sends a notification for each completed file upload to Amazon S3. For more information, see Getting file upload notification. • You can get notified when the gateway finishes the asynchronous uploading of your working file set from the file share to Amazon S3. Use the NotifyWhenUploaded API operation to request a working file set upload notification. This sends a notification when all files in the working file set have been uploaded to Amazon S3. For more information, see Getting working file set upload notification. • You can get notified when the gateway finishes refreshing the cache for your S3 bucket. When you invoke the RefreshCache operation through the Storage Gateway console or API, subscribe to the notification when the operation is complete. For more information, see Getting refresh cache notification. When the file operation you requested is
storagegateway-s3file-ug-064
storagegateway-s3file-ug.pdf
64
the file share to Amazon S3. Use the NotifyWhenUploaded API operation to request a working file set upload notification. This sends a notification when all files in the working file set have been uploaded to Amazon S3. For more information, see Getting working file set upload notification. • You can get notified when the gateway finishes refreshing the cache for your S3 bucket. When you invoke the RefreshCache operation through the Storage Gateway console or API, subscribe to the notification when the operation is complete. For more information, see Getting refresh cache notification. When the file operation you requested is done, Storage Gateway sends you a notification through CloudWatch Events. You can configure CloudWatch Events to send the notification through event targets such as Amazon SNS, Amazon SQS, or an AWS Lambda function. For example, you can configure an Amazon SNS target to send the notification to Amazon SNS consumers such as an email or text message. For information about CloudWatch Events, see What is CloudWatch Events? To set up CloudWatch Events notification 1. Create a target, such as an Amazon SNS topic or Lambda function, to invoke when the event you requested in Storage Gateway occurs. 2. Create a rule in the CloudWatch Events console to invoke targets based on an event in Storage Gateway. 3. In the rule, create an event pattern for the event type. The notification sent when the event matches this rule pattern. 4. Select the target and configure the settings. Getting notified about file operations API Version 2013-06-30 159 AWS Storage Gateway Amazon S3 File Gateway User Guide The following example shows a rule that initiates the specified event type in the specified gateway and in the specified AWS Region. For example, you could specify the Storage Gateway File Upload Event as the event type. { "source":[ "aws.storagegateway" ], "resources":[ "arn:aws:storagegateway:AWS Region:account-id :gateway/gateway-id" ], "detail-type":[ "Event type" ] } For information about how to use CloudWatch Events rules, see Creating a CloudWatch Events rule that triggers on an event in the Amazon CloudWatch Events User Guide. Getting file upload notification There are two use cases in which you can use file upload notification: • For automating in-cloud processing of files that are uploaded, you can call the NotificationPolicy parameter and get back a notification ID. The notification that occurs when the files have been uploaded has the same notification ID as the one that was returned by the API. If you map this notification ID to track the list of files that you are uploading, you can initiate processing of the file that is uploaded in AWS when the event with the same ID is generated. • For content distribution use cases, you can have two S3 File Gateways that map to the same Amazon S3 bucket. The file share client for Gateway1 could upload new files to Amazon S3, and the files are read by file share clients on Gateway2. The files upload to Amazon S3, but they are not visible to Gateway2 because it uses a locally cached version of files in Amazon S3. To make the files visible in Gateway2, you can use the NotificationPolicy parameter to request file upload notification from Gateway1 to notify you when the upload file is done. You can then use CloudWatch Events to automatically issue a RefreshCache request for the file share on Gateway2. When the RefreshCache request is complete, the new file is visible in Gateway2. Getting notified about file operations API Version 2013-06-30 160 AWS Storage Gateway Amazon S3 File Gateway User Guide Example Example—File upload notification The following example shows a file upload notification that is sent to you through CloudWatch when the event matches the rule you created. This notification is in JSON format. You can configure this notification to be delivered to the target as a text message. The detail-type is Storage Gateway Object Upload Event. { "version": "0", "id": "2649b160-d59d-c97f-3f64-8aaa9ea6aed3", "detail-type": "Storage Gateway Object Upload Event", "source": "aws.storagegateway", "account": "123456789012", "time": "2020-11-05T12:34:56Z", "region": "us-east-1", "resources": [ "arn:aws:storagegateway:us-east-1:123456789011:share/share-F123D451", "arn:aws:storagegateway:us-east-1:123456789011:gateway/sgw-712345DA", "arn:aws:s3:::do-not-delete-bucket" ], "detail": { "object-size": 1024, "modification-time": "2020-01-05T12:30:00Z", "object-key": "my-file.txt", "event-type": "object-upload-complete", "prefix": "prefix/", "bucket-name": "amzn-s3-demo-bucket", } } Field names version id detail-type source Description The current version of the IAM policy. The ID that identifies the IAM policy. A description of the event that initiated the notification that was sent. The AWS service that is the source of the request and notification. Getting notified about file operations API Version 2013-06-30 161 AWS Storage Gateway Field names account time region resources object-size Amazon S3 File Gateway User Guide Description The ID of the AWS account where the request and notification were generated from. When the request to upload files to Amazon S3 was made. The AWS Region where the request and notification was sent from. The Storage Gateway resources that the
storagegateway-s3file-ug-065
storagegateway-s3file-ug.pdf
65
policy. The ID that identifies the IAM policy. A description of the event that initiated the notification that was sent. The AWS service that is the source of the request and notification. Getting notified about file operations API Version 2013-06-30 161 AWS Storage Gateway Field names account time region resources object-size Amazon S3 File Gateway User Guide Description The ID of the AWS account where the request and notification were generated from. When the request to upload files to Amazon S3 was made. The AWS Region where the request and notification was sent from. The Storage Gateway resources that the policy applies to. The size of the object in bytes. modification-time The time the client modified the file. object-key event-type prefix bucket-name The path to the file. The CloudWatch Events that initiated the notification. The prefix name of the S3 bucket. The name of the S3 bucket. Getting working file set upload notification There are two use cases in which you can use the working file set upload notification: • For automating in-cloud processing of files that are uploaded, you can call the NotifyWhenUploaded API and get back a notification ID. The notification that occurs when the working set of files have been uploaded has the same notification ID as the one that was returned by the API. If you map this notification ID to track the list of files that you are uploading, you can initiate processing of the working set of files that are uploaded in AWS when the event with the same ID is generated. • For content distribution use cases, you can have two S3 File Gateways that map to the same Amazon S3 bucket. The file share client for Gateway1 can upload new files to Amazon S3, and Getting notified about file operations API Version 2013-06-30 162 AWS Storage Gateway Amazon S3 File Gateway User Guide the files are read by file share clients on Gateway2. The files upload to Amazon S3, but they aren't visible to Gateway2 because it uses a locally cached version of files in S3. To make the files visible in Gateway2, use the NotifyWhenUploaded API operation to request file upload notification from Gateway1, to notify you when the upload of the working set of files is done. You can then use the CloudWatch Events to automatically issue a RefreshCache request for the file share on Gateway2. When the RefreshCache request is complete, the new files are visible in Gateway2. This operation does not import files into the gateway cache storage. It only updates the cached inventory to reflect changes in the inventory of the objects in the S3 bucket. Example Example—Working file set upload notification The following example shows a working file set upload notification that is sent to you through CloudWatch when the event matches the rule you created. This notification is in JSON format. You can configure this notification to be delivered to the target as a text message. The detail-type is Storage Gateway File Upload Event. { "version": "2012-10-17", "id": "2649b160-d59d-c97f-3f64-8aaa9ea6aed3", "detail-type": "Storage Gateway File Upload Event", "source": "aws.storagegateway", "account": "123456789012", "time": "2017-11-06T21:34:42Z", "region": "us-east-2", "resources": [ "arn:aws:storagegateway:us-east-2:123456789011:share/share-F123D451", "arn:aws:storagegateway:us-east-2:123456789011:gateway/sgw-712345DA" ], "detail": { "event-type": "upload-complete", "notification-id": "11b3106b-a18a-4890-9d47-a1a755ef5e47", "request-received": "2018-02-06T21:34:42Z", "completed": "2018-02-06T21:34:53Z" } } Field names version Description The current version of the IAM policy. Getting notified about file operations API Version 2013-06-30 163 AWS Storage Gateway Field names id detail-type source account time region resources event-type notification-id request-received completed Amazon S3 File Gateway User Guide Description The ID that identifies the IAM policy. A description of the event that initiated the notification that was sent. The AWS service that is the source of the request and notification. The ID of the AWS account where the request and notification were generated from. When the request to upload files to Amazon S3 was made. The AWS Region where the request and notification was sent from. The Storage Gateway resources that the policy applies to. The CloudWatch Events that initiated the notification. The randomly generated ID of the notification that was sent. This ID is in UUID format. This is the notification ID that is returned when NotifyWhenUploaded is called. When the gateway received the NotifyWhe nUploaded request. When all the files in the working-set were uploaded to Amazon S3. Getting notified about file operations API Version 2013-06-30 164 AWS Storage Gateway Amazon S3 File Gateway User Guide Getting refresh cache notification For refresh cache notification use case, you can have two S3 File Gateways that map to the same Amazon S3 bucket and the NFS client for Gateway1 uploads new files to the S3 bucket. The files upload to Amazon S3, but they don't appear in Gateway2 until you refresh the cache. This is because Gateway2 uses a locally cached version of the files in Amazon S3. You might want
storagegateway-s3file-ug-066
storagegateway-s3file-ug.pdf
66
files in the working-set were uploaded to Amazon S3. Getting notified about file operations API Version 2013-06-30 164 AWS Storage Gateway Amazon S3 File Gateway User Guide Getting refresh cache notification For refresh cache notification use case, you can have two S3 File Gateways that map to the same Amazon S3 bucket and the NFS client for Gateway1 uploads new files to the S3 bucket. The files upload to Amazon S3, but they don't appear in Gateway2 until you refresh the cache. This is because Gateway2 uses a locally cached version of the files in Amazon S3. You might want to do something with the files in Gateway2 when the refresh cache is done. Large files could take a while to show up in Gateway2, so you might want to be notified when the cache refresh is done. You can request refresh cache notification from Gateway2 to notify you when all the files are visible in Gateway2. Example Example—Refresh cache notification The following example shows a refresh cache notification that is sent to you through CloudWatch when the event matches the rule you created. This notification is in JSON format. You can configure this notification to be delivered to the target as a text message. The detail-type is Storage Gateway Refresh Cache Event. { "version": "2012-10-17", "id": "2649b160-d59d-c97f-3f64-8aaa9ea6aed3", "detail-type": "Storage Gateway Refresh Cache Event", "source": "aws.storagegateway", "account": "209870788375", "time": "2017-11-06T21:34:42Z", "region": "us-east-2", "resources": [ "arn:aws:storagegateway:us-east-2:123456789011:share/share-F123D451", "arn:aws:storagegateway:us-east-2:123456789011:gateway/sgw-712345DA" ], "detail": { "event-type": "refresh-complete", "notification-id": "1c14106b-a18a-4890-9d47-a1a755ef5e47", "started": "2018-02-06T21:34:42Z", "completed": "2018-02-06T21:34:53Z", "folderList": [ "/" ] } } Getting notified about file operations API Version 2013-06-30 165 AWS Storage Gateway Amazon S3 File Gateway User Guide Field names version id detail-type source account time region resources event-type notification-id started completed Description The current version of the IAM policy. The ID that identifies the IAM policy. A description of the type of the event that initiated the notification that was sent. The AWS service that is the source of the request and notification. The ID of the AWS account where the request and notification were generated from. When the request to refresh the files in working-set was made. The AWS Region where the request and notification was sent from. The Storage Gateway resources that the policy applies to. The CloudWatch Events that initiated the notification. The randomly generated ID of the notification that was sent. This ID is in UUID format. This is the notification ID that is returned when you call RefreshCache . when the gateway received the RefreshCa che request and the refresh was started. When the refresh of the working-set was completed. Getting notified about file operations API Version 2013-06-30 166 AWS Storage Gateway Field names folderList Amazon S3 File Gateway User Guide Description A comma-separated list of the paths of folders that were refreshed in the cache. The default is ["/"]. Understanding gateway metrics The following table describes metrics that cover S3 File Gateways. Each gateway has a set of metrics associated with it. Some gateway-specific metrics have the same name as certain file- share-specific metrics. These metrics represent the same kinds of measurements, but are scoped to the gateway rather than the file share. Always specify whether you want to work with a gateway or a file share when working with a particular metric. Specifically, when working with gateway metrics, you must specify the Gateway Name for the gateway whose metric data you want to view. For more information, see Using Amazon CloudWatch metrics. Note Some metrics return data points only when new data has been generated during the most recent monitoring period. The following table describes the metrics that you can use to get information about your S3 File Gateways. Metric AvailabilityNotifications CacheFileSize Description This metric reports the number of availabil ity-related health notifications that were generated by the gateway in the reporting period. Units: Count This metric tracks the size of files in the gateway cache. Understanding gateway metrics API Version 2013-06-30 167 AWS Storage Gateway Metric CacheFree CacheHitPercent CachePercentDirty Amazon S3 File Gateway User Guide Description Use this metric with the Average statistic to measure the average size of a file in the gateway cache. Use this metric with the Max statistic to measure the maximum size of a file in the gateway cache. Units: Bytes This metric reports the number of available bytes in the gateway cache. Units: Bytes Percent of application read operations from the gateway that are served from cache. The sample is taken at the end of the reporting period. When there are no application read operation s from the gateway, this metric reports 100 percent. Units: Percent The overall percentage of the gateway cache that has not been persisted to AWS. The sample is taken at the end of the reporting period. Use this metric with the Sum statistic. Ideally, this metric should
storagegateway-s3file-ug-067
storagegateway-s3file-ug.pdf
67
a file in the gateway cache. Units: Bytes This metric reports the number of available bytes in the gateway cache. Units: Bytes Percent of application read operations from the gateway that are served from cache. The sample is taken at the end of the reporting period. When there are no application read operation s from the gateway, this metric reports 100 percent. Units: Percent The overall percentage of the gateway cache that has not been persisted to AWS. The sample is taken at the end of the reporting period. Use this metric with the Sum statistic. Ideally, this metric should remain low. Units: Percent Understanding gateway metrics API Version 2013-06-30 168 AWS Storage Gateway Metric CachePercentUsed CacheUsed CloudBytesDownloaded CloudBytesUploaded Amazon S3 File Gateway User Guide Description The percent of the data cache used across the entire gateway. The sample is taken at the end of the reporting period. Units: Percent This metric reports the number of used bytes in the gateway cache. Units: Bytes The total number of bytes that the gateway downloaded from AWS during the reporting period. Use this metric with the Sum statistic to measure throughput and with the Samples statistic to measure IOPS. Units: Bytes The total number of bytes that the gateway uploaded to AWS during the reporting period. Use this metric with the Sum statistic to measure throughput and with the Samples statistic to measure input/output operations per second (IOPS). Units: Bytes Understanding gateway metrics API Version 2013-06-30 169 AWS Storage Gateway Metric FilesFailingUpload FileSharesUnavailable Amazon S3 File Gateway User Guide Description This metric tracks the number of files which are failing to upload to AWS. These files will generate health notifications which contain more information on the issue. Use this metric with the Sum statistic to show the number of files which are currently failing to upload to AWS. Units: Count This metric provides the number of file shares on this gateways which are in the Unavailable state. If this metric reports any file shares are unavailable, then it is likely there is a problem with the gateway which is may cause disruptio n to your workflow. It is recommended to create an alarm for when this metric reports a non-zero value. Units: Count FilesRenamed This metric tracks the number of files renamed in the reporting period. HealthNotifications Units: Count This metric reports the number of health notifications that were generated by this gateway in the reporting period. Units: Count Understanding gateway metrics API Version 2013-06-30 170 AWS Storage Gateway Metric IndexEvictions IndexFetches Amazon S3 File Gateway User Guide Description This metric reports the number of files whose metadata was evicted from the cached index of file metadata to make room for new entries. The gateway maintains this metadata index, which is populated from the AWS Cloud on demand. Units: Count This metric reports the number of files for which metadata was fetched. The gateway maintains a cached index of file metadata, which is populated from the AWS Cloud on demand. Units: Count IoWaitPercent This metric reports the percentage of time that the CPU is waiting for a response from MemTotalBytes MemUsedBytes NfsSessions the local disk. Units: Percent This metric reports the total amount of memory on the gateway. Units: Bytes This metric reports the amount of used memory on the gateway. Units: Bytes This metric reports the number of NFS sessions that are active on the gateway. Units: Count Understanding gateway metrics API Version 2013-06-30 171 AWS Storage Gateway Metric RootDiskFreeBytes S3GetObjectRequestTime S3PutObjectRequestTime S3UploadPartRequestTime SmbV1Sessions SmbV2Sessions Amazon S3 File Gateway User Guide Description This metric reports the number of available bytes on the root disk of the gateway. If this metric reports less than 20 GB are free, you should increase the size of the root disk. To increase the root disk size, you can increase the size of existing root disk on the VM. When the VM is rebooted, gateway recognizes the increased size on the root disk. Units: Bytes This metric reports the time for the gateway to complete S3 get object requests. Units: Milliseconds This metric reports the time for the gateway to complete S3 put object requests. Units: Milliseconds This metric reports the time for the gateway to complete S3 upload part requests. Units: Milliseconds This metric reports the number of SMBv1 sessions that are active on the gateway. Units: Count This metric reports the number of SMBv2 sessions that are active on the gateway. Units: Count Understanding gateway metrics API Version 2013-06-30 172 AWS Storage Gateway Metric SmbV3Sessions Amazon S3 File Gateway User Guide Description This metric reports the number of SMBv3 sessions that are active on the gateway. Units: Count TotalCacheSize This metric reports the total size of the cache. UserCpuPercent Units: Bytes This metric reports the percentage of time that is spent on gateway processing.
storagegateway-s3file-ug-068
storagegateway-s3file-ug.pdf
68
complete S3 upload part requests. Units: Milliseconds This metric reports the number of SMBv1 sessions that are active on the gateway. Units: Count This metric reports the number of SMBv2 sessions that are active on the gateway. Units: Count Understanding gateway metrics API Version 2013-06-30 172 AWS Storage Gateway Metric SmbV3Sessions Amazon S3 File Gateway User Guide Description This metric reports the number of SMBv3 sessions that are active on the gateway. Units: Count TotalCacheSize This metric reports the total size of the cache. UserCpuPercent Units: Bytes This metric reports the percentage of time that is spent on gateway processing. Units: Percent Understanding file share metrics You can find information following about the Storage Gateway metrics that cover file shares. Each file share has a set of metrics associated with it. Some file share-specific metrics have the same name as certain gateway-specific metrics. These metrics represent the same kinds of measurements, but are scoped to the file share instead. Always specify whether you want to work with either a gateway or a file share metric before working with a metric. Specifically, when working with file share metrics, you must specify the File share ID that identifies the file share for which you are interested in viewing metrics. For more information, see Using Amazon CloudWatch metrics. Note Some metrics return data points only when new data has been generated during the most recent monitoring period. The following table describes the Storage Gateway metrics that you can use to get information about your file shares. Understanding file share metrics API Version 2013-06-30 173 AWS Storage Gateway Amazon S3 File Gateway User Guide Metric Description CacheHitPercent CachePercentDirty CachePercentUsed Percent of application read operations from the file shares that are served from cache. The sample is taken at the end of the reporting period. When there are no application read operation s from the file share, this metric reports 100 percent. Units: Percent The file share's contribution to the overall percentage of the gateway's cache that has not been persisted to AWS. The sample is taken at the end of the reporting period. Use this metric with the Sum statistic. Ideally, this metric should remain low. Note Use the CachePercentDirty metric of the gateway to view the overall percentage of the gateway's cache that has not been persisted to AWS. Units: Percent The percent of the data cache used across the entire gateway. The sample is taken at the end of the reporting period. This file share- specific metric reports the same value as the corresponding gateway-specific metric. Understanding file share metrics API Version 2013-06-30 174 AWS Storage Gateway Metric CloudBytesUploaded CloudBytesDownloaded FilesFailingUpload Amazon S3 File Gateway User Guide Description Units: Percent The total number of bytes that the gateway uploaded to AWS during the reporting period. Use this metric with the Sum statistic to measure throughput and with the Samples statistic to measure IOPS. Units: Bytes The total number of bytes that the gateway downloaded from AWS during the reporting period. Use this metric with the Sum statistic to measure throughput and with the Samples statistic to measure input/output operations per second (IOPS). Units: Bytes This metric tracks the number of files which are failing to upload to AWS. These files will generate health notifications which contain more information on the issue. Use this metric with the Sum statistic to show the number of files which are currently failing to upload to AWS. Units: Count Understanding file share metrics API Version 2013-06-30 175 AWS Storage Gateway Metric ReadBytes WriteBytes Amazon S3 File Gateway User Guide Description The total number of bytes read from your on- premises applications in the reporting period for a file share. Use this metric with the Sum statistic to measure throughput and with the Samples statistic to measure IOPS. Units: Bytes The total number of bytes written to your on- premises applications in the reporting period. Use this metric with the Sum statistic to measure throughput and with the Samples statistic to measure IOPS. Units: Bytes Understanding S3 File Gateway audit logs Amazon S3 File Gateway (S3 File Gateway) audit logs provide you with details about user access to files and folders within a file share. You can use them to monitor user activities and take action if inappropriate activity patterns are identified. Operations The following table describes the S3 File Gateway audit log file access operations. Operation name Definition Read Data Write Data Create Read the contents of a file. Change the contents of a file. Create a new file or folder. Understanding S3 File Gateway audit logs API Version 2013-06-30 176 AWS Storage Gateway Amazon S3 File Gateway User Guide Operation name Definition Rename Delete Write Attributes Attributes Rename an existing file or folder. Delete a file or folder. Update file or folder metadata (ACLs, owner, group,
storagegateway-s3file-ug-069
storagegateway-s3file-ug.pdf
69
them to monitor user activities and take action if inappropriate activity patterns are identified. Operations The following table describes the S3 File Gateway audit log file access operations. Operation name Definition Read Data Write Data Create Read the contents of a file. Change the contents of a file. Create a new file or folder. Understanding S3 File Gateway audit logs API Version 2013-06-30 176 AWS Storage Gateway Amazon S3 File Gateway User Guide Operation name Definition Rename Delete Write Attributes Attributes Rename an existing file or folder. Delete a file or folder. Update file or folder metadata (ACLs, owner, group, permissions). The following table describes S3 File Gateway audit log file access attributes. Attribute accessMode accountDomain (SMB only) Definition The permission setting for the object. The Active Directory (AD) domain that the client’s account belongs to. accountName (SMB only) The Active Directory user name of the client. bucket The S3 bucket name. clientGid (NFS only) The identifier of the group of the user accessing the object. clientUid (NFS only) The identifier of the user accessing the object. ctime groupId fileSizeInBytes The time that the object’s content or metadata was modified, set by the client. The identifier for group owner of the object. The size of the file in bytes, set by the client at file creation time. gateway The Storage Gateway ID. Understanding S3 File Gateway audit logs API Version 2013-06-30 177 AWS Storage Gateway Amazon S3 File Gateway User Guide Attribute mtime newObjectName objectName objectType operation ownerId securityDescriptor (SMB only) shareName source Definition This time that the object's content was modified, set by the client. The full path to the new object after it has been renamed. The full path to the object. Defines whether the object is a file or folder. The name of the object access operation. The identifier for the owner of the object. Shows the discretionary access control list (DACL) set on an object, in SDDL format. The name of the share that is being accessed. The ID of the file share being audited. sourceAddress The IP address of file share client machine. status timestamp version The status of the operation. Only success is logged (failures are logged with the exception of failures arising from permissions denied). The time that the operation occurred based on the OS timestamp of the gateway. The version of the audit log format. Attributes logged per operation The following table describes the S3 File Gateway audit log attributes logged in each file access operation. Understanding S3 File Gateway audit logs API Version 2013-06-30 178 AWS Storage Gateway Amazon S3 File Gateway User Guide Read data Write data Create folder Create file Rename file/ Delete file/ Write attribute Write attribute Write attribute Write attribute fold fold s s s s er er (change (chown) (chmod) (chgrp) ACL - SMB only) accessMod e X accountDo X X X X X X X X X X X X main (SMB only) X accountNa X X X X X X X X X me (SMB only) bucket X X clientGid X X X X X X X X X X X X X X X X X (NFS only) X clientUid X X X X X X X X (NFS only) ctime groupId X X X X Understanding S3 File Gateway audit logs API Version 2013-06-30 179 AWS Storage Gateway Amazon S3 File Gateway User Guide Read data Write data Create folder Create file Rename file/ Delete file/ Write attribute Write attribute Write attribute Write attribute fold fold s s s s er er (change (chown) (chmod) (chgrp) ACL - SMB only) X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X fileSizeI nBytes gateway X X mtime newObject Name X objectNam e X objectTyp e operationX ownerId securityD escriptor (SMB only) shareNameX source X X X X X X X X X X X X X X X X X X X X X X X Understanding S3 File Gateway audit logs API Version 2013-06-30 180 AWS Storage Gateway Amazon S3 File Gateway User Guide Read data Write data Create folder Create file Rename file/ Delete file/ Write attribute Write attribute Write attribute Write attribute fold fold s s s s er er (change (chown) (chmod) (chgrp) X sourceAdd ress status X timestampX version X X X X X X X X X X X X X X X X X X X X X ACL - SMB only) X X X X X X X X X X X X X X X X Create a cache report for your S3 File Gateway S3 File Gateway can generate a report of the
storagegateway-s3file-ug-070
storagegateway-s3file-ug.pdf
70
User Guide Read data Write data Create folder Create file Rename file/ Delete file/ Write attribute Write attribute Write attribute Write attribute fold fold s s s s er er (change (chown) (chmod) (chgrp) X sourceAdd ress status X timestampX version X X X X X X X X X X X X X X X X X X X X X ACL - SMB only) X X X X X X X X X X X X X X X X Create a cache report for your S3 File Gateway S3 File Gateway can generate a report of the metadata for files that are currently in the local upload cache for a specific file share. You can apply filters and additional criteria that determine which specific types of cached files appear in the report. You can use this report to help identify and resolve gateway issues. For example, if you have files failing upload from your gateway to Amazon S3, you can generate a report that lists the specific files that are failing to upload, and the reasons for upload failure. The report is a CSV file containing a list of files which match the set of filter parameters you specify. The output file is stored as an Amazon S3 object in a bucket location that you specify when you configure the report. To create a cache report using the AWS Storage Gateway API, see StartCacheReport in the Storage Gateway API Reference. To create a cache report in the Storage Gateway console, use the following procedure. Prerequisites • You must have s3:PutObject and s3:AbortMultipartUpload permissions for the Amazon S3 bucket where you want to store the cache report. • No other cache reports can currently be in-progress for the file share. • There must be fewer than 10 existing cache reports for the file share. Create a cache report API Version 2013-06-30 181 AWS Storage Gateway Amazon S3 File Gateway User Guide • The gateway must be online and connected to AWS. • The gateway root disk must have at least 20GB of free space. To create a cache report using the Storage Gateway console 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home/. 2. 3. 4. 5. In the navigation pane on the left side of the page, choose File shares, and then choose the file share for which you want to create a cache report. From the Actions drop-down menu, chooseCreate cache report. For Amazon S3 location, enter the Amazon S3 bucket and prefix of the location where you want to save the completed cache report CSV file object in Amazon S3. To select the bucket and prefix from your existing Amazon S3 storage, choose Browse S3. For IAM role, do one of the following to specify an IAM role that grants your File Gateway permissions to generate and store your cache report: • To specify an existing IAM role, choose a role from the drop-down list. • To manually create a new IAM role, choose Create a role, then create the new role using the IAM console. Note The IAM role you specify must have the following permissions to write objects to the report bucket Amazon S3 location, and to stop multipart uploads to the report bucket: • s3:PutObject • s3:AbortMultipartUpload 6. For Report filter, do one of the following to determine which files will be included in the cache report: • To include all cached files that are currently failing upload to Amazon S3, choose All files failing to upload. • To include only those files that fail upload to Amazon S3 for a specific reason, choose Specific upload failure reasons only. Then, for Failure reasons, select one or more of the following reasons: Create a cache report API Version 2013-06-30 182 AWS Storage Gateway Amazon S3 File Gateway User Guide • Inaccessible storage class — The gateway can't access the Amazon S3 storage class where the object is stored. For more information, see Error: InaccessibleStorageClass. • Invalid object state — The state of the file on the gateway doesn't match its state in Amazon S3. For more information, see Error: InvalidObjectState. • Object missing — The object has been deleted or moved in Amazon S3. For more information, see Error: ObjectMissing. • S3 Access Denied — The Amazon S3 bucket access IAM role doesn't allow the gateway to perform the upload operation. For more information, see Error: S3AccessDenied. Note The Files Failing Upload flag is reset every 24 hours and during gateway reboot. If this report captures the files after the reset, but before they become flagged again, they will not be reported as Files Failing Upload. 7. For Use a VPC endpoint to connect to S3?, do one of the following to specify how your gateway will connect to the Amazon S3 bucket:
storagegateway-s3file-ug-071
storagegateway-s3file-ug.pdf
71
S3. For more information, see Error: ObjectMissing. • S3 Access Denied — The Amazon S3 bucket access IAM role doesn't allow the gateway to perform the upload operation. For more information, see Error: S3AccessDenied. Note The Files Failing Upload flag is reset every 24 hours and during gateway reboot. If this report captures the files after the reset, but before they become flagged again, they will not be reported as Files Failing Upload. 7. For Use a VPC endpoint to connect to S3?, do one of the following to specify how your gateway will connect to the Amazon S3 bucket: • To connect directly without using Amazon VPC, choose Connect directly to the bucket. • To browse a list of existing Amazon VPC endpoints, choose Choose a VPC endpoint, and then specify an endpoint from the VPC endpoints drop-down list that appears. • To specify an existing Amazon VPC endpoint by its DNS name, choose Input a VPC endpoint DNS name, and then enter the DNS name in the VPC endpoint DNS name field that appears. 8. (Optional) Under Tags - optional, choose Add new tag, then enter a Key and Value for your cache report. A tag is a case-sensitive key-value pair that helps you categorize your Storage Gateway resources. Adding tags can make filtering and searching for your cache report easier. You can repeat this step to add up to 50 tags. 9. Choose Create report when finished. Storage Gateway begins generating the report. You can check progress and view status on the Cache reports tab of the details page for the file share. Create a cache report API Version 2013-06-30 183 AWS Storage Gateway Amazon S3 File Gateway User Guide View and manage cache reports for your S3 File Gateway Cache reports list files that are currently in the local cache for a specific file share, according to filters and criteria that you specify. You can view a list of existing cache reports for a specific file share, check report progress and status, and delete reports you no longer need using the AWS Storage Gateway API or the Storage Gateway console. To manage cache reports using the API, see the following sections in the Storage Gateway API Reference: • ListCacheReports • DescribeCacheReport • CancelCacheReport • DeleteCacheReport To manage cache reports in the Storage Gateway console, use the following procedure. To manage cache reports using the Storage Gateway console 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home/. 2. In the navigation pane on the left side of the page, choose File shares, and then choose the file share for which you want to manage cache reports. 3. On the Details page for the file share, choose the Cache reports tab. This tab lists the existing cache reports for the file share, and provides information about status, progress, and the object path where the report file is stored in Amazon S3. 4. Do one of the following: • To view additional details for a specific report, such as the report ARN and associated tags, choose a report from the Report ID column. • To specify multiple reports to manage simultaneously, select the reports using the checkbox column. 5. To manage one or more reports, choose one of the following from the Actions drop-down menu: Manage cache reports API Version 2013-06-30 184 AWS Storage Gateway Amazon S3 File Gateway User Guide • Delete cache report — This deletes the record of the cache report from the Storage Gateway database. Delete records for obsolete cache reports to make room for new reports. Each file share can have up to 10 existing cache reports at any time. Note Deleting the cache report record using this procedure does not delete the report file object from Amazon S3. • Cancel report — This cancels a report that is currently in-progress. Cancel an in-progress report if you made a mistake during report configuration, or if the report takes an unusually long time to complete. Confirm the cancellation when prompted. Note Completion times can vary significantly depending on the number of files in the cache. Typically, most reports complete within 5 minutes. The Storage Gateway console displays a message indicating the result of the cancellation or delete action. Understanding the information provided in S3 File Gateway cache reports Cache reports list files that are currently in the local cache for a specific file share, according to filters and criteria that you specify. Each cache report includes the following information: • Bucket — The Amazon S3 bucket or Access Point that is associated with the file share. • S3ObjectKey — The Amazon S3 object that stores the data and metadata for this file. This object has the latest data that has been uploaded to S3, but it could be missing data which is failing to upload
storagegateway-s3file-ug-072
storagegateway-s3file-ug.pdf
72
or delete action. Understanding the information provided in S3 File Gateway cache reports Cache reports list files that are currently in the local cache for a specific file share, according to filters and criteria that you specify. Each cache report includes the following information: • Bucket — The Amazon S3 bucket or Access Point that is associated with the file share. • S3ObjectKey — The Amazon S3 object that stores the data and metadata for this file. This object has the latest data that has been uploaded to S3, but it could be missing data which is failing to upload to S3. • FilePath — The file path for the file entry in the gateway cache. This is where you can find the file when mounting and browsing the file share. Understanding cache reports API Version 2013-06-30 185 AWS Storage Gateway Amazon S3 File Gateway User Guide • RenamedTo — The new path of a renamed file. When you rename a file on your file share, the gateway needs to track both the old and new locations of the file. This field shows where the file was moved to, helping you track file rename operations - even if a file has been renamed multiple times. This information is particularly useful when you need to understand how files in your file share correspond to objects in your Amazon S3 bucket. The following example shows the cache report entries for a complex scenario involving a file being overwritten directly in Amazon S3, while also being renamed through File Gateway. In this scenario, the gateway uploads file A.txt to S3, and then evicts the file contents to make space in the local cache. The associated S3 object is then overwritten directly in S3—not through an action taken by the gateway—which results in an InvalidObjectState due to the mismatch between the S3 object and what the gateway expects. At the same time, file A.txt was renamed to B.txt through the gateway. Bucket S3ObjectK ey FilePathRenamedToType IsDirtyIsDataDir ty UploadErr SizeInByt IsDeletedIsFailing es or ToUpload IsWholeFi leInCache A.txt samplebuc ket- / B.txt iad A.txt samplebuc ket- / A.txt / B.txt iad FILE TRUE FALSE FALSE TRUE 4 InvalidOb jectState FALSE FILE TRUE FALSE TRUE FALSE 4 FALSE • Type — Denotes whether the entry is for a FILE or DIRECTORY. • IsDirty — Reports TRUE if there is any type of change to the file which have not been uploaded to Amazon S3. This includes changes to metadata such as file name and read/write permissions, even if the file's data has not changed. • IsDataDirty — Reports TRUE if there are changes to the file's data which have not been uploaded to Amazon S3. • IsDeleted — Reports TRUE if the file was deleted on the gateway. If a file is marked as deleted, then it will always be marked as dirty. • IsFailingToUpload — Reports TRUE if there is a problem uploading the file to Amazon S3. This status resets every 24 hours to allow the gateway to retry the upload and check whether the issue has been resolved. The gateway rejects any new write operations for a file that is failing to upload. If the gateway does not have the entire file in cache, then it also rejects read operations. Understanding cache reports API Version 2013-06-30 186 AWS Storage Gateway Amazon S3 File Gateway User Guide • UploadError — The error that is preventing the file from uploading to Amazon S3. For more information and recommended steps to resolve these errors, see Troubleshooting: File Gateway issues. • SizeInBytes — The total size of the file. • IsWholeFileInCache — Reports TRUE if all of the file's data is currently stored in the gateway cache. If this is TRUE for a file failing to upload to Amazon S3, then the gateway will allow the file to be read. Understanding cache reports API Version 2013-06-30 187 AWS Storage Gateway Amazon S3 File Gateway User Guide Maintaining your gateway Maintaining your Amazon S3 File Gateway involves doing general maintenance to optimize your gateway's performance. These tasks are common to all gateway types. This section contains the following topics, which describe concepts and procedures related to maintaining your Amazon S3 File Gateway: Topics • Managing gateway updates - Learn how to turn maintenance updates on or off, and modify the maintenance window schedule for your File Gateway. • Performing maintenance tasks using the local console - Learn how to perform maintenance tasks using the gateway local console. • Shutting down your gateway VM - Learn about what to do if you need to shutdown or reboot your gateway virtual machine for maintenance, such as when applying a patch to your hypervisor. • Replacing your existing S3 File Gateway with a new instance - Learn how to replace your S3
storagegateway-s3file-ug-073
storagegateway-s3file-ug.pdf
73
S3 File Gateway: Topics • Managing gateway updates - Learn how to turn maintenance updates on or off, and modify the maintenance window schedule for your File Gateway. • Performing maintenance tasks using the local console - Learn how to perform maintenance tasks using the gateway local console. • Shutting down your gateway VM - Learn about what to do if you need to shutdown or reboot your gateway virtual machine for maintenance, such as when applying a patch to your hypervisor. • Replacing your existing S3 File Gateway with a new instance - Learn how to replace your S3 File Gateway with a new instance when you want to improve performance or to respond to a notification to migrate the gateway. • Deleting your gateway and removing associated resources - Learn how to delete your gateway using the AWS Storage Gateway console and clean up associated resources to avoid being charged for their continued use. Managing gateway updates Storage Gateway consists of a managed cloud services component and a gateway appliance component that you deploy either on-premises, or on an Amazon EC2 instance in the AWS cloud. Both components receive regular updates. The topics in this section describe the cadence of these updates, how they are applied, and how to configure update-related settings on the gateways in your deployment. Important You should treat the Storage Gateway appliance as a managed virtual machine, and should not attempt to access or modify its installation in any way. Attempting to install or Managing gateway updates API Version 2013-06-30 188 AWS Storage Gateway Amazon S3 File Gateway User Guide update any software packages using methods other than the normal AWS gateway update mechanism (for example, SSM or hypervisor tools) may cause the gateway to malfunction. Update frequency and expected behavior AWS updates the cloud services component as needed without causing disruption to deployed gateways. Your deployed gateway appliances receive the following types of updates: • Maintenance - Regular updates that can include operating system and software upgrades, fixes to address stability, performance, and security, and access to new features. • Urgent - Critical updates that include required fixes for issues that immediately impact the security, performance, or durability of your gateway. Urgent updates can be released at any time, outside the normal cadence of the monthly maintenance and feature updates. All updates are cumulative, and upgrade gateways to the current version when applied. For information about the specific changes included in each update, see Release Notes for Gateway Appliance Software. All gateway appliance updates may cause a brief disruption of service. The gateway's VM host doesn't need to reboot during updates, but the gateway will be unavailable for a short period while the gateway appliance updates and restarts. When you deploy and activate your gateway, a default maintenance window schedule is set. You can modify the maintenance window schedule at any time. You can also turn off maintenance updates, but we recommend leaving them turned on. Note Urgent updates will be applied according to the maintenance window schedule, even if regular maintenance updates are turned off. Before any update is applied to your gateway, AWS notifies you with a message on the Storage Gateway console and your AWS Health Dashboard. For more information, see AWS Health Dashboard. To modify the email address where software update notifications are sent, see Update the alternate contacts for your AWS account in the AWS Account Management Reference Guide. Update frequency and expected behavior API Version 2013-06-30 189 AWS Storage Gateway Amazon S3 File Gateway User Guide When updates are available, the gateway Details tab displays a maintenance message. You can also see the date and time that the last successful update was applied on the Details tab. Turn maintenance updates on or off When maintenance updates are turned on, your gateway automatically applies these updates according to the configured maintenance window schedule. For more information, see Modify the gateway maintenance window schedule. If maintenance updates are turned off, the gateway will not apply these updates automatically, but you can always apply them manually using the Storage Gateway console, API, or CLI. Urgent updates will sometimes be applied during your configured maintenance window, regardless of this setting. Note The following procedure describes how to turn gateway updates on or off using the Storage Gateway console. To change this setting programmatically using the API, see UpdateMaintenanceStartTime in the Storage Gateway API Reference. To turn maintenance updates on or off using the Storage Gateway console: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway for which you want to configure maintenance updates. 3. Choose Actions, and then choose Edit maintenance settings. 4. For Maintenance updates, select On or Off. 5. Choose Save changes when finished. You can verify
storagegateway-s3file-ug-074
storagegateway-s3file-ug.pdf
74
The following procedure describes how to turn gateway updates on or off using the Storage Gateway console. To change this setting programmatically using the API, see UpdateMaintenanceStartTime in the Storage Gateway API Reference. To turn maintenance updates on or off using the Storage Gateway console: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway for which you want to configure maintenance updates. 3. Choose Actions, and then choose Edit maintenance settings. 4. For Maintenance updates, select On or Off. 5. Choose Save changes when finished. You can verify the updated setting on the Details tab for the selected gateway in the Storage Gateway console. Turn maintenance updates on or off API Version 2013-06-30 190 AWS Storage Gateway Amazon S3 File Gateway User Guide Modify the gateway maintenance window schedule If maintenance updates are turned on, your gateway automatically applies these updates according the maintenance window schedule. Urgent updates will sometimes be applied during your configured maintenance window, regardless of the maintenance updates setting. Note The following procedure describes how to modify the maintenance window schedule using the Storage Gateway console. To change this setting programmatically using the API, see UpdateMaintenanceStartTime in the Storage Gateway API Reference. To modify the maintenance window schedule using the Storage Gateway console: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway for which you want to configure maintenance updates. 3. Choose Actions, and then choose Edit maintenance settings. 4. Under Maintenance window start time, do the following: a. b. For Schedule, choose Weekly or Monthly to set the maintenance window cadence. If you choose Weekly, modify the values for Day of the week and Time to set the specific point during each week when the maintenance window will begin. If you choose Monthly, modify the values for Day of the month and Time to set the specific point during each month when the maintenance window will begin. Note The maximum value that can be set for day of the month is 28. It is not possible to set the maintenance schedule to start on days 29 through 31. If you receive an error while configuring this setting, it might mean that your gateway software is out of date. Considering updating your gateway manually first, and then attempt to configure the maintenance window schedule again. 5. Choose Save changes when finished. Modify the gateway maintenance window schedule API Version 2013-06-30 191 AWS Storage Gateway Amazon S3 File Gateway User Guide You can verify the updated settings on the Details tab for the selected gateway in the Storage Gateway console. Apply an update manually If a software update is available for your gateway, you can apply it manually by following the procedure below. This manual update process ignores the maintenance window schedule and applies the update immediately, even if maintenance updates are turned off. Note The following procedure describes how to manually apply an update using the Storage Gateway console. To perform this action programmatically using the API, see UpdateGatewaySoftwareNow in the Storage Gateway API Reference. To apply a gateway software update manually using the Storage Gateway console: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway you want to update. If an update is available, the console displays a blue notification banner on the gateway Details tab, which includes an option to apply the update. 3. Choose Apply update now to immediately update the gateway. Note This operation causes a temporary disruption to gateway functionality while the update installs. During this time, the gateway status appears OFFLINE in the Storage Gateway console. After the update finishes installing, the gateway resumes normal operation and its status changes to RUNNING. You can verify that the gateway software was updated to the latest version by checking the Details tab for the selected gateway in the Storage Gateway console. Apply an update manually API Version 2013-06-30 192 AWS Storage Gateway Amazon S3 File Gateway User Guide Performing maintenance tasks using the local console This section contains the following topics, which provide information about how to perform maintenance tasks using the gateway appliance local console. You can perform these tasks by accessing the local console through the on-premises virtual machine or Amazon EC2 instance that hosts your gateway appliance. Most of the tasks are common across the different host platforms, but there are also some differences. Topics • Accessing the gateway local console - Learn how to log into the local console for an on-premises gateway hosted on a Linux Kernel-based Virtual Machine (KVM), VMware ESXi, or Microsoft Hyper-V Manager platform. • Performing tasks on the virtual machine local console - Learn how to use
storagegateway-s3file-ug-075
storagegateway-s3file-ug.pdf
75
to perform maintenance tasks using the gateway appliance local console. You can perform these tasks by accessing the local console through the on-premises virtual machine or Amazon EC2 instance that hosts your gateway appliance. Most of the tasks are common across the different host platforms, but there are also some differences. Topics • Accessing the gateway local console - Learn how to log into the local console for an on-premises gateway hosted on a Linux Kernel-based Virtual Machine (KVM), VMware ESXi, or Microsoft Hyper-V Manager platform. • Performing tasks on the virtual machine local console - Learn how to use the local console to perform basic setup and advanced configuration tasks for an on-premises gateway, such as configuring an HTTP proxy, viewing system resource status, or running terminal commands. • Performing tasks on the Amazon EC2 gateway local console - Learn how to log into the local console to perform basic setup and advanced configuration tasks for an Amazon EC2 gateway, such as configuring an HTTP proxy, viewing system resource status, or running terminal commands. Accessing the gateway local console How you access your VM's local console depends on the type of the Hypervisor you deployed your gateway VM on. In this section, you can find information on how to access the VM local console using Linux Kernel-based Virtual Machine (KVM), VMware ESXi, and Microsoft Hyper-V Manager. Topics • Accessing the Gateway Local Console with Linux KVM • Accessing the Gateway Local Console with VMware ESXi • Access the Gateway Local Console with Microsoft Hyper-V Performing maintenance tasks using the local console API Version 2013-06-30 193 AWS Storage Gateway Amazon S3 File Gateway User Guide Accessing the Gateway Local Console with Linux KVM There are different ways to configure virtual machines running on KVM, depending on the Linux distribution being used. Instructions for accessing KVM configuration options from the command line follow. Instructions might differ depending on your KVM implementation. To access your gateway's local console with KVM 1. Use the following command to list the VMs that are currently available in KVM. # virsh list The command returns a list of VMs with Id, Name, and State information for each. Note the Id of the VM for which you want to launch the gateway local console. 2. Use the following command to access the local console. # virsh console Id Replace Id with the Id of the VM you noted in the previous step. The AWS Appliance gateway local console prompts you to login to change your network configuration and other settings. 3. Enter your username and password to log into the gateway local console. For more information, see Logging in to the File Gateway local console . After you log in, the AWS Appliance Activation - Configuration menu appears. You can select from the menu options to perform gateway configuration tasks. For more information, see Performing tasks on the virtual machine local console . Accessing the Gateway Local Console with VMware ESXi To access your gateway's local console with VMware ESXi 1. In the VMware vSphere client, select your gateway VM. 2. Make sure that the gateway VM is turned on. Accessing the gateway local console API Version 2013-06-30 194 AWS Storage Gateway Amazon S3 File Gateway User Guide Note If your gateway VM is turned on, a green arrow icon appears with the VM icon in the VM browser panel on the left side of the application window. If your gateway VM is not turned on, you can turn it on by choosing the green Power On icon on the Toolbar at the top of the application window. 3. Choose the Console tab in the main information panel on the right side of the application window. After a few moments, the AWS Appliance gateway local console prompts you to login to change your network configuration and other settings. Note To release the cursor from the console window, press Ctrl+Alt. 4. Enter your username and password to log into the gateway local console. For more information, see Logging in to the File Gateway local console . After you log in, the AWS Appliance Activation - Configuration menu appears. You can select from the menu options to perform gateway configuration tasks. For more information, see Performing tasks on the virtual machine local console . Access the Gateway Local Console with Microsoft Hyper-V To access your gateway's local console (Microsoft Hyper-V) 1. Select your gateway appliance VM from the Virtual Machines panel on the left side of the Microsoft Hyper-V Manager application window. 2. Make sure that the gateway is turned on. Note If your gateway VM is turned on, Running is displayed in the State column for the VM in the Virtual Machines panel on the left side of the application window. If your Accessing the gateway local console
storagegateway-s3file-ug-076
storagegateway-s3file-ug.pdf
76
configuration tasks. For more information, see Performing tasks on the virtual machine local console . Access the Gateway Local Console with Microsoft Hyper-V To access your gateway's local console (Microsoft Hyper-V) 1. Select your gateway appliance VM from the Virtual Machines panel on the left side of the Microsoft Hyper-V Manager application window. 2. Make sure that the gateway is turned on. Note If your gateway VM is turned on, Running is displayed in the State column for the VM in the Virtual Machines panel on the left side of the application window. If your Accessing the gateway local console API Version 2013-06-30 195 AWS Storage Gateway Amazon S3 File Gateway User Guide gateway VM is not turned on, you can turn it on by choosing Start in the Actions panel on the right side of the application window. 3. Choose Connect from the Actions panel. The Virtual Machine Connection window appears. If an authentication window appears, type the sign-in credentials provided to you by the hypervisor administrator. After a few moments, the AWS Appliance gateway local console prompts you to login to change your network configuration and other settings. 4. Enter your username and password to log into the gateway local console. For more information, see Logging in to the File Gateway local console . After you log in, the AWS Appliance Activation - Configuration menu appears. You can select from the menu options to perform gateway configuration tasks. For more information, see Performing tasks on the virtual machine local console . Performing tasks on the virtual machine local console For a File Gateway deployed on-premises, you can perform the following maintenance tasks using the VM host's local console. These tasks are common to VMware, Microsoft Hyper-V, and Linux Kernel-based Virtual Machine (KVM) hypervisors. Topics • Logging in to the File Gateway local console - Learn how to login to the local console where you can configure gateway network settings and change the default password. • Configuring an HTTP proxy - Learn how to configure Storage Gateway to route all AWS endpoint traffic through a proxy server. • Configuring your gateway network settings - Learn how to configure your gateway to use DHCP or a static IP address. • Testing your gateway's network connectivity - Learn how to use the gateway local console to test network connectivity. • Viewing your gateway system resource status - Learn how to check your gateway's virtual CPU cores, root volume size, and RAM. Performing tasks on the virtual machine local console API Version 2013-06-30 196 AWS Storage Gateway Amazon S3 File Gateway User Guide • Configuring a Network Time Protocol (NTP) server for your gateway - Learn how to view and edit Network Time Protocol (NTP) server configurations and synchronize the time on your gateway with your hypervisor host. • Running Storage Gateway commands on the local console - Learn how to run local console commands to perform tasks such as saving routing tables, connecting to Support, and more. Logging in to the File Gateway local console When the VM is ready for you to log in, the login screen is displayed. If this is your first time logging in to the local console, you use the default sign-in credentials to log in. These default login credentials give you access to menus where you can configure gateway network settings and change the password from the local console. AWS Storage Gateway allows you to set your own password from the Storage Gateway console instead of changing the password from the local console. You don't need to know the default password to set a new password. For more information, see Setting the local console password from the Storage Gateway console. To log in to the gateway's local console • If this is your first time logging in to the local console, log in to the VM with the default credentials. The default user name is admin and the password is password. Otherwise, use your credentials to log in. Note We recommend changing the default password by entering the corresponding numeral for Gateway Console from the AWS Appliance Activation - Configuration main menu, then running the passwd command. For information about how to run the command, see Running Storage Gateway commands on the local console. You can also set the password from the Storage Gateway console. For more information, see Setting the local console password from the Storage Gateway console. Setting the local console password from the Storage Gateway console When you log in to the local console for the first time, you log in to the VM with the default credentials. For all types of gateways, you use default credentials. The user name is admin and the password is password. Performing tasks on the virtual machine local console API Version 2013-06-30 197 AWS Storage Gateway
storagegateway-s3file-ug-077
storagegateway-s3file-ug.pdf
77
see Running Storage Gateway commands on the local console. You can also set the password from the Storage Gateway console. For more information, see Setting the local console password from the Storage Gateway console. Setting the local console password from the Storage Gateway console When you log in to the local console for the first time, you log in to the VM with the default credentials. For all types of gateways, you use default credentials. The user name is admin and the password is password. Performing tasks on the virtual machine local console API Version 2013-06-30 197 AWS Storage Gateway Amazon S3 File Gateway User Guide We recommend that you always set a new password immediately after you create your new gateway. You can set this password from the AWS Storage Gateway console rather than the local console if you want. You don't need to know the default password to set a new password. To set the local console password on the Storage Gateway console 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway for which you want 3. 4. to set a new password. For Actions, choose Set Local Console Password. In the Set Local Console Password dialog box, enter a new password, confirm the password, and then choose Save. Your new password replaces the default password. Storage Gateway doesn't save the password but rather safely transmits it to the VM. Note The password can consist of any character on the keyboard and can be 1–512 characters long. Configuring an HTTP proxy File Gateways support configuration of an HTTP proxy. Note The only proxy configuration that File Gateways support is HTTP. If your gateway must use a proxy server to communicate to the internet, then you need to configure the HTTP proxy settings for your gateway. You do this by specifying an IP address and port number for the host running your proxy. After you do so, Storage Gateway routes all AWS endpoint traffic through your proxy server. Communications between the gateway and endpoints is encrypted, even when using the HTTP proxy. For information about network requirements for your gateway, see Network and firewall requirements. Performing tasks on the virtual machine local console API Version 2013-06-30 198 AWS Storage Gateway Amazon S3 File Gateway User Guide To configure an HTTP proxy for a File Gateway 1. Log in to your gateway's local console: • For more information on logging in to the VMware ESXi local console, see Accessing the Gateway Local Console with VMware ESXi. • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the local console for the Linux Kernel-Based Virtual Machine (KVM), see Accessing the Gateway Local Console with Linux KVM. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Configure HTTP Proxy. From the AWS Appliance Activation HTTP Proxy Configuration menu, enter the corresponding numeral for the task you want to perform: 2. 3. • Configure HTTP proxy - You will need to supply a host name and port to complete configuration. • View current HTTP proxy configuration - If an HTTP proxy is not configured, the message HTTP Proxy not configured is displayed. If an HTTP proxy is configured, the host name and port of the proxy are displayed. • Remove an HTTP proxy configuration - The message HTTP Proxy Configuration Removed is displayed. 4. Restart your VM to apply your HTTP configuration settings. Configuring your gateway network settings The default network configuration for the gateway is Dynamic Host Configuration Protocol (DHCP). With DHCP, your gateway is automatically assigned an IP address. In some cases, you might need to manually assign your gateway's IP as a static IP address, as described following. To configure your gateway to use static IP addresses 1. Log in to your gateway's local console: • For more information on logging in to the VMware ESXi local console, see Accessing the Gateway Local Console with VMware ESXi. Performing tasks on the virtual machine local console API Version 2013-06-30 199 AWS Storage Gateway Amazon S3 File Gateway User Guide • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the KVM local console, see Accessing the Gateway Local Console with Linux KVM. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Network Configuration. 3. From the Network Configuration menu, perform one of the following tasks: To Perform This Task Do This Get information about your network adapter Enter the corresponding numeral to select Describe Adapter. A
storagegateway-s3file-ug-078
storagegateway-s3file-ug.pdf
78
Amazon S3 File Gateway User Guide • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the KVM local console, see Accessing the Gateway Local Console with Linux KVM. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Network Configuration. 3. From the Network Configuration menu, perform one of the following tasks: To Perform This Task Do This Get information about your network adapter Enter the corresponding numeral to select Describe Adapter. A list of adapter names appears, and you are prompted to enter an adapter name—for example, eth0. If the adapter you specify is in use, the following information about the adapter is displayed: Media access control (MAC) address IP address Netmask • • • • Gateway IP address • DHCP enabled status You use the adapter names listed here when you configure a static IP address or when you set your gateway's default adapter. Configure DHCP routing Performing tasks on the virtual machine local console API Version 2013-06-30 200 AWS Storage Gateway Amazon S3 File Gateway User Guide To Perform This Task Do This Enter the corresponding numeral to select Configure DHCP. You are prompted to configure the network interface to use DHCP. Performing tasks on the virtual machine local console API Version 2013-06-30 201 AWS Storage Gateway Amazon S3 File Gateway User Guide To Perform This Task Do This Configure a static IP address for your gateway Enter the corresponding numeral to select Configure Static IP. You are prompted to enter the following information to configure a static IP: • • • • • • Network adapter name IP address Netmask Default gateway address Primary Domain Name Service (DNS) address Secondary DNS address Important If your gateway has already been activated, you must shut it down and restart it from the Storage Gateway console for the settings to take effect. For more information, see Shutting down your gateway VM. If your gateway uses more than one network interface, you must set all active interfaces to use DHCP or static IP addresses. Performing tasks on the virtual machine local console API Version 2013-06-30 202 AWS Storage Gateway Amazon S3 File Gateway User Guide To Perform This Task Do This Configure a hostname for your gateway For example, suppose that your gateway VM uses two interfaces configured as DHCP. If you later set one interface to a static IP, the other interface is deactivated. To activate the interface in this case, you must set it to a static IP. If both interfaces are initially set to use static IP addresses and you then set the gateway to use DHCP, both interfaces use DHCP. Enter the corresponding numeral to select Configure Hostname. You are prompted to choose whether the gateway will use a static hostname that you specify, or aquire one automatically through DCHP or rDNS. If you select Static, you are prompted to provide a static hostname, such as testgateway.example.com . Enter y to apply the configuration. Note If you configure a static hostname for your gateway, ensure that the provided hostname is in the domain that gateway is joined to. You must also create an A record in your DNS system that points the gateway's IP address to its static hostname. Performing tasks on the virtual machine local console API Version 2013-06-30 203 AWS Storage Gateway Amazon S3 File Gateway User Guide To Perform This Task Do This View your gateway's hostname configura tion Reset all your gateway's network configuration to DHCP Set your gateway's default route adapter Enter the corresponding numeral to select View Hostname Configuration. Your gateway's hostname, aquisition mode, domain, and Active Directory realm are displayed. Enter the corresponding numeral to select Reset all to DHCP. All network interfaces are set to use DHCP. Important If your gateway has already been activated, you must shut down and restart your gateway from the Storage Gateway console for the settings to take effect. For more information, see Shutting down your gateway VM. Enter the corresponding numeral to select Set Default Adapter. The available adapters for your gateway are shown, and you are prompted to choose one of the adapters—for example, eth0. Performing tasks on the virtual machine local console API Version 2013-06-30 204 AWS Storage Gateway Amazon S3 File Gateway User Guide To Perform This Task Do This Edit your gateway's DNS configuration View your gateway's DNS configuration View routing tables Enter the corresponding numeral to select Edit DNS Configuration. The available adapters of the primary and secondary DNS servers are displayed. You are prompted to provide the new IP address. Enter the corresponding numeral to select View DNS Configuration. The available adapters of the primary and secondary DNS servers
storagegateway-s3file-ug-079
storagegateway-s3file-ug.pdf
79
you are prompted to choose one of the adapters—for example, eth0. Performing tasks on the virtual machine local console API Version 2013-06-30 204 AWS Storage Gateway Amazon S3 File Gateway User Guide To Perform This Task Do This Edit your gateway's DNS configuration View your gateway's DNS configuration View routing tables Enter the corresponding numeral to select Edit DNS Configuration. The available adapters of the primary and secondary DNS servers are displayed. You are prompted to provide the new IP address. Enter the corresponding numeral to select View DNS Configuration. The available adapters of the primary and secondary DNS servers are displayed. Note For some versions of the VMware hypervisor, you can edit the adapter configuration in this menu. Enter the corresponding numeral to select View Routes. The default route of your gateway is displayed. Testing your gateway's network connectivity You can use your gateway's local console to test your network connectivity. This test can be useful when you are troubleshooting network issues with your gateway. To test your gateway's network connectivity 1. Log in to your gateway's local console: Performing tasks on the virtual machine local console API Version 2013-06-30 205 AWS Storage Gateway Amazon S3 File Gateway User Guide • For more information on logging in to the VMware ESXi local console, see Accessing the Gateway Local Console with VMware ESXi. • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the KVM local console, see Accessing the Gateway Local Console with Linux KVM. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Test Network Connectivity. If your gateway has already been activated, the connectivity test begins immediately. For gateways that have not yet been activated, you must specify the endpoint type and AWS Region as described in the following steps. 3. If your gateway is not yet activated, enter the corresponding numeral to select the endpoint type for your gateway. 4. If you selected the public endpoint type, enter the corresponding numeral to select the AWS Region that you want to test. For supported AWS Regions and a list of AWS service endpoints you can use with Storage Gateway, see AWS Storage Gateway endpoints and quotas in the AWS General Reference. As the test progresses, each endpoint displays either [PASSED] or [FAILED], indicating the status of the connection as follows: Message [PASSED] [FAILED] Description Storage Gateway has network connectivity. Storage Gateway does not have network connectivity. Viewing your gateway system resource status When your gateway starts, it checks its virtual CPU cores, root volume size, and RAM. It then determines whether these system resources are sufficient for your gateway to function properly. You can view the results of this check on the gateway's local console. Performing tasks on the virtual machine local console API Version 2013-06-30 206 AWS Storage Gateway Amazon S3 File Gateway User Guide To view the status of a system resource check 1. Log in to your gateway's local console: • For more information on logging in to the VMware ESXi console, see Accessing the Gateway Local Console with VMware ESXi. • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the KVM local console, see Accessing the Gateway Local Console with Linux KVM. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select View System Resource Check. Each resource displays [OK], [WARNING], or [FAIL], indicating the status of the resource as follows: Message [OK] [WARNING] [FAIL] Description The resource has passed the system resource check. The resource doesn't meet the recommended requirements, but your gateway can continue to function. Storage Gateway displays a message that describes the results of the resource check. The resource doesn't meet the minimum requirements. Your gateway might not function properly. Storage Gateway displays a message that describes the results of the resource check. The console also displays the number of errors and warnings next to the resource check menu option. Performing tasks on the virtual machine local console API Version 2013-06-30 207 AWS Storage Gateway Amazon S3 File Gateway User Guide Configuring a Network Time Protocol (NTP) server for your gateway You can view and edit Network Time Protocol (NTP) server configurations and synchronize the VM time on your gateway with your hypervisor host. To manage system time 1. Log in to your gateway's local console: • For more information on logging in to the VMware ESXi local console, see Accessing the Gateway Local Console with VMware ESXi. • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway
storagegateway-s3file-ug-080
storagegateway-s3file-ug.pdf
80
machine local console API Version 2013-06-30 207 AWS Storage Gateway Amazon S3 File Gateway User Guide Configuring a Network Time Protocol (NTP) server for your gateway You can view and edit Network Time Protocol (NTP) server configurations and synchronize the VM time on your gateway with your hypervisor host. To manage system time 1. Log in to your gateway's local console: • For more information on logging in to the VMware ESXi local console, see Accessing the Gateway Local Console with VMware ESXi. • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the KVM local console, see Accessing the Gateway Local Console with Linux KVM. 2. 3. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select System Time Management. From the System Time Management menu, enter the corresponding numeral to perform one of the following tasks. To Perform This Task Do This View and synchronize your VM time with NTP server time. Enter the corresponding numeral to select View and Synchronize System Time. The current time of your VM is displayed . Your File Gateway determines the time difference from your gateway VM, and your NTP server time prompts you to synchronize the VM time with NTP time. After your gateway is deployed and running, in some scenarios the gateway VM's time can drift. For example, suppose that there is a prolonged network outage and your hypervisor host and gateway don't get time updates. In this case, the gateway VM's time Performing tasks on the virtual machine local console API Version 2013-06-30 208 AWS Storage Gateway Amazon S3 File Gateway User Guide To Perform This Task Do This is different from the true time. When there is a time drift, a discrepancy occurs between the stated times when operations such as snapshots occur and the actual times that the operations occur. For a gateway deployed on VMware ESXi, setting the hypervisor host time and synchronizing the VM time to the host is sufficient to avoid time drift. For more inf ormation, see Synchronize VM time with VMware host time. For a gateway deployed on Microsoft Hyper-V, you should periodically check your VM's time. For more information, see Synchronize VM time with Hyper-V or Linux KVM host time. For a gateway deployed on KVM, you can check and synchronize the VM time using virsh command line interface for KVM. Enter the corresponding numeral to select Edit NTP Configuration. You are prompted to provide a preferred and a secondary NTP server. Enter the corresponding numeral to select View NTP Configuration. Your NTP server configuration is displayed. Edit your NTP server configuration View your NTP server configuration Performing tasks on the virtual machine local console API Version 2013-06-30 209 AWS Storage Gateway Amazon S3 File Gateway User Guide Running Storage Gateway commands on the local console The VM local console in Storage Gateway helps provide a secure environment for configuring and diagnosing issues with your gateway. Using the local console commands, you can perform maintenance tasks such as saving routing tables, connecting to Support, and so on. To run a configuration or diagnostic command 1. Log in to your gateway's local console: • For more information on logging in to the VMware ESXi local console, see Accessing the Gateway Local Console with VMware ESXi. • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the KVM local console, see Accessing the Gateway Local Console with Linux KVM. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Gateway Console. 3. From the gateway console command prompt, enter h. The console displays the AVAILABLE COMMANDS menu, which lists the available commands: Command Function dig exit h Collect output from dig for DNS troublesh ooting. Return to Configuration menu. Display available command list. ifconfig View or configure network interfaces. Note We recommend configuring network or IP settings using the Storage Gateway console or the dedicated Performing tasks on the virtual machine local console API Version 2013-06-30 210 AWS Storage Gateway Command Amazon S3 File Gateway User Guide Function local console menu option. For instructions, see Configuring your gateway network settings. ip Show / manipulate routing, devices, and tunnels. Note We recommend configuring network or IP settings using the Storage Gateway console or the dedicated local console menu option. For instructions, see Configuring your gateway network settings. Administration tool for IPv4 packet filtering and NAT. Test connectivity to a specific TCP port on a network. Collect output from nping for network t roubleshooting. Connect to AWS Support. For instructions on how to turn
storagegateway-s3file-ug-081
storagegateway-s3file-ug.pdf
81
console API Version 2013-06-30 210 AWS Storage Gateway Command Amazon S3 File Gateway User Guide Function local console menu option. For instructions, see Configuring your gateway network settings. ip Show / manipulate routing, devices, and tunnels. Note We recommend configuring network or IP settings using the Storage Gateway console or the dedicated local console menu option. For instructions, see Configuring your gateway network settings. Administration tool for IPv4 packet filtering and NAT. Test connectivity to a specific TCP port on a network. Collect output from nping for network t roubleshooting. Connect to AWS Support. For instructions on how to turn on AWS support access, see You want AWS Support to help troubleshoot your EC2 gateway . iptables ncport nping open-support-channel passwd save-iptables Update authentication tokens. Persist IP tables. save-routing-table Save newly added routing table entry. Performing tasks on the virtual machine local console API Version 2013-06-30 211 AWS Storage Gateway Amazon S3 File Gateway User Guide Command tcptraceroute Function Collect traceroute output on TCP traffic to a destination. sslcheck Returns output with certificate issuer Note Storage Gateway uses certifica te issuer verification and does not support ssl inspection. If this command returns an issuer other than [email protected], then it is likely that an application performing an ssl inspection. In that case, we recommend bypassing ssl inspection for the Storage Gateway appliance. 4. From the gateway console command prompt, enter the corresponding command for the function you want to use, and follow the instructions. To learn about a command, enter man + command name at the command prompt. Performing tasks on the Amazon EC2 gateway local console Some maintenance tasks require that you log in to the local console when running a gateway deployed on an Amazon EC2 instance. This section describes how to log in to the local console and perform maintenance tasks. Topics • Logging in to your Amazon EC2 gateway local console - Learn how to connect and log in to the gateway local console your Amazon EC2 instance by using a Secure Shell (SSH) client. • Routing your gateway deployed on Amazon EC2 through an HTTP proxy - Learn how to configure a Socket Secure version 5 (SOCKS5) proxy between AWS and a gateway deployed on an Amazon EC2 instance. Performing tasks on the EC2 local console API Version 2013-06-30 212 AWS Storage Gateway Amazon S3 File Gateway User Guide • Testing your gateway's network connectivity - Learn how to use the gateway local console to test network connectivity between your gateway and various network resources. • Viewing your gateway system resource status - Learn how to use the gateway local console to checks your gateway's virtual CPU cores, root volume size, and RAM. • Running Storage Gateway commands on the local console for an Amazon EC2 gateway - Learn how to run local console commands to perform tasks such as saving routing tables, connecting to Support, and more. • Configuring your Amazon EC2 gateway network settings - Learn how to use the local console to view and configure network settings such as DNS and hostname for a gateway on an Amazon EC2 instance. Logging in to your Amazon EC2 gateway local console You log in to the gateway local console on an Amazon EC2 instance by using a Secure Shell (SSH) client. For detailed information, see Connect to your instance in the Amazon EC2 User Guide. To connect this way, you need the SSH key pair that you specified when you launched your instance. For information about Amazon EC2 key pairs, see Amazon EC2 key pairs in the Amazon EC2 User Guide. To log in to the gateway local console 1. Connect to the Amazon EC2 instance using SSH and log in as the admin user. 2. After you log in, you see the AWS Appliance Activation - Configuration main menu, from which you can perform various tasks. To Learn About This Task See This Topic Configure an HTTP proxy for your gateway Routing your gateway deployed on Amazon EC2 through an HTTP proxy Configure network settings for your gateway Configuring your Amazon EC2 gateway network settings Test network connectivity Testing your gateway's network connectivity View a system resource check Viewing your gateway system resource statu s. Performing tasks on the EC2 local console API Version 2013-06-30 213 AWS Storage Gateway Amazon S3 File Gateway User Guide To Learn About This Task See This Topic Run Storage Gateway console commands Running Storage Gateway commands on the l ocal console for an Amazon EC2 gateway To shut down the gateway, enter 0. To exit the configuration session, enter X. Routing your gateway deployed on Amazon EC2 through an HTTP proxy Storage Gateway supports the configuration of a Socket Secure version 5 (SOCKS5) proxy between your gateway deployed on Amazon EC2 and AWS. If your gateway must use
storagegateway-s3file-ug-082
storagegateway-s3file-ug.pdf
82
s. Performing tasks on the EC2 local console API Version 2013-06-30 213 AWS Storage Gateway Amazon S3 File Gateway User Guide To Learn About This Task See This Topic Run Storage Gateway console commands Running Storage Gateway commands on the l ocal console for an Amazon EC2 gateway To shut down the gateway, enter 0. To exit the configuration session, enter X. Routing your gateway deployed on Amazon EC2 through an HTTP proxy Storage Gateway supports the configuration of a Socket Secure version 5 (SOCKS5) proxy between your gateway deployed on Amazon EC2 and AWS. If your gateway must use a proxy server to communicate to the internet, then you need to configure the HTTP proxy settings for your gateway. You do this by specifying an IP address and port number for the host running your proxy. After you do so, Storage Gateway routes all AWS endpoint traffic through your proxy server. Communications between the gateway and endpoints is encrypted, even when using the HTTP proxy. To route your gateway internet traffic through a local proxy server 1. Log in to your gateway's local console. For instructions, see Logging in to your Amazon EC2 gateway local console. 2. 3. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Configure HTTP Proxy. From the AWS Appliance Activation HTTP Proxy Configuration menu, enter the corresponding numeral for the task you want to perform: • Configure HTTP proxy - You will need to supply a host name and port to complete configuration. • View current HTTP proxy configuration - If an HTTP proxy is not configured, the message HTTP Proxy not configured is displayed. If an HTTP proxy is configured, the host name and port of the proxy are displayed. • Remove an HTTP proxy configuration - The message HTTP Proxy Configuration Removed is displayed. Performing tasks on the EC2 local console API Version 2013-06-30 214 AWS Storage Gateway Amazon S3 File Gateway User Guide Testing your gateway's network connectivity You can use your gateway's local console to test your network connectivity. This test can be useful when you are troubleshooting network issues with your gateway. To test your gateway's connectivity 1. Log in to your gateway's local console. For instructions, see Logging in to your Amazon EC2 gateway local console. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Test Network Connectivity. If your gateway has already been activated, the connectivity test begins immediately. For gateways that have not yet been activated, you must specify the endpoint type and AWS Region as described in the following steps. 3. If your gateway is not yet activated, enter the corresponding numeral to select the endpoint type for your gateway. 4. If you selected the public endpoint type, enter the corresponding numeral to select the AWS Region that you want to test. For supported AWS Regions and a list of AWS service endpoints you can use with Storage Gateway, see AWS Storage Gateway endpoints and quotas in the AWS General Reference. As the test progresses, each endpoint displays either [PASSED] or [FAILED], indicating the status of the connection as follows: Message [PASSED] [FAILED] Description Storage Gateway has network connectivity. Storage Gateway does not have network connectivity. Viewing your gateway system resource status When your File Gateway starts, it checks its virtual CPU cores, root volume size, and RAM. It then determines whether the available system resources are sufficient for your gateway to function properly. You can view the results of the system resource check by using the gateway local console. Performing tasks on the EC2 local console API Version 2013-06-30 215 AWS Storage Gateway Amazon S3 File Gateway User Guide To view the status of a system resource check 1. Log in to the local console on your Amazon EC2 File Gateway. For instructions, see Logging in to your Amazon EC2 gateway local console. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select View System Resource Check. The gateway local console displays [OK], [WARNING], or [FAIL] to indicate the status of the resource as follows: Message [OK] [WARNING] [FAIL] Description The resource has passed the system resource check. The resource does not meet the recommend ed requirements, but your gateway can continue to function. The gateway local console displays a message that describes the results of the resource check. The resource does not meet the minimum requirements. Your gateway might not function properly. The gateway local console displays a message that describes the results of the resource check. The local console also displays the number of errors and warnings next to the resource check menu option. Running Storage Gateway commands on the local console for an Amazon EC2 gateway The AWS Storage Gateway console helps
storagegateway-s3file-ug-083
storagegateway-s3file-ug.pdf
83
system resource check. The resource does not meet the recommend ed requirements, but your gateway can continue to function. The gateway local console displays a message that describes the results of the resource check. The resource does not meet the minimum requirements. Your gateway might not function properly. The gateway local console displays a message that describes the results of the resource check. The local console also displays the number of errors and warnings next to the resource check menu option. Running Storage Gateway commands on the local console for an Amazon EC2 gateway The AWS Storage Gateway console helps provide a secure environment for configuring and diagnosing issues with your gateway. Using the console commands, you can perform maintenance tasks such as saving routing tables or connecting to Support. Performing tasks on the EC2 local console API Version 2013-06-30 216 AWS Storage Gateway Amazon S3 File Gateway User Guide To run a configuration or diagnostic command 1. Log in to your gateway's local console. For instructions, see Logging in to your Amazon EC2 gateway local console. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Gateway Console. 3. From the gateway console command prompt, enter h. The console displays the AVAILABLE COMMANDS menu, which lists the available commands: Command Function dig exit h Collect output from dig for DNS troublesh ooting. Return to Configuration menu. Display available command list. ifconfig View or configure network interfaces. Note We recommend configuring network or IP settings using the Storage Gateway console or the dedicated local console menu option. For instructions, see Configuring your gateway network settings. ip Show / manipulate routing, devices, and tunnels. Note We recommend configuring network or IP settings using the Storage Gateway console or the dedicated Performing tasks on the EC2 local console API Version 2013-06-30 217 AWS Storage Gateway Command iptables ncport nping Amazon S3 File Gateway User Guide Function local console menu option. For instructions, see Configuring your gateway network settings. Administration tool for IPv4 packet filtering and NAT. Test connectivity to a specific TCP port on a network. Collect output from nping for network t roubleshooting. open-support-channel Connect to AWS Support. save-iptables Persist IP tables. save-routing-table Save newly added routing table entry. tcptraceroute Collect traceroute output on TCP traffic to a destination. 4. From the gateway console command prompt, enter the corresponding command for the function you want to use, and follow the instructions. To learn about a command, enter man + command name at the command prompt. Configuring your Amazon EC2 gateway network settings You can view and configure the network settings for your Amazon EC2 File Gateway by using the gateway local console. To configure your network settings 1. Log in to the local console on your Amazon EC2 File Gateway. For instructions, see Logging in to your Amazon EC2 gateway local console. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Network Configuration. Performing tasks on the EC2 local console API Version 2013-06-30 218 AWS Storage Gateway Amazon S3 File Gateway User Guide 3. From the AWS Appliance Activation - Network Configuration menu, enter the corresponding numeral for the task that you want to perform: • Edit DNS Configuration - The gateway local console displays the available adapters for the primary and secondary DNS servers. The console then prompts you to provide the new IP address. • View DNS Configuration - The gateway local console displays the available adapters for the primary and secondary DNS servers. • Configure Hostname - The gateway local console prompts you to choose whether the gateway will use a static hostname that you specify, or if it will aquire a hostname automatically through DCHP or rDNS. Note If you choose to configure a static hostname for your gateway, you must create an A record in your DNS system that points the IP address of the gateway to its static hostname. • View Hostname Configuration - The gateway local console displays hostname, aquisition mode, domain, and Active Directory realm for your Amazon EC2 File Gateway. Shutting down your gateway VM You might need to shutdown or reboot your VM for maintenance, such as when applying a patch to your hypervisor. You shut down on-premises gateway VMs using your hypervisor interface, and Amazon EC2 instances using the Amazon EC2 console. Important If you stop and start an Amazon EC2 gateway that uses ephemeral storage, the gateway will be permanently offline. This happens because the physical storage disk is replaced. There is no work-around for this issue. The only resolution is to delete the gateway and activate a new one on a new EC2 instance. Shutting down your gateway VM API Version 2013-06-30 219 AWS Storage Gateway Amazon S3 File Gateway User Guide Replacing your existing
storagegateway-s3file-ug-084
storagegateway-s3file-ug.pdf
84
applying a patch to your hypervisor. You shut down on-premises gateway VMs using your hypervisor interface, and Amazon EC2 instances using the Amazon EC2 console. Important If you stop and start an Amazon EC2 gateway that uses ephemeral storage, the gateway will be permanently offline. This happens because the physical storage disk is replaced. There is no work-around for this issue. The only resolution is to delete the gateway and activate a new one on a new EC2 instance. Shutting down your gateway VM API Version 2013-06-30 219 AWS Storage Gateway Amazon S3 File Gateway User Guide Replacing your existing S3 File Gateway with a new instance You can replace an existing S3 File Gateway with a new instance as your data and performance needs grow, or if you receive an AWS notification to migrate your gateway. You might need to do this if you want to move your gateway to a better host platform or newer Amazon EC2 instances, or to refresh the underlying server hardware. There are two methods to replace an existing S3 File Gateway. The following table describes the benefits and drawbacks of each method. Using this information, select the method best suited for your gateway environment, then refer to the procedure steps in the corresponding section below. Note If you need to log into your new Storage Gateway's local console to complete either method, the default username is admin, and the default password is password. Cache disk data Method 1: Migrate cache disk and Gateway ID to Method 2: Replacement instance with empty cache replacement instance disk and new Gateway ID Data on the cache disk is preserved. This method is Data in cache is downloade d from the AWS cloud. This useful if your gateway has method is optimal for write- a large cache disk, or if your heavy workloads, if your applications are sensitive to applications can tolerate the the delay caused by out-of-ca che read operations. delay caused by out-of-cache reads. Down time Your gateway will be offline for 1-2 hours during the migration process. File shares are always available, but clients will experience short cutover downtime when switching from one file share to another during the transition to the new instance. Replacing your existing S3 File Gateway with a new instance API Version 2013-06-30 220 AWS Storage Gateway Amazon S3 File Gateway User Guide Method 1: Migrate cache disk and Gateway ID to Method 2: Replacement instance with empty cache replacement instance disk and new Gateway ID Note Writing to one Amazon S3 bucket from two file shares simultaneously is not supported, so all clients must be remapped from one share to the other simultaneously, rather than gradually. The new gateway inherits the Gateway ID from the gateway The existing gateway and replacement gateway have it replaces. separate, unique Gateway IDs. Gateway ID Note Migration can only be performed between gateways of the same type. For example, you cannot migrate settings or data from an FSx File Gateway to an S3 File Gateway. Method 1: Migrate cache disk and Gateway ID to replacement instance To migrate your S3 File Gateway's cache disk and Gateway ID to a replacement instance: 1. Stop any applications that are writing to the existing S3 File Gateway. 2. Verify that the CachePercentDirty metric on the Monitoring tab for the existing S3 File Gateway is 0. 3. Shut down the existing S3 File Gateway by powering off the host virtual machine (VM) using its hypervisor controls. Method 1: Migrate cache disk and Gateway ID to replacement instance API Version 2013-06-30 221 AWS Storage Gateway Amazon S3 File Gateway User Guide For more information about shutting down an Amazon EC2 instance, see Stop and start your instance in the Amazon EC2 User Guide. For more information about shutting down a KVM, VMware, or Hyper-V VM, see your hypervisor documentation. 4. Detach all disks, including the root disk and cache disks from the old gateway VM. Note Make a note of the root disk's volume ID, as well as the gateway ID associated with that root disk. You will need to detach this disk from the new Storage Gateway hypervisor in a later step. If you are using an Amazon EC2 instance as the VM for your S3 File Gateway, see Detach an Amazon EBS volume from a Windows instance or Detach an Amazon EBS volume from a Linux instance in the Amazon EC2 User Guide. For information about detaching disks from a KVM, VMware, or Hyper-V VM, see the documentation for your hypervisor. 5. Create a new AWS Storage Gateway hypervisor VM instance, but don't activate it as a gateway. In a later step, this new VM will assume the identity of the old gateway. For more information about creating a new Storage Gateway hypervisor VM, see Choosing
storagegateway-s3file-ug-085
storagegateway-s3file-ug.pdf
85
Amazon EC2 instance as the VM for your S3 File Gateway, see Detach an Amazon EBS volume from a Windows instance or Detach an Amazon EBS volume from a Linux instance in the Amazon EC2 User Guide. For information about detaching disks from a KVM, VMware, or Hyper-V VM, see the documentation for your hypervisor. 5. Create a new AWS Storage Gateway hypervisor VM instance, but don't activate it as a gateway. In a later step, this new VM will assume the identity of the old gateway. For more information about creating a new Storage Gateway hypervisor VM, see Choosing a Host Platform and Downloading the VM. Note Do not add cache disks for the new VM. This VM will use the same cache disks that were used by the old VM. 6. Configure your new Storage Gateway VM to use the same network settings as the old VM. The default network configuration for the gateway is Dynamic Host Configuration Protocol (DHCP). With DHCP, your gateway is automatically assigned an IP address. If you need to manually configure a static IP address for your gateway VM, see Configuring network parameters. Method 1: Migrate cache disk and Gateway ID to replacement instance API Version 2013-06-30 222 AWS Storage Gateway Amazon S3 File Gateway User Guide If your gateway VM must use a Socket Secure version 5 (SOCKS5) proxy to connect to the internet, see Routing your gateway deployed on EC2 through an HTTP proxy. 7. Start the new Storage Gateway VM. 8. Attach the disks that you detached from the old gateway VM to the new gateway VM. Do not detach the existing root disk from the new gateway VM. Note To migrate successfully, all disks must remain unchanged. Changing the disk size or other values causes inconsistencies in metadata that prevent successful migration. 9. Initiate the gateway migration process by connecting to the new VM with a URL that uses the following format: http://your-VM-IP-address/migrate?gatewayId=your-gateway-ID You can use the same IP address for the new gateway VM that you used for the old gateway VM. To use the same IP, delete the old gateway first and then proceed from step 5. Your URL should look similar to the following example: http://198.51.100.123/migrate?gatewayId=sgw-12345678 Use this URL from a browser, or from the command line using cURL. When the gateway migration initiates successfully, the following message appears: Successfully imported Storage Gateway information. Please refer to Storage Gateway documentation to perform the next steps to complete the migration. 10. Wait for the gateway status to show as Running in the AWS Storage Gateway console. Depending on available bandwidth, this can take up to 10 minutes. 11. Stop the new Storage Gateway VM. 12. Detach the old gateway's root disk, whose volume ID you noted previously, from the new gateway. 13. Start the new Storage Gateway VM. 14. If your gateway was joined to an Active Directory domain, re-join the domain. For instructions, see Using Active Directory to authenticate users. Method 1: Migrate cache disk and Gateway ID to replacement instance API Version 2013-06-30 223 AWS Storage Gateway Amazon S3 File Gateway User Guide Note You must complete this step even if the status of the S3 File Gateway appears as Joined. 15. Confirm that your shares are available at the new gateway VM's IP address, then delete the old gateway VM. Warning When a gateway is deleted, there is no way to recover it. For more information about deleting an Amazon EC2 instance, see Terminate your instance in the Amazon EC2 User Guide. For more information about deleting a KVM, VMware, or Hyper-V VM, see the documentation for your hypervisor. Method 2: Replacement instance with empty cache disk and new Gateway ID To set up a replacement S3 File Gateway instance with empty cache disk and new Gateway ID: 1. Stop any applications that are writing to the existing S3 File Gateway. Verify that the CachePercentDirty metric on the Monitoring tab is 0 before you set up file shares on the new gateway. 2. Use the AWS Command Line Interface (AWS CLI) to gather and save the configuration information about your existing S3 File Gateway and file shares by doing the following: a. Save the gateway configuration information for the S3 File Gateway. aws storagegateway describe-gateway-information --gateway-arn "arn:aws:storagegateway:us-east-2:123456789012:gateway/sgw-12A3456B" This command outputs a JSON block that contains metadata about the gateway, such as its name, network interfaces, configured time zone, and its state (whether the gateway is running). Method 2: Replacement instance with empty cache disk and new Gateway ID API Version 2013-06-30 224 AWS Storage Gateway Amazon S3 File Gateway User Guide b. Save the Server Message Block (SMB) settings of the S3 File Gateway. aws storagegateway describe-smb-settings --gateway-arn "arn:aws:storagegateway:us-east-2:123456789012:gateway/sgw-12A3456B" This command outputs a JSON block that contains metadata about the SMB file share, such
storagegateway-s3file-ug-086
storagegateway-s3file-ug.pdf
86
gateway configuration information for the S3 File Gateway. aws storagegateway describe-gateway-information --gateway-arn "arn:aws:storagegateway:us-east-2:123456789012:gateway/sgw-12A3456B" This command outputs a JSON block that contains metadata about the gateway, such as its name, network interfaces, configured time zone, and its state (whether the gateway is running). Method 2: Replacement instance with empty cache disk and new Gateway ID API Version 2013-06-30 224 AWS Storage Gateway Amazon S3 File Gateway User Guide b. Save the Server Message Block (SMB) settings of the S3 File Gateway. aws storagegateway describe-smb-settings --gateway-arn "arn:aws:storagegateway:us-east-2:123456789012:gateway/sgw-12A3456B" This command outputs a JSON block that contains metadata about the SMB file share, such as its domain name, Microsoft Active Directory status, whether the guest password is set, and the type of security strategy. c. Save file share information for each SMB and Network File System (NFS) file share of the S3 File Gateway: • Use the following command for SMB file shares. aws storagegateway describe-smb-file-shares --file-share-arn-list "arn:aws:storagegateway:us-east-2:123456789012:share/share-987A654B" This command outputs a JSON block that contains metadata about the SMB file share, such as its name, storage class, status, IAM role Amazon Resource Name (ARN), a list of clients that are allowed to access the S3 File Gateway, and the path used by the SMB client to identify the mount point. • Use the following command for NFS file shares. aws storagegateway describe-nfs-file-shares --file-share-arn-list "arn:aws:storagegateway:us-east-2:123456789012:share/share-321A978B" This command outputs a JSON block that contains metadata about the NFS file share, such as its name, storage class, status, IAM role ARN, a list of clients that are allowed to access the S3 File Gateway, and the path used by the NFS client to identify the mount point. 3. Create a new S3 File Gateway with the same settings and configuration as the old gateway. If necessary, refer to the information you saved in Step 2. 4. Create new file shares for the new gateway with the same settings and configuration as the file shares that were configured on the old gateway. If necessary, refer to the information you saved in Step 2. 5. Confirm that your new gateway is working correctly, then remap/cut-over your clients from the old file shares to the new file shares in the manner that best suits your environment. Method 2: Replacement instance with empty cache disk and new Gateway ID API Version 2013-06-30 225 AWS Storage Gateway Amazon S3 File Gateway User Guide 6. Confirm that your new gateway is working correctly, then delete the old gateway from the Storage Gateway console. Important Before you delete an S3 File Gateway, make sure that there are no applications currently writing to that gateway's cache. If you delete a gateway while it is in use, data loss can occur. Warning When a gateway is deleted, there is no way to recover it. 7. Delete the old gateway VM or Amazon EC2 instance. Deleting your gateway and removing associated resources If you don't plan to continue using your gateway, consider deleting the gateway and its associated resources. Removing resources avoids incurring charges for resources you don't plan to continue using and helps reduce your monthly bill. When you delete a gateway, it no longer appears on the AWS Storage Gateway Management Console and its file share connections are closed. The procedure for deleting a gateway is the same for all gateway types; however, depending on the type of gateway you want to delete and the host it is deployed on, you follow specific instructions to remove associated resources. You can delete a gateway using the Storage Gateway console or programmatically. You can find information following about how to delete a gateway using the Storage Gateway console. If you want to programmatically delete your gateway, see AWS Storage Gateway API Reference. Deleting Your Gateway by Using the Storage Gateway Console The procedure for deleting a gateway is the same for all gateway types. However, depending on the type of gateway you want to delete and the host the gateway is deployed on, you might have to perform additional tasks to remove resources associated with the gateway. Removing these resources helps you avoid paying for resources you don't plan to use. Deleting your gateway and removing resources API Version 2013-06-30 226 AWS Storage Gateway Amazon S3 File Gateway User Guide Note For gateways deployed on an Amazon EC2 instance, the instance continues to exist until you delete it. For gateways deployed on a virtual machine (VM), after you delete your gateway the gateway VM still exists in your virtualization environment. To remove the VM, use the VMware vSphere client, Microsoft Hyper-V Manager, or Linux Kernel-based Virtual Machine (KVM) client to connect to the host and remove the VM. Note that you can't reuse the deleted gateway's VM to activate a new gateway. To delete a gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2.
storagegateway-s3file-ug-087
storagegateway-s3file-ug.pdf
87
File Gateway User Guide Note For gateways deployed on an Amazon EC2 instance, the instance continues to exist until you delete it. For gateways deployed on a virtual machine (VM), after you delete your gateway the gateway VM still exists in your virtualization environment. To remove the VM, use the VMware vSphere client, Microsoft Hyper-V Manager, or Linux Kernel-based Virtual Machine (KVM) client to connect to the host and remove the VM. Note that you can't reuse the deleted gateway's VM to activate a new gateway. To delete a gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways, then select one or more gateways to delete. 3. For Actions, choose Delete gateway. The confirmation dialog box appears. Warning Before you do this step, make sure that there are no applications currently writing to the gateway's volumes. If you delete the gateway while it is in use, data loss can occur. When a gateway is deleted, there is no way to get it back. 4. Verify that you want to delete the specified gateways, then type the word delete in the confirmation box, and choose Delete. 5. (Optional) If you want to provide feedback about your deleted gateway, complete the feedback dialog box, then choose Submit. Otherwise, choose Skip. Important You no longer pay software charges after you delete a gateway, but resources such as Amazon S3 bucket and Amazon EC2 instances persist. You can remove the gateway Amazon EC2 instance after the file gateway is removed. If you don't need the data in Amazon S3 buckets associated with the file shares, you can choose to remove your Amazon S3 buckets. For instructions, see Deleting your bucket. Deleting Your Gateway by Using the Storage Gateway Console API Version 2013-06-30 227 AWS Storage Gateway Amazon S3 File Gateway User Guide Performance and optimization This section describes guidance and best practices for optimizing File Gateway performance. Topics • Basic performance guidance for S3 File Gateway • Performance guidance for gateways with multiple file shares • Maximizing S3 File Gateway throughput Basic performance guidance for S3 File Gateway In this section, you can find guidance for provisioning hardware for your S3 File Gateway VM. The instance configurations that are listed in the table are examples, and are provided for reference. For best performance, the cache disk size must be tuned to the size of the active working set. Using multiple local disks for the cache increases write performance by parallelizing access to data and leads to higher IOPS. Note We don't recommend using ephemeral storage. For information about using ephemeral storage, see Using ephemeral storage with EC2 gateways. For Amazon EC2 instances, if you have more than 5 million objects in your S3 bucket and you are using a General Purposes SSD volume, a minimum root EBS volume of 350 GiB is needed for acceptable performance of your gateway during start up. For information about how to increase your volume size, see Modifying an EBS volume using elastic volumes (console). The suggested size limit for individual directories in the file shares that you connect to File Gateway is 10,000 files per directory. You can use File Gateway with directories that have more than 10,000 files, but performance might be impacted. In the following tables, cache hit read operations are reads from the file shares that are served from cache. Cache miss read operations are reads from the file shares that are served from Amazon S3. Basic performance guidance for S3 File Gateway API Version 2013-06-30 228 AWS Storage Gateway Amazon S3 File Gateway User Guide The following tables show example S3 File Gateway configurations. S3 File Gateway performance on Linux clients Example Configurations Protocol Write throughput (file Cache hit read throughput Cache miss read throughput sizes 1 GB) Root disk: 80 GB, io1 SSD, 4,000 IOPS Cache disk: 512 GiB cache, io1, 1,500 provision ed IOPS Minimum network performance: 10 Gbps CPU: 16 vCPU | RAM: 32 GB NFS protocol recommended for Linux Storage Gateway Hardware Appliance Minimum network performance: 10 Gbps NFSv3 - 1 thread 110 MiB/sec (0.92 Gbps) 590 MiB/sec (4.9 Gbps) 310 MiB/sec (2.6 Gbps) NFSv3 - 8 threads 160 MiB/sec (1.3 Gbps) 590 MiB/sec (4.9 Gbps) 335 MiB/sec (2.8 Gbps) NFSv4 - 1 thread 130 MiB/sec (1.1 Gbps) 590 MiB/sec (4.9 Gbps) 295 MiB/sec (2.5 Gbps) NFSv4 - 8 threads SMBV3 - 1 thread SMBV3 - 8 threads 160 MiB/sec (1.3 Gbps) 590 MiB/sec (4.9 Gbps) 335 MiB/sec (2.8 Gbps) 115 MiB/sec (1.0 Gbps) 325 MiB/sec (2.7 Gbps) 255 MiB/sec (2.1 Gbps) 190 MiB/sec (1.6 Gbps) 590 MiB/sec (4.9 Gbps) 335 MiB/sec (2.8 Gbps) NFSv3 - 1 thread 265 MiB/sec (2.2 Gbps) 590 MiB/sec (4.9 Gbps) 310 MiB/sec (2.6 Gbps) NFSv3 - 8 threads 385 MiB/sec (3.1 Gbps) 590 MiB/sec (4.9 Gbps) 335 MiB/sec (2.8 Gbps)
storagegateway-s3file-ug-088
storagegateway-s3file-ug.pdf
88
335 MiB/sec (2.8 Gbps) NFSv4 - 1 thread 130 MiB/sec (1.1 Gbps) 590 MiB/sec (4.9 Gbps) 295 MiB/sec (2.5 Gbps) NFSv4 - 8 threads SMBV3 - 1 thread SMBV3 - 8 threads 160 MiB/sec (1.3 Gbps) 590 MiB/sec (4.9 Gbps) 335 MiB/sec (2.8 Gbps) 115 MiB/sec (1.0 Gbps) 325 MiB/sec (2.7 Gbps) 255 MiB/sec (2.1 Gbps) 190 MiB/sec (1.6 Gbps) 590 MiB/sec (4.9 Gbps) 335 MiB/sec (2.8 Gbps) NFSv3 - 1 thread 265 MiB/sec (2.2 Gbps) 590 MiB/sec (4.9 Gbps) 310 MiB/sec (2.6 Gbps) NFSv3 - 8 threads 385 MiB/sec (3.1 Gbps) 590 MiB/sec (4.9 Gbps) 335 MiB/sec (2.8 Gbps) NFSv4 - 1 thread 310 MiB/sec (2.6 Gbps) 590 MiB/sec (4.9 Gbps) 295 MiB/sec (2.5 Gbps) S3 File Gateway performance on Linux clients API Version 2013-06-30 229 AWS Storage Gateway Amazon S3 File Gateway User Guide Example Configurations Protocol Write throughput (file Cache hit read throughput Cache miss read throughput sizes 1 GB) NFSv4 - 8 threads SMBV3 - 1 thread SMBV3 - 8 threads 385 MiB/sec (3.1 Gbps) 590 MiB/sec (4.9 Gbps) 335 MiB/sec (2.8 Gbps) 275 MiB/sec (2.4 Gbps) 325 MiB/sec (2.7 Gbps) 255 MiB/sec (2.1 Gbps) 455 MiB/sec (3.8 Gbps) 590 MiB/sec (4.9 Gbps) 335 MiB/sec (2.8 Gbps) NFSv3 - 1 thread 300 MiB/sec (2.5 Gbps) 590 MiB/sec (4.9 Gbps) 325 MiB/sec (2.7 Gbps) NFSv3 - 8 threads 585 MiB/sec (4.9 Gbps) 590 MiB/sec (4.9 Gbps) 580 MiB/sec (4.8 Gbps) NFSv4 - 1 thread 355 MiB/sec (3.0 Gbps) 590 MiB/sec (4.9 Gbps) 340 MiB/sec (2.9 Gbps) NFSv4 - 8 threads SMBV3 - 1 thread SMBV3 - 8 threads 575 MiB/sec (4.8 Gbps) 590 MiB/sec (4.9 Gbps) 575 MiB/sec (4.8 Gbps) 230 MiB/sec (1.9 Gbps) 325 MiB/sec (2.7 Gbps) 245 MiB/sec (2.0 Gbps) 585 MiB/sec (4.9 Gbps) 590 MiB/sec (4.9 Gbps) 580 MiB/sec (4.8 Gbps) Root disk: 80 GB, io1 SSD, 4,000 IOPS Cache disk: 4 x 2 TB NVME cache disks Minimum network performance: 10 Gbps CPU: 32 vCPU | RAM: 244 GB NFS protocol recommended for Linux S3 File Gateway performance on Linux clients API Version 2013-06-30 230 AWS Storage Gateway Amazon S3 File Gateway User Guide File Gateway performance on Windows clients Example Configurations Protocol Write throughput (file Cache hit read throughput Cache miss read throughput sizes 1 GB) Root disk: 80 GB, io1 SSD, 4,000 SMBV3 - 1 thread 150 MiB/sec (1.3 Gbps) 180 MiB/sec (1.5 Gbps) 20 MiB/sec (0.2 Gbps) IOPS Cache disk: 512 GiB cache, io1, 1,500 provisioned IOPS Minimum network performance: 10 Gbps CPU: 16 vCPU | RAM: 32 GB SMB protocol recommended for Windows Storage Gateway Hardware Appliance Minimum network performance: 10 Gbps SMBV3 - 8 threads 190 MiB/sec (1.6 Gbps) 335 MiB/sec (2.8 Gbps) 195 MiB/sec (1.6 Gbps) NFSv3 - 1 thread NFSv3 - 8 threads 95 MiB/sec (0.8 Gbps) 130 MiB/sec (1.1 Gbps) 20 MiB/sec (0.2 Gbps) 190 MiB/sec (1.6 Gbps) 330 MiB/sec (2.8 Gbps) 190 MiB/sec (1.6 Gbps) SMBV3 - 1 thread SMBV3 - 8 threads NFSv3 - 1 thread NFSv3 - 8 threads 230 MiB/sec (1.9 Gbps) 255 MiB/sec (2.1 Gbps) 20 MiB/sec (0.2 Gbps) 835 MiB/sec (7.0 Gbps) 475 MiB/sec (4.0 Gbps) 195 MiB/sec (1.6 Gbps) 135 MiB/sec (1.1 Gbps) 185 MiB/sec (1.6 Gbps) 20 MiB/sec (0.2 Gbps) 545 MiB/sec (4.6 Gbps) 470 MiB/sec (4.0 Gbps) 190 MiB/sec (1.6 Gbps) File Gateway performance on Windows clients API Version 2013-06-30 231 AWS Storage Gateway Amazon S3 File Gateway User Guide Example Configurations Protocol Write throughput (file Cache hit read throughput Cache miss read throughput sizes 1 GB) Root disk: 80 GB, io1 SSD, 4,000 SMBV3 - 1 thread 230 MiB/sec (1.9 Gbps) 265 MiB/sec (2.2 Gbps) 30 MiB/sec (0.3 Gbps) SMBV3 - 8 threads 835 MiB/sec (7.0 Gbps) 780 MiB/sec (6.5 Gbps) 250 MiB/sec (2.1 Gbps) NFSv3 - 1 thread NFSv3 - 8 threads 135 MiB/sec (1.1. Gbps) 220 MiB/sec (1.8 Gbps) 30 MiB/sec (0.3 Gbps) 545 MiB/sec (4.6 Gbps) 570 MiB/sec (4.8 Gbps) 240 MiB/sec (2.0 Gbps) IOPS Cache disk: 4 x 2 TB NVME cache disks Minimum network performance: 10 Gbps CPU: 32 vCPU | RAM: 244 GB SMB protocol recommended for Windows Note Your performance might vary based on your host platform configuration and network bandwidth. Write throughput performance decreases with file size, with the highest achievable throughput for small files (less than 32MiB) being 16 files per second. Performance guidance for gateways with multiple file shares Amazon S3 File Gateway supports attaching up to 50 file shares to a single Storage Gateway appliance. By adding multiple file shares per gateway, you can support more users and workloads while managing fewer gateways and virtual hardware resources. In addition to other factors, the number of file shares managed by a gateway can affect that gateway's performance. This section Performance guidance for gateways with multiple file shares API Version 2013-06-30 232 AWS Storage Gateway Amazon
storagegateway-s3file-ug-089
storagegateway-s3file-ug.pdf
89
with the highest achievable throughput for small files (less than 32MiB) being 16 files per second. Performance guidance for gateways with multiple file shares Amazon S3 File Gateway supports attaching up to 50 file shares to a single Storage Gateway appliance. By adding multiple file shares per gateway, you can support more users and workloads while managing fewer gateways and virtual hardware resources. In addition to other factors, the number of file shares managed by a gateway can affect that gateway's performance. This section Performance guidance for gateways with multiple file shares API Version 2013-06-30 232 AWS Storage Gateway Amazon S3 File Gateway User Guide describes how gateway performance is expected to change depending on the number of attached file shares and recommends virtual hardware configurations to optimize performance for gateways that manage multiple shares. In general, increasing the number of file shares managed by a single Storage Gateway can have the following consequences: • Increased time required to restart the gateway. • Increased utilization of virtual hardware resources such as vCPU and RAM. • Decreased performance for data and metadata operations if virtual hardware resources become saturated. The following table lists recommended virtual hardware configurations for gateways that manage multiple file shares: File Shares Per Recommend ed Recommend ed vCPU Recommend ed RAM Recommend ed Disk Gateway Cores Size Gateway Capacity Setting 1-10 Small 10-20 Medium 20+ Large 4 (EC2 instance type m4.xlarge or greater) 8 (EC2 instance type m4.2xlarg e or greater) 16 (EC2 instance 16 GiB 80 GiB 32 GiB 160 GiB 64 GiB 240 GiB Performance guidance for gateways with multiple file shares API Version 2013-06-30 233 AWS Storage Gateway Amazon S3 File Gateway User Guide File Shares Per Recommend ed Recommend ed vCPU Recommend ed RAM Recommend ed Disk Gateway Cores Size Gateway Capacity Setting type m4.4xlarg e or greater) In addition to the virtual hardware configurations recommended above, we recommend the following best practices for configuring and maintaining Storage Gateway appliances that manage multiple file shares: • Consider that the relationship between the number of file shares and the demand placed on the gateway's virtual hardware is not necessarily linear. Some file shares might generate more throughput, and therefore more hardware demand than others. The recommendations in the preceding table are based on maximum hardware capacities and various file share throughput levels. • If you find that adding multiple file shares to a single gateway reduces performance, consider moving the most active file shares to other gateways. In particular, if a file share is used for a very-high-throughput application, consider creating a separate gateway for that file share. • We do not recommend configuring one gateway for multiple high-throughput applications and another for multiple low-throughput applications. Instead, try to spread high and low throughput file shares evenly across gateways to balance hardware saturation. To measure your file share throughput, use the ReadBytes and WriteBytes metrics. For more information, see Understanding file share metrics. Maximizing S3 File Gateway throughput The the following sections describe best practices for maximizing throughput between your NFS and SMB clients, S3 File Gateway, and Amazon S3. The guidance provided in each section contributes incrementally to improving overall throughput. While none of these recommendations are required, and they are not interdependent, they have been selected and ordered in a logical way that Support uses to test and tune S3 File Gateway implementations. As you implement and Maximizing S3 File Gateway throughput API Version 2013-06-30 234 AWS Storage Gateway Amazon S3 File Gateway User Guide test these suggestions, keep in mind that each S3 File Gateway deployment is unique, so your results may vary. S3 File Gateway provides a file interface to store and retrieve Amazon S3 objects using industry- standard NFS or SMB file protocols, with a native 1:1 mapping between file and object. You deploy S3 File Gateway as a virtual machine either on-premises in your VMware, Microsoft Hyper-V, or Linux KVM environment, or in the AWS cloud as an Amazon EC2 instance. S3 File Gateway is not designed to act as a full enterprise NAS replacement. S3 File Gateway emulates a file system, but it is not a file system. Using Amazon S3 as durable backend storage creates additional overhead on each I/O operation, so evaluating S3 File Gateway performance against an existing NAS or file server is not an equivalent comparison. Deploy your gateway in the same location as your clients We recommend deploying your S3 File Gateway virtual appliance in a physical location with as little network latency as possible between it and your NFS or SMB clients. When choosing a location for your gateway, consider the following: • Lower network latency to the gateway can help improve performance of NFS or SMB clients. • S3 File Gateway is designed to tolerate higher network latency between the
storagegateway-s3file-ug-090
storagegateway-s3file-ug.pdf
90
overhead on each I/O operation, so evaluating S3 File Gateway performance against an existing NAS or file server is not an equivalent comparison. Deploy your gateway in the same location as your clients We recommend deploying your S3 File Gateway virtual appliance in a physical location with as little network latency as possible between it and your NFS or SMB clients. When choosing a location for your gateway, consider the following: • Lower network latency to the gateway can help improve performance of NFS or SMB clients. • S3 File Gateway is designed to tolerate higher network latency between the gateway and Amazon S3 than between the gateway and the clients. • For S3 File Gateway instances deployed in Amazon EC2, we recommend keeping the gateway and NFS or SMB clients in the same placement group. For more information, see Placement groups for your Amazon EC2 instances in the Amazon Elastic Compute Cloud User Guide. Reduce bottlenecks caused by slow disks We recommend monitoring the IoWaitPercent CloudWatch metric to identify performance bottlenecks that can result from slow storage disks on your S3 File Gateway. When attempting to optimize disk-related performance issues, consider the following: • IoWaitPercent reports the percentage of time that the CPU is waiting for a response from the root or cache disks. • When IoWaitPercent is greater than 5-10%, this usually indicates a gateway performance bottleneck caused by underperforming disks. This metric should be as close to 0% as possible - meaning that the gateway is never waiting on the disk - which helps to optimize CPU resources. Deploy your gateway in the same location as your clients API Version 2013-06-30 235 AWS Storage Gateway Amazon S3 File Gateway User Guide • You can check IoWaitPercent on the Monitoring tab of the Storage Gateway console, or configure recommended CloudWatch alarms to notify you automatically if the metric spikes above a specific threshold. For more information, see Creating recommended CloudWatch alarms for your gateway. • We recommend using either NVMe or SSD for your gateway's root and cache disks to minimize IoWaitPercent. Adjust virtual machine resource allocation for CPU, RAM, and cache disks When attempting to optimize throughput for your S3 File Gateway, it is important to allocate sufficient resources to the gateway VM, including CPU, RAM, and cache disks. The minimum virtual resource requirements of 4 CPUs, 16GB RAM, and 150GB cache storage are typically only suitable for smaller workloads. When allocating virtual resources for larger workloads, we recommend the following: • Increase the allocated number of CPUs to between 16 and 48, depending on the typical CPU usage generated by your S3 File Gateway. You can monitor CPU usage using the UserCpuPercent metric. For more information, see Understanding gateway metrics. • Increase the allocated RAM to between 32 and 64 GB. Note S3 File Gateway cannot utilize more than 64 GB of RAM. • Use NVMe or SSD for root disks and cache disk, and size your cache disks to align with the peak working data set that you plan to write to the gateway. For more information, see S3 File Gateway cache sizing best practices on the official Amazon Web Services YouTube channel. • Add at least 4 virtual cache disks to the gateway, rather than using a single large disk. Multiple virtual disks can improve performance even if they share the same underlying physical disk, but improvements are typically greater when the virtual disks are located on different underlying physical disks. For example, if you want to deploy 12TB of cache, you could use one of the following configurations: • 4 x 3 TB cache disks Adjust virtual machine resource allocation for CPU, RAM, and cache disks API Version 2013-06-30 236 AWS Storage Gateway Amazon S3 File Gateway User Guide • 8 x 1.5 TB cache disks • 12 x 1 TB cache disks In addition to performance, this allows for more efficient management of the virtual machine over time. As your workload changes, you can incrementally increase the number of cache disks and your overall cache capacity, while maintaining the original size of each individual virtual disk to preserve gateway integrity. For more information, see Deciding the amount of local disk storage. When deploying S3 File Gateway as an Amazon EC2 instance, consider the following: • The instance type you choose can significantly impact gateway performance. Amazon EC2 provides broad flexibility for adjusting the resource allocation for your S3 File Gateway instance. • For recommended Amazon EC2 instance types for S3 File Gateway, see Requirements for Amazon EC2 instance types. • You can change the Amazon EC2 instance type that hosts an active S3 File Gateway. This allows you to easily adjust the Amazon EC2 hardware generation and resource allocation to find an ideal price-to-performance ratio. To change the instance type, use the
storagegateway-s3file-ug-091
storagegateway-s3file-ug.pdf
91
deploying S3 File Gateway as an Amazon EC2 instance, consider the following: • The instance type you choose can significantly impact gateway performance. Amazon EC2 provides broad flexibility for adjusting the resource allocation for your S3 File Gateway instance. • For recommended Amazon EC2 instance types for S3 File Gateway, see Requirements for Amazon EC2 instance types. • You can change the Amazon EC2 instance type that hosts an active S3 File Gateway. This allows you to easily adjust the Amazon EC2 hardware generation and resource allocation to find an ideal price-to-performance ratio. To change the instance type, use the following procedure in the Amazon EC2 console: 1. Stop the Amazon EC2 instance. 2. Change the Amazon EC2 instance type. 3. Power on the Amazon EC2 instance. Note Stopping an instance that hosts an S3 File Gateway will temporarily disrupt file share access. Make sure to schedule a maintenance window if necessary. • The price-to-performance ratio of an Amazon EC2 instance refers to how much computing power you get for the price you pay. Typically, newer generation Amazon EC2 instances offer the best price-to-performance ratio, with newer hardware and improved performance at a relatively lower cost compared to older generations. Factors such as instance type, region, and usage patterns impact this ratio, so it is important to select the right instance for your specific workload to optimize cost-effectiveness. Adjust virtual machine resource allocation for CPU, RAM, and cache disks API Version 2013-06-30 237 AWS Storage Gateway Amazon S3 File Gateway User Guide Adjust the SMB security level The SMBv3 protocol allows for both SMB signing and SMB encryption, which have some trade- offs in performance and security. To optimize throughput, you can adjust your gateway's SMB security level to specify which of these security features are enforced for client connections. For more information, see Set a security level for your gateway. When adjusting the SMB security level, consider the following: • The default security level for S3 File Gateway is Enforce encryption. This setting enforces both encryption and signing for SMB client connections to gateway file shares, meaning that all traffic from the client to the gateway is encrypted. This setting does not affect traffic from the gateway to AWS, which is always encrypted. The gateway limits each encrypted client connection to a single vCPU. For example, if you have only 1 encrypted client, then that client will be limited to only 1 vCPU, even if 4 or more vCPUs are allocated to the gateway. Because of this, throughput for encrypted connections from a single client to S3 File Gateway is typically bottlenecked between 40-60 MB/s. • If your security requirements allow for a more relaxed posture, you can change the security level to Client negotiated, which will disable SMB encryption and enforce SMB signing only. With this setting, client connections to the gateway can utilize multiple vCPUs, which typically results in increased throughput performance. Note After you change the SMB security level for your S3 File Gateway, you must wait for the file share status to change from Updating to Available in the Storage Gateway console, and then disconnect and reconnect your SMB clients for the new setting to take effect. Use multiple threads and clients to parallelize write operations It is difficult to achieve maximum throughput performance with an S3 File Gateway that uses only one NFS or SMB client to write one file at a time, because sequential writing from a single client is a single-threaded operation. Instead, we recommend using multiple threads from each NFS or SMB client to write multiple files in parallel, and using multiple NFS or SMB clients simultaneously to your S3 File Gateway to maximize the gateway throughput. Adjust the SMB security level API Version 2013-06-30 238 AWS Storage Gateway Amazon S3 File Gateway User Guide Using multiple threads can significantly improve performance. However, using more threads requires more system resources, which can negatively impact performance if the gateway is not sized to meet the increased load. In a typical deployment, you can expect to achieve better throughput performance as you add more threads and clients, until you reach the maximum hardware and bandwidth limitations for your gateway. We recommend experimenting with different thread counts to find the optimal balance between speed and system resource usage for your specific hardware and network configuration. Consider the following information about common tools that can help you test your thread and client configuration: • You can test multithreaded write performance by using tools such as robocopy to copy a set of files to a file share on your gateway. By default, robocopy uses 8 threads when copying files, but you can specify up to 128 threads. To use multiple threads with robocopy, add the /MT:n switch to your command, where n is the number of
storagegateway-s3file-ug-092
storagegateway-s3file-ug.pdf
92
different thread counts to find the optimal balance between speed and system resource usage for your specific hardware and network configuration. Consider the following information about common tools that can help you test your thread and client configuration: • You can test multithreaded write performance by using tools such as robocopy to copy a set of files to a file share on your gateway. By default, robocopy uses 8 threads when copying files, but you can specify up to 128 threads. To use multiple threads with robocopy, add the /MT:n switch to your command, where n is the number of threads you want to use. For example: robocopy C:\source D:\destination /MT:64 This command will use 64 threads for the copy operation. Note We don't recommend using Windows Explorer to drag and drop files when testing for maximum throughput, as this method is limited to a single thread and copies the files sequentially. For more information, see robocopy on the Microsoft Learn website. • You can also conduct tests using common storage benchmarking tools such as DISKSPD, or FIO. These tools have options to adjust the number of threads, I/O depth, and other parameters to match your specific workload requirements. DiskSpd allows you to control the number of threads using the -t parameter. For example: diskspd -c10G -d300 -r -w50 -t64 -o32 -b1M -h -L C:\testfile.dat This example command does the following: Use multiple threads and clients to parallelize write operations API Version 2013-06-30 239 AWS Storage Gateway Amazon S3 File Gateway User Guide • Creates a 10GB test file (-c1G) • Runs for 300 seconds (-d300) • Performs random I/O test with 50% reads 50% writes (-r -w50) • Uses 64 threads (-t64) • Sets queue depth to 32 per thread (-o32) • Uses 1MB block size (-b1M) • Disables hardware and software caching (-h -L) For more information, see Use DISKSPD to test workload storage performance on the Microsoft Learn website. • FIO uses the numjobs parameter to control the number of parallel threads. For example: fio --name=mixed_test --rw=randrw --rwmixread=70 --bs=1M -- iodepth=64 --size=10G --runtime=300 --numjobs=64 --ioengine=libaio --direct=1 -- group_reporting This example command does the following: • Performs random I/O test (--rw=randrw) • Performs 70% reads and 30% writes (--rwmixread=70) • Uses 1MB block size (--bs=1M) • Sets I/O depth to 64 (--iodepth=64) • Tests on a 10 GB file (--size=10G) • Runs for 5 minutes (--runtime=300) • Creates 64 parallel jobs (threads) (--numjobs=64) • Uses asynchronous I/O engine (--ioengine=libaio) • Groups results for easier analysis (--group_reporting) For more information, see the fio Linux man page. • Turn off automated cache refresh The automated cache refresh feature allows your S3 File Gateway to refresh its metadata automatically, which can help capture any changes that users or applications make to your file Turn off automated cache refresh API Version 2013-06-30 240 AWS Storage Gateway Amazon S3 File Gateway User Guide set by writing to the Amazon S3 bucket directly, rather than through the gateway. For more information, see Refreshing Amazon S3 bucket object cache. To optimize gateway throughput, we recommend turning this feature off in deployments where all reads and writes to the Amazon S3 bucket will be performed through your S3 File Gateway. When configuring automated cache refresh, consider the following: • If you need to use automated cache refresh because users or applications in your deployment do occasionally write to Amazon S3 directly, then we recommend configuring the longest possible time interval between refreshes that is still practical for your business needs. A longer cache refresh interval helps reduce the number of metadata operations that the gateway needs to perform when browsing directories or modifying files. For example: set automated cache refresh to 24 hours, rather than 5 minutes, if that is tolerable for your workload. • The minimum time interval is 5 minutes. The maximum interval is 30 days. • If you choose to set a very short cache refresh interval, we recommend testing the directory browsing experience for your NFS and SMB clients. The time it takes to refresh the gateway cache can increase substantially depending on the number of files and subdirectories in your Amazon S3 bucket. Increase the number of Amazon S3 uploader threads By default, S3 File Gateway opens 8 threads for Amazon S3 data upload, which provides sufficient upload capacity for most typical deployments. However, it is possible for a gateway to receive data from NFS and SMB clients at a higher rate than it can upload to Amazon S3 with the standard 8 thread capacity, which can cause the local cache to reach its storage limit. In specific circumstances, Support can increase the Amazon S3 upload thread pool count for your gateway from 8 to 40, which allows more data to be uploaded in parallel. Depending on bandwidth and other factors
storagegateway-s3file-ug-093
storagegateway-s3file-ug.pdf
93
By default, S3 File Gateway opens 8 threads for Amazon S3 data upload, which provides sufficient upload capacity for most typical deployments. However, it is possible for a gateway to receive data from NFS and SMB clients at a higher rate than it can upload to Amazon S3 with the standard 8 thread capacity, which can cause the local cache to reach its storage limit. In specific circumstances, Support can increase the Amazon S3 upload thread pool count for your gateway from 8 to 40, which allows more data to be uploaded in parallel. Depending on bandwidth and other factors specific to your deployment, this can significantly increase upload performance and help reduce the amount of cache storage needed to support your workload. We recommend using the CachePercentDirty CloudWatch metric to monitor the amount of data stored on the local gateway cache disks that has not yet been uploaded to Amazon S3, and contacting Support to help determine if increasing the upload thread pool count might improve throughput for your S3 File Gateway. For more information, see Understanding gateway metrics. Increase the number of Amazon S3 uploader threads API Version 2013-06-30 241 AWS Storage Gateway Amazon S3 File Gateway User Guide Note This setting consumes additional gateway CPU resources. We recommend monitoring gateway CPU usage and increasing allocated CPU resources if necessary. Increase SMB timeout settings When S3 File Gateway copies large files to an SMB file share, the SMB client connection can timeout after an extended period of time. We recommend extending the SMB session timeout setting for your SMB clients to 20 minutes or more, depending on the size of the files and the write speed of your gateway. The default is 300 seconds, or 5 minutes. For more information, see Your gateway backup job fails or there are errors when writing to your gateway. Turn on opportunistic locking for compatible applications Opportunistic locking, or "oplocks", is enabled by default for each new S3 File Gateway. When using oplocks with compatible applications, the client batches multiple smaller operations into larger ones, which is more efficient for the client, the gateway, and the network. We recommend keeping opportunistic locking turned on if you use applications that leverage client-side local caching, such as Microsoft Office, Adobe Suite, and many others, because it can significanty improve performance. If you turn opportunistic locking off, applications that support oplocks will typically open large files (50 MB or larger) much more slowly. This delay occurs because the gateway sends data in 4 KB parts, which results in high I/O and low throughput. Adjust gateway capacity according to the size of the working file set The gateway capacity parameter specifies the maximum number of files for which your gateway will store metadata in its local cache. By default, gateway capacity is set to Small, which means the gateway stores metadata for up to 5 million files. The default setting works well for most workloads, even if there are hundreds of millions, or even billions of objects in Amazon S3, because only a small subset of files are actively accessed at a given time in a typical deployment. This group of files is referred to as the "working set". Increase SMB timeout settings API Version 2013-06-30 242 AWS Storage Gateway Amazon S3 File Gateway User Guide If your workload regularly accesses a working set of files greater than 5 million, then your gateway will need to perform frequent cache evictions, which are small I/O operations that are stored in RAM and persisted on the root disk. This can negatively impact gateway performance as the gateway fetches fresh data from Amazon S3. You can monitor the IndexEvictions metric to determine the number of files whose metadata was evicted from the cache to make room for new entries. For more information, see Understanding gateway metrics. We recommend using the UpdateGatewayInformation API action to increase the gateway capacity to correspond with the number of files in your typical working set. For more information, see UpdateGatewayInformation. Note Increasing the gateway capacity requires additional RAM and root disk capacity. • Small (5 million files) requires at least 16 GB of RAM and 80 GB root disk. • Medium (10 million files) requires at least 32 GB of RAM and 160 GB root disk. • Large (20 million files) requires 64 GB of RAM and 240 GB root disk. Important Gateway capacity cannot be decreased. Deploy multiple gateways for larger workloads We recommend splitting your workload across multiple gateways when possible, rather than consolidating many file shares on a single large gateway. For example, you could isolate one heavily-used file share on one gateway, while grouping the less frequently used file shares together on another gateway. When planning a deployment with multiple gateways and file shares, consider the following: • The maximum
storagegateway-s3file-ug-094
storagegateway-s3file-ug.pdf
94
requires at least 32 GB of RAM and 160 GB root disk. • Large (20 million files) requires 64 GB of RAM and 240 GB root disk. Important Gateway capacity cannot be decreased. Deploy multiple gateways for larger workloads We recommend splitting your workload across multiple gateways when possible, rather than consolidating many file shares on a single large gateway. For example, you could isolate one heavily-used file share on one gateway, while grouping the less frequently used file shares together on another gateway. When planning a deployment with multiple gateways and file shares, consider the following: • The maximum number of file shares on a single gateway is 50, but the number of file shares managed by a gateway can impact the gateway's performance. For more information, see Performance guidance for gateways with multiple file shares. Deploy multiple gateways for larger workloads API Version 2013-06-30 243 AWS Storage Gateway Amazon S3 File Gateway User Guide • Resources on each S3 File Gateway are shared across all file shares, without partitioning. • A single file share with heavy usage can impact the performance of other file shares on the gateway. Note We do not recommended creating multiple file shares that are mapped to the same Amazon S3 location from multiple gateways, unless at least one of them is read-only. Simultaneous writes to the same file from multiple gateways is considered a multi-writer scenario, which can cause data integrity issues. Deploy multiple gateways for larger workloads API Version 2013-06-30 244 AWS Storage Gateway Amazon S3 File Gateway User Guide Security in AWS Storage Gateway Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and network architecture that is built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third- party auditors regularly test and verify the effectiveness of our security as part of the AWS Compliance Programs. To learn about the compliance programs that apply to AWS Storage Gateway, see AWS Services in Scope by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company’s requirements, and applicable laws and regulations. This documentation helps you understand how to apply the shared responsibility model when using Storage Gateway. The following topics show you how to configure Storage Gateway to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your Storage Gateway resources. Data protection in AWS Storage Gateway The AWS shared responsibility model applies to data protection in AWS Storage Gateway. As described in this model, AWS is responsible for protecting the global infrastructure that runs all of the AWS Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the AWS services that you use. For more information about data privacy, see the Data Privacy FAQ. For information about data protection in Europe, see the AWS Shared Responsibility Model and GDPR blog post on the AWS Security Blog. For data protection purposes, we recommend that you protect AWS account credentials and set up individual users with AWS IAM Identity Center or AWS Identity and Access Management (IAM). That way, each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways: Data protection API Version 2013-06-30 245 AWS Storage Gateway Amazon S3 File Gateway User Guide • Use multi-factor authentication (MFA) with each account. • Use SSL/TLS to communicate with AWS resources. We require TLS 1.2 and recommend TLS 1.3. • Set up API and user activity logging with AWS CloudTrail. For information about using CloudTrail trails to capture AWS activities, see Working with CloudTrail trails in the AWS CloudTrail User Guide. • Use AWS encryption solutions, along with all default security controls within AWS services. • Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3. • If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see Federal Information Processing Standard (FIPS) 140-3. We strongly recommend that you never put confidential
storagegateway-s3file-ug-095
storagegateway-s3file-ug.pdf
95
to capture AWS activities, see Working with CloudTrail trails in the AWS CloudTrail User Guide. • Use AWS encryption solutions, along with all default security controls within AWS services. • Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3. • If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see Federal Information Processing Standard (FIPS) 140-3. We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a Name field. This includes when you work with Storage Gateway or other AWS services using the console, API, AWS CLI, or AWS SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server. Data encryption using AWS KMS Storage Gateway uses SSL/TLS (Secure Socket Layers/Transport Layer Security) to encrypt data that is transferred between your gateway appliance and AWS storage. By default, Storage Gateway uses Amazon S3-Managed encryption keys (SSE-S3) to server-side encrypt all data it stores in Amazon S3. You have an option to use the Storage Gateway API to configure your gateway to encrypt data stored in the cloud using server-side encryption with AWS Key Management Service (SSE-KMS) keys. Encrypting a file share You can configure the file shares on your S3 File Gateway to encrypt stored objects with AWS KMS–managed keys by using SSE-KMS or DSSE-KMS. For information about supported file share encryption methods, see Encrypt objects stored by File Gateway in Amazon S3. When using AWS KMS to encrypt your data, keep the following in mind: • Your data is encrypted at rest in the cloud. That is, the data is encrypted in Amazon S3. Data encryption API Version 2013-06-30 246 AWS Storage Gateway Amazon S3 File Gateway User Guide • IAM users must have the required permissions to call the AWS KMS API operations. For more information, see Using IAM policies with AWS KMS in the AWS Key Management Service Developer Guide. Important When you use an AWS KMS key for server-side encryption, you must choose a symmetric key. Storage Gateway does not support asymmetric keys. For more information, see Using symmetric and asymmetric keys in the AWS Key Management Service Developer Guide. For more information about AWS KMS, see What is AWS Key Management Service? Identity and access management for AWS Storage Gateway AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be authenticated (signed in) and authorized (have permissions) to use AWS SGW resources. IAM is an AWS service that you can use with no additional charge. Topics • Audience • Authenticating with identities • Managing access using policies • How AWS Storage Gateway works with IAM • Identity-based policy examples for AWS Storage Gateway • Troubleshooting AWS Storage Gateway identity and access • Using tags to control access to your gateway and resources • Using Windows ACLs to limit SMB file share access Audience How you use AWS Identity and Access Management (IAM) differs, depending on the work that you do in AWS SGW. Identity and access management API Version 2013-06-30 247 AWS Storage Gateway Amazon S3 File Gateway User Guide Service user – If you use the AWS SGW service to do your job, then your administrator provides you with the credentials and permissions that you need. As you use more AWS SGW features to do your work, you might need additional permissions. Understanding how access is managed can help you request the right permissions from your administrator. If you cannot access a feature in AWS SGW, see Troubleshooting AWS Storage Gateway identity and access. Service administrator – If you're in charge of AWS SGW resources at your company, you probably have full access to AWS SGW. It's your job to determine which AWS SGW features and resources your service users should access. You must then submit requests to your IAM administrator to change the permissions of your service users. Review the information on this page to understand the basic concepts of IAM. To learn more about how your company can use IAM with AWS SGW, see How AWS Storage Gateway works with IAM. IAM administrator – If you're an IAM administrator, you might want to learn details about how you can write policies to manage access to AWS SGW. To view example AWS SGW identity-based
storagegateway-s3file-ug-096
storagegateway-s3file-ug.pdf
96
SGW. It's your job to determine which AWS SGW features and resources your service users should access. You must then submit requests to your IAM administrator to change the permissions of your service users. Review the information on this page to understand the basic concepts of IAM. To learn more about how your company can use IAM with AWS SGW, see How AWS Storage Gateway works with IAM. IAM administrator – If you're an IAM administrator, you might want to learn details about how you can write policies to manage access to AWS SGW. To view example AWS SGW identity-based policies that you can use in IAM, see Identity-based policy examples for AWS Storage Gateway. Authenticating with identities Authentication is how you sign in to AWS using your identity credentials. You must be authenticated (signed in to AWS) as the AWS account root user, as an IAM user, or by assuming an IAM role. You can sign in to AWS as a federated identity by using credentials provided through an identity source. AWS IAM Identity Center (IAM Identity Center) users, your company's single sign-on authentication, and your Google or Facebook credentials are examples of federated identities. When you sign in as a federated identity, your administrator previously set up identity federation using IAM roles. When you access AWS by using federation, you are indirectly assuming a role. Depending on the type of user you are, you can sign in to the AWS Management Console or the AWS access portal. For more information about signing in to AWS, see How to sign in to your AWS account in the AWS Sign-In User Guide. If you access AWS programmatically, AWS provides a software development kit (SDK) and a command line interface (CLI) to cryptographically sign your requests by using your credentials. If you don't use AWS tools, you must sign requests yourself. For more information about using the recommended method to sign requests yourself, see AWS Signature Version 4 for API requests in the IAM User Guide. Authenticating with identities API Version 2013-06-30 248 AWS Storage Gateway Amazon S3 File Gateway User Guide Regardless of the authentication method that you use, you might be required to provide additional security information. For example, AWS recommends that you use multi-factor authentication (MFA) to increase the security of your account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and AWS Multi-factor authentication in IAM in the IAM User Guide. AWS account root user When you create an AWS account, you begin with one sign-in identity that has complete access to all AWS services and resources in the account. This identity is called the AWS account root user and is accessed by signing in with the email address and password that you used to create the account. We strongly recommend that you don't use the root user for your everyday tasks. Safeguard your root user credentials and use them to perform the tasks that only the root user can perform. For the complete list of tasks that require you to sign in as the root user, see Tasks that require root user credentials in the IAM User Guide. Federated identity As a best practice, require human users, including users that require administrator access, to use federation with an identity provider to access AWS services by using temporary credentials. A federated identity is a user from your enterprise user directory, a web identity provider, the AWS Directory Service, the Identity Center directory, or any user that accesses AWS services by using credentials provided through an identity source. When federated identities access AWS accounts, they assume roles, and the roles provide temporary credentials. For centralized access management, we recommend that you use AWS IAM Identity Center. You can create users and groups in IAM Identity Center, or you can connect and synchronize to a set of users and groups in your own identity source for use across all your AWS accounts and applications. For information about IAM Identity Center, see What is IAM Identity Center? in the AWS IAM Identity Center User Guide. IAM users and groups An IAM user is an identity within your AWS account that has specific permissions for a single person or application. Where possible, we recommend relying on temporary credentials instead of creating IAM users who have long-term credentials such as passwords and access keys. However, if you have specific use cases that require long-term credentials with IAM users, we recommend that you rotate access keys. For more information, see Rotate access keys regularly for use cases that require long- term credentials in the IAM User Guide. Authenticating with identities API Version 2013-06-30 249 AWS Storage Gateway Amazon S3 File Gateway User Guide An IAM group is an identity that specifies a collection of IAM users. You
storagegateway-s3file-ug-097
storagegateway-s3file-ug.pdf
97
a single person or application. Where possible, we recommend relying on temporary credentials instead of creating IAM users who have long-term credentials such as passwords and access keys. However, if you have specific use cases that require long-term credentials with IAM users, we recommend that you rotate access keys. For more information, see Rotate access keys regularly for use cases that require long- term credentials in the IAM User Guide. Authenticating with identities API Version 2013-06-30 249 AWS Storage Gateway Amazon S3 File Gateway User Guide An IAM group is an identity that specifies a collection of IAM users. You can't sign in as a group. You can use groups to specify permissions for multiple users at a time. Groups make permissions easier to manage for large sets of users. For example, you could have a group named IAMAdmins and give that group permissions to administer IAM resources. Users are different from roles. A user is uniquely associated with one person or application, but a role is intended to be assumable by anyone who needs it. Users have permanent long-term credentials, but roles provide temporary credentials. To learn more, see Use cases for IAM users in the IAM User Guide. IAM roles An IAM role is an identity within your AWS account that has specific permissions. It is similar to an IAM user, but is not associated with a specific person. To temporarily assume an IAM role in the AWS Management Console, you can switch from a user to an IAM role (console). You can assume a role by calling an AWS CLI or AWS API operation or by using a custom URL. For more information about methods for using roles, see Methods to assume a role in the IAM User Guide. IAM roles with temporary credentials are useful in the following situations: • Federated user access – To assign permissions to a federated identity, you create a role and define permissions for the role. When a federated identity authenticates, the identity is associated with the role and is granted the permissions that are defined by the role. For information about roles for federation, see Create a role for a third-party identity provider (federation) in the IAM User Guide. If you use IAM Identity Center, you configure a permission set. To control what your identities can access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM. For information about permissions sets, see Permission sets in the AWS IAM Identity Center User Guide. • Temporary IAM user permissions – An IAM user or role can assume an IAM role to temporarily take on different permissions for a specific task. • Cross-account access – You can use an IAM role to allow someone (a trusted principal) in a different account to access resources in your account. Roles are the primary way to grant cross- account access. However, with some AWS services, you can attach a policy directly to a resource (instead of using a role as a proxy). To learn the difference between roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. • Cross-service access – Some AWS services use features in other AWS services. For example, when you make a call in a service, it's common for that service to run applications in Amazon EC2 or Authenticating with identities API Version 2013-06-30 250 AWS Storage Gateway Amazon S3 File Gateway User Guide store objects in Amazon S3. A service might do this using the calling principal's permissions, using a service role, or using a service-linked role. • Forward access sessions (FAS) – When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. • Service role – A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. • Service-linked role – A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles
storagegateway-s3file-ug-098
storagegateway-s3file-ug.pdf
98
For policy details when making FAS requests, see Forward access sessions. • Service role – A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. • Service-linked role – A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. • Applications running on Amazon EC2 – You can use an IAM role to manage temporary credentials for applications that are running on an EC2 instance and making AWS CLI or AWS API requests. This is preferable to storing access keys within the EC2 instance. To assign an AWS role to an EC2 instance and make it available to all of its applications, you create an instance profile that is attached to the instance. An instance profile contains the role and enables programs that are running on the EC2 instance to get temporary credentials. For more information, see Use an IAM role to grant permissions to applications running on Amazon EC2 instances in the IAM User Guide. Managing access using policies You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy is an object in AWS that, when associated with an identity or resource, defines their permissions. AWS evaluates these policies when a principal (user, root user, or role session) makes a request. Permissions in the policies determine whether the request is allowed or denied. Most policies are stored in AWS as JSON documents. For more information about the structure and contents of JSON policy documents, see Overview of JSON policies in the IAM User Guide. Managing access using policies API Version 2013-06-30 251 AWS Storage Gateway Amazon S3 File Gateway User Guide Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. By default, users and roles have no permissions. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. IAM policies define permissions for an action regardless of the method that you use to perform the operation. For example, suppose that you have a policy that allows the iam:GetRole action. A user with that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API. Identity-based policies Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. Identity-based policies can be further categorized as inline policies or managed policies. Inline policies are embedded directly into a single user, group, or role. Managed policies are standalone policies that you can attach to multiple users, groups, and roles in your AWS account. Managed policies include AWS managed policies and customer managed policies. To learn how to choose between a managed policy or an inline policy, see Choose between managed policies and inline policies in the IAM User Guide. Resource-based policies Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy. Managing access using policies API Version 2013-06-30 252 AWS Storage Gateway Amazon S3 File Gateway User Guide Access control lists (ACLs) Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. Amazon S3, AWS WAF, and Amazon VPC are examples
storagegateway-s3file-ug-099
storagegateway-s3file-ug.pdf
99
resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy. Managing access using policies API Version 2013-06-30 252 AWS Storage Gateway Amazon S3 File Gateway User Guide Access control lists (ACLs) Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs. To learn more about ACLs, see Access control list (ACL) overview in the Amazon Simple Storage Service Developer Guide. Other policy types AWS supports additional, less-common policy types. These policy types can set the maximum permissions granted to you by the more common policy types. • Permissions boundaries – A permissions boundary is an advanced feature in which you set the maximum permissions that an identity-based policy can grant to an IAM entity (IAM user or role). You can set a permissions boundary for an entity. The resulting permissions are the intersection of an entity's identity-based policies and its permissions boundaries. Resource-based policies that specify the user or role in the Principal field are not limited by the permissions boundary. An explicit deny in any of these policies overrides the allow. For more information about permissions boundaries, see Permissions boundaries for IAM entities in the IAM User Guide. • Service control policies (SCPs) – SCPs are JSON policies that specify the maximum permissions for an organization or organizational unit (OU) in AWS Organizations. AWS Organizations is a service for grouping and centrally managing multiple AWS accounts that your business owns. If you enable all features in an organization, then you can apply service control policies (SCPs) to any or all of your accounts. The SCP limits permissions for entities in member accounts, including each AWS account root user. For more information about Organizations and SCPs, see Service control policies in the AWS Organizations User Guide. • Resource control policies (RCPs) – RCPs are JSON policies that you can use to set the maximum available permissions for resources in your accounts without updating the IAM policies attached to each resource that you own. The RCP limits permissions for resources in member accounts and can impact the effective permissions for identities, including the AWS account root user, regardless of whether they belong to your organization. For more information about Organizations and RCPs, including a list of AWS services that support RCPs, see Resource control policies (RCPs) in the AWS Organizations User Guide. • Session policies – Session policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user. The resulting session's Managing access using policies API Version 2013-06-30 253 AWS Storage Gateway Amazon S3 File Gateway User Guide permissions are the intersection of the user or role's identity-based policies and the session policies. Permissions can also come from a resource-based policy. An explicit deny in any of these policies overrides the allow. For more information, see Session policies in the IAM User Guide. Multiple policy types When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see Policy evaluation logic in the IAM User Guide. How AWS Storage Gateway works with IAM Before you use IAM to manage access to AWS SGW, learn what IAM features are available to use with AWS SGW. IAM features you can use with AWS Storage Gateway IAM feature AWS SGW support Identity-based policies Resource-based policies Policy actions Policy resources Policy condition keys (service-specific) ACLs Yes No Yes Yes Yes No ABAC (tags in policies) Partial Temporary credentials Forward access sessions (FAS) Service roles Service-linked roles Yes Yes Yes Yes How AWS Storage Gateway works with IAM API Version 2013-06-30 254 AWS Storage Gateway Amazon S3 File Gateway User Guide To get a high-level view of how AWS SGW and other AWS services work with most IAM features, see AWS services that work with IAM in the IAM User Guide. Identity-based policies for AWS SGW Supports identity-based policies: Yes Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. With IAM identity-based policies, you can specify allowed or denied actions and resources as well
storagegateway-s3file-ug-100
storagegateway-s3file-ug.pdf
100
features, see AWS services that work with IAM in the IAM User Guide. Identity-based policies for AWS SGW Supports identity-based policies: Yes Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. You can't specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To learn about all of the elements that you can use in a JSON policy, see IAM JSON policy elements reference in the IAM User Guide. Identity-based policy examples for AWS SGW To view examples of AWS SGW identity-based policies, see Identity-based policy examples for AWS Storage Gateway. Resource-based policies within AWS SGW Supports resource-based policies: No Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. Adding a cross-account principal to a resource- based policy is only half of establishing the trust relationship. When the principal and the resource How AWS Storage Gateway works with IAM API Version 2013-06-30 255 AWS Storage Gateway Amazon S3 File Gateway User Guide are in different AWS accounts, an IAM administrator in the trusted account must also grant the principal entity (user or role) permission to access the resource. They grant permission by attaching an identity-based policy to the entity. However, if a resource-based policy grants access to a principal in the same account, no additional identity-based policy is required. For more information, see Cross account resource access in IAM in the IAM User Guide. Policy actions for AWS SGW Supports policy actions: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions. Include actions in a policy to grant permissions to perform the associated operation. To see a list of AWS SGW actions, see Actions Defined by AWS Storage Gateway in the Service Authorization Reference. Policy actions in AWS SGW use the following prefix before the action: sgw To specify multiple actions in a single statement, separate them with commas. "Action": [ "sgw:action1", "sgw:action2" ] To view examples of AWS SGW identity-based policies, see Identity-based policy examples for AWS Storage Gateway. How AWS Storage Gateway works with IAM API Version 2013-06-30 256 AWS Storage Gateway Amazon S3 File Gateway User Guide Policy resources for AWS SGW Supports policy resources: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions. For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources. "Resource": "*" To see a list of AWS SGW resource types and their ARNs, see Resources Defined by AWS Storage Gateway in the Service Authorization Reference. To learn with which actions you can specify the ARN of each resource, see Actions Defined by AWS Storage Gateway . To view examples of AWS SGW identity-based policies, see Identity-based policy examples for AWS Storage Gateway. Policy condition keys
storagegateway-s3file-ug-101
storagegateway-s3file-ug.pdf
101
that support a specific resource type, known as resource-level permissions. For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources. "Resource": "*" To see a list of AWS SGW resource types and their ARNs, see Resources Defined by AWS Storage Gateway in the Service Authorization Reference. To learn with which actions you can specify the ARN of each resource, see Actions Defined by AWS Storage Gateway . To view examples of AWS SGW identity-based policies, see Identity-based policy examples for AWS Storage Gateway. Policy condition keys for AWS SGW Supports service-specific policy condition keys: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Condition element (or Condition block) lets you specify conditions in which a statement is in effect. The Condition element is optional. You can create conditional expressions that use condition operators, such as equals or less than, to match the condition in the policy with values in the request. If you specify multiple Condition elements in a statement, or multiple keys in a single Condition element, AWS evaluates them using a logical AND operation. If you specify multiple values for a single condition key, AWS evaluates the condition using a logical OR operation. All of the conditions must be met before the statement's permissions are granted. How AWS Storage Gateway works with IAM API Version 2013-06-30 257 AWS Storage Gateway Amazon S3 File Gateway User Guide You can also use placeholder variables when you specify conditions. For example, you can grant an IAM user permission to access a resource only if it is tagged with their IAM user name. For more information, see IAM policy elements: variables and tags in the IAM User Guide. AWS supports global condition keys and service-specific condition keys. To see all AWS global condition keys, see AWS global condition context keys in the IAM User Guide. To see a list of AWS SGW condition keys, see Condition Keys for AWS Storage Gateway in the Service Authorization Reference. To learn with which actions and resources you can use a condition key, see Actions Defined by AWS Storage Gateway . To view examples of AWS SGW identity-based policies, see Identity-based policy examples for AWS Storage Gateway. ACLs in AWS SGW Supports ACLs: No Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. ABAC with AWS SGW Supports ABAC (tags in policies): Partial Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are called tags. You can attach tags to IAM entities (users or roles) and to many AWS resources. Tagging entities and resources is the first step of ABAC. Then you design ABAC policies to allow operations when the principal's tag matches the tag on the resource that they are trying to access. ABAC is helpful in environments that are growing rapidly and helps with situations where policy management becomes cumbersome. To control access based on tags, you provide tag information in the condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. If a service supports all three condition keys for every resource type, then the value is Yes for the service. If a service supports all three condition keys for only some resource types, then the value is Partial. How AWS Storage Gateway works with IAM API Version 2013-06-30 258 AWS Storage Gateway Amazon S3 File Gateway User Guide For more information about ABAC, see Define permissions with ABAC authorization in the IAM User Guide. To view a tutorial with steps for setting up ABAC, see Use attribute-based access control (ABAC) in the IAM User Guide. Using temporary credentials with AWS SGW Supports temporary credentials: Yes Some AWS services don't work when you sign in using temporary credentials. For additional information, including which AWS services work with temporary credentials, see AWS services that work with IAM in the IAM User Guide. You are using temporary credentials if you sign in to the AWS Management Console using any method except a user name and password. For example, when you access AWS using your company's single sign-on (SSO) link, that process automatically creates temporary credentials. You also automatically create temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, see Switch from a user to an IAM role (console) in the IAM User Guide. You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those
storagegateway-s3file-ug-102
storagegateway-s3file-ug.pdf
102
are using temporary credentials if you sign in to the AWS Management Console using any method except a user name and password. For example, when you access AWS using your company's single sign-on (SSO) link, that process automatically creates temporary credentials. You also automatically create temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, see Switch from a user to an IAM role (console) in the IAM User Guide. You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those temporary credentials to access AWS. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see Temporary security credentials in IAM. Forward access sessions for AWS SGW Supports forward access sessions (FAS): Yes When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. Service roles for AWS SGW Supports service roles: Yes How AWS Storage Gateway works with IAM API Version 2013-06-30 259 AWS Storage Gateway Amazon S3 File Gateway User Guide A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. Warning Changing the permissions for a service role might break AWS SGW functionality. Edit service roles only when AWS SGW provides guidance to do so. Service-linked roles for AWS SGW Supports service-linked roles: Yes A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. For details about creating or managing service-linked roles, see AWS services that work with IAM. Find a service in the table that includes a Yes in the Service-linked role column. Choose the Yes link to view the service-linked role documentation for that service. Identity-based policy examples for AWS Storage Gateway By default, users and roles don't have permission to create or modify AWS SGW resources. They also can't perform tasks by using the AWS Management Console, AWS Command Line Interface (AWS CLI), or AWS API. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. To learn how to create an IAM identity-based policy by using these example JSON policy documents, see Create IAM policies (console) in the IAM User Guide. For details about actions and resource types defined by AWS SGW, including the format of the ARNs for each of the resource types, see Actions, Resources, and Condition Keys for AWS Storage Gateway in the Service Authorization Reference. Topics Identity-based policy examples API Version 2013-06-30 260 AWS Storage Gateway • Policy best practices • Using the AWS SGW console • Allow users to view their own permissions Policy best practices Amazon S3 File Gateway User Guide Identity-based policies determine whether someone can create, access, or delete AWS SGW resources in your account. These actions can incur costs for your AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations: • Get started with AWS managed policies and move toward least-privilege permissions – To get started granting permissions to your users and workloads, use the AWS managed policies that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see AWS managed policies or AWS managed policies for job functions in the IAM User Guide. • Apply least-privilege permissions – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as least-privilege permissions. For more information
storagegateway-s3file-ug-103
storagegateway-s3file-ug.pdf
103
that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see AWS managed policies or AWS managed policies for job functions in the IAM User Guide. • Apply least-privilege permissions – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as least-privilege permissions. For more information about using IAM to apply permissions, see Policies and permissions in IAM in the IAM User Guide. • Use conditions in IAM policies to further restrict access – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as AWS CloudFormation. For more information, see IAM JSON policy elements: Condition in the IAM User Guide. • Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see Validate policies with IAM Access Analyzer in the IAM User Guide. • Require multi-factor authentication (MFA) – If you have a scenario that requires IAM users or a root user in your AWS account, turn on MFA for additional security. To require MFA when API operations are called, add MFA conditions to your policies. For more information, see Secure API access with MFA in the IAM User Guide. Identity-based policy examples API Version 2013-06-30 261 AWS Storage Gateway Amazon S3 File Gateway User Guide For more information about best practices in IAM, see Security best practices in IAM in the IAM User Guide. Using the AWS SGW console To access the AWS Storage Gateway console, you must have a minimum set of permissions. These permissions must allow you to list and view details about the AWS SGW resources in your AWS account. If you create an identity-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities (users or roles) with that policy. You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the AWS API. Instead, allow access to only the actions that match the API operation that they're trying to perform. To ensure that users and roles can still use the AWS SGW console, also attach the AWS SGW ConsoleAccess or ReadOnly AWS managed policy to the entities. For more information, see Adding permissions to a user in the IAM User Guide. Allow users to view their own permissions This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API. { "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", Identity-based policy examples API Version 2013-06-30 262 AWS Storage Gateway Amazon S3 File Gateway User Guide "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ] } Troubleshooting AWS Storage Gateway identity and access Use the following information to help you diagnose and fix common issues that you might encounter when working with AWS SGW and IAM. Topics • I am not authorized to perform an action in AWS SGW • I am not authorized to perform iam:PassRole • I want to allow people outside of my AWS account to access my AWS SGW resources I am not authorized to perform an action in AWS SGW If you receive an error that you're not authorized to perform an action, your policies must be updated to allow you to perform the action. The following example error occurs when the mateojackson IAM user tries to use the console to view details about a fictional my-example-widget resource but doesn't have the fictional sgw:GetWidget permissions. User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: sgw:GetWidget on resource: my-example-widget Troubleshooting API Version 2013-06-30 263 AWS Storage Gateway Amazon S3 File Gateway User Guide In this case, the policy for the mateojackson user must be updated to allow
storagegateway-s3file-ug-104
storagegateway-s3file-ug.pdf
104
perform an action in AWS SGW If you receive an error that you're not authorized to perform an action, your policies must be updated to allow you to perform the action. The following example error occurs when the mateojackson IAM user tries to use the console to view details about a fictional my-example-widget resource but doesn't have the fictional sgw:GetWidget permissions. User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: sgw:GetWidget on resource: my-example-widget Troubleshooting API Version 2013-06-30 263 AWS Storage Gateway Amazon S3 File Gateway User Guide In this case, the policy for the mateojackson user must be updated to allow access to the my- example-widget resource by using the sgw:GetWidget action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. I am not authorized to perform iam:PassRole If you receive an error that you're not authorized to perform the iam:PassRole action, your policies must be updated to allow you to pass a role to AWS SGW. Some AWS services allow you to pass an existing role to that service instead of creating a new service role or service-linked role. To do this, you must have permissions to pass the role to the service. The following example error occurs when an IAM user named marymajor tries to use the console to perform an action in AWS SGW. However, the action requires the service to have permissions that are granted by a service role. Mary does not have permissions to pass the role to the service. User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole In this case, Mary's policies must be updated to allow her to perform the iam:PassRole action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. Important Storage Gateway can assume existing service roles that are passed using the iam:PassRole policy action, but it does not support IAM policies that use the iam:PassedToService context key to limit the action to specific services. For more information, see the following topics in the AWS Identity and Access Management User Guide: • IAM: Pass an IAM role to a specific AWS service • Granting a user permissions to pass a role to an AWS service • Available keys for IAM Troubleshooting API Version 2013-06-30 264 AWS Storage Gateway Amazon S3 File Gateway User Guide I want to allow people outside of my AWS account to access my AWS SGW resources You can create a role that users in other accounts or people outside of your organization can use to access your resources. You can specify who is trusted to assume the role. For services that support resource-based policies or access control lists (ACLs), you can use those policies to grant people access to your resources. To learn more, consult the following: • To learn whether AWS SGW supports these features, see How AWS Storage Gateway works with IAM. • To learn how to provide access to your resources across AWS accounts that you own, see Providing access to an IAM user in another AWS account that you own in the IAM User Guide. • To learn how to provide access to your resources to third-party AWS accounts, see Providing access to AWS accounts owned by third parties in the IAM User Guide. • To learn how to provide access through identity federation, see Providing access to externally authenticated users (identity federation) in the IAM User Guide. • To learn the difference between using roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. Using tags to control access to your gateway and resources To control access to gateway resources and actions, you can use AWS Identity and Access Management (IAM) policies based on tags. You can provide the control in two ways: 1. Control access to gateway resources based on the tags on those resources. 2. Control what tags can be passed in an IAM request condition. For information about how to use tags to control access, see Controlling Access Using Tags. Controlling Access Based on Tags on a Resource To control what actions a user or role can perform on a gateway resource, you can use tags on the gateway resource. For example, you might want to allow or deny specific API operations on a file gateway resource based on the key-value pair of the tag on the resource. Using tags to control access to resources API Version 2013-06-30 265 AWS Storage Gateway Amazon S3 File Gateway User Guide The following example allows a user or a role to perform the ListTagsForResource, ListFileShares, and DescribeNFSFileShares actions on all resources. The policy applies only if the tag on the resource has its key set to allowListAndDescribe and the value set to
storagegateway-s3file-ug-105
storagegateway-s3file-ug.pdf
105
a gateway resource, you can use tags on the gateway resource. For example, you might want to allow or deny specific API operations on a file gateway resource based on the key-value pair of the tag on the resource. Using tags to control access to resources API Version 2013-06-30 265 AWS Storage Gateway Amazon S3 File Gateway User Guide The following example allows a user or a role to perform the ListTagsForResource, ListFileShares, and DescribeNFSFileShares actions on all resources. The policy applies only if the tag on the resource has its key set to allowListAndDescribe and the value set to yes. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "storagegateway:ListTagsForResource", "storagegateway:ListFileShares", "storagegateway:DescribeNFSFileShares" ], "Resource": "*", "Condition": { "StringEquals": { "aws:ResourceTag/allowListAndDescribe": "yes" } } }, { "Effect": "Allow", "Action": [ "storagegateway:*" ], "Resource": "arn:aws:storagegateway:region:account-id:*/*" } ] } Controlling Access Based on Tags in an IAM Request To control what an user can do on a gateway resource, you can use conditions in an IAM policy based on tags. For example, you can write a policy that allows or denies an user the ability to perform specific API operations based on the tag they provided when they created the resource. In the following example, the first statement allows a user to create a gateway only if the key- value pair of the tag they provided when creating the gateway is Department and Finance. When using the API operation, you add this tag to the activation request. Using tags to control access to resources API Version 2013-06-30 266 AWS Storage Gateway Amazon S3 File Gateway User Guide The second statement allows the user to create an Network File System (NFS) or Server Message Block (SMB) file share on a gateway only if the key-value pair of the tag on the gateway matches Departmentand Finance. Additionally, the user must add a tag to the file share, and the key-value pair of the tag must be Department and Finance. You add tags to a file share when creating the file share. There aren't permissions for the AddTagsToResource or RemoveTagsFromResource operations, so the user can't perform these operations on the gateway or the file share. { "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Action":[ "storagegateway:ActivateGateway" ], "Resource":"*", "Condition":{ "StringEquals":{ "aws:RequestTag/Department":"Finance" } } }, { "Effect":"Allow", "Action":[ "storagegateway:CreateNFSFileShare", "storagegateway:CreateSMBFileShare" ], "Resource":"*", "Condition":{ "StringEquals":{ "aws:ResourceTag/Department":"Finance", "aws:RequestTag/Department":"Finance" } } } ] } Using tags to control access to resources API Version 2013-06-30 267 AWS Storage Gateway Amazon S3 File Gateway User Guide Using Windows ACLs to limit SMB file share access Amazon S3 file gateway supports two different methods for controlling access to files and directories that are stored through an SMB file share: POSIX permissions, or Windows ACLs. This section describes how to use Microsoft Windows access control lists (ACLs) on SMB file shares that use Microsoft Active Directory (AD) for authentication. By using Windows ACLs, you can set fine-grained permissions on files and folders in your SMB file share. Following are some important characteristics of Windows ACLs on SMB file shares: • Windows ACLs are selected by default for SMB file shares when your file gateway is joined to an Active Directory domain. • When ACLs are activated, the ACL information is persisted in Amazon S3 object metadata. • The gateway preserves up to 10 ACLs per file or folder. • When you use an SMB file share with ACLs activated to access S3 objects created outside your gateway, the objects inherit ACLs' information from the parent folder. Note The default root ACL for an SMB file share gives full access to everyone, but you can change the permissions of the root ACL. You can use root ACLs to control access to the file share. You can set who can mount the file share (map the drive) and what permissions the user gets to the files and folders recursively in the file share. However, we recommend that you set this permission on the top-level folder in the S3 bucket so that your ACL is persisted. You can turn on Windows ACLs when you create a new SMB file share by using the CreateSMBFileShare API operation. Or you can turn on Windows ACLs on an existing SMB file share by using the UpdateSMBFileShare API operation. Activating Windows ACLs on a New SMB File Share Take the following steps to activate Windows ACLs on a new SMB file share. To activate Windows ACLs when creating a new SMB file share 1. Create a file gateway if you don't already have one. For more information, see Creating your gateway. Using ACLs for SMB file share access API Version 2013-06-30 268 AWS Storage Gateway Amazon S3 File Gateway User Guide 2. If the gateway is not joined to a domain, add it to a domain. For more information, see Using Active Directory
storagegateway-s3file-ug-106
storagegateway-s3file-ug.pdf
106
by using the UpdateSMBFileShare API operation. Activating Windows ACLs on a New SMB File Share Take the following steps to activate Windows ACLs on a new SMB file share. To activate Windows ACLs when creating a new SMB file share 1. Create a file gateway if you don't already have one. For more information, see Creating your gateway. Using ACLs for SMB file share access API Version 2013-06-30 268 AWS Storage Gateway Amazon S3 File Gateway User Guide 2. If the gateway is not joined to a domain, add it to a domain. For more information, see Using Active Directory to authenticate users. 3. Create an SMB file share. For more information, see 4. Activate Windows ACLs on the file share from the Storage Gateway console. To use the Storage Gateway Console, do the following: a. b. Choose the file share and choose Edit file share. For the File/directory access controlled by option, choose Windows Access Control List. 5. (Optional) Add an admin user to the AdminUsersList, if you want the admin user to have privileges to update ACLs on all files and folders in the file share. Note If you have configured the Allowed and Denied Users and Groups lists in the SMB file share's settings, then ACLs will not grant any access that overrides those lists. The Allowed and Denied Users and Groups lists are evaluated before ACLs, and control which users can mount or access the file share. If any users or groups are placed on the Allowed list, the list is considered active, and only those users can mount the file share. After a user has mounted a file share, ACLs then provide more granular protection that controls which specific files or folders the user can access. 6. Update the ACLs for the parent folders under the root folder. To do this, use Windows File Explorer to configure the ACLs on the folders in the SMB file share. Note If you configure the ACLs on the root instead of the parent folder under root, the ACL permissions aren't persisted in Amazon S3. We recommend setting ACLs at the top-level folder under the root of your file share, instead of setting ACLs directly at the root of the file share. This approach persists the information as object metadata in Amazon S3. 7. Turn on inheritance as appropriate. Using ACLs for SMB file share access API Version 2013-06-30 269 AWS Storage Gateway Amazon S3 File Gateway User Guide Note You can turn on inheritance for file shares created after May 8, 2019. If you turn on inheritance and update the permissions recursively, Storage Gateway updates all the objects in the S3 bucket. Depending on the number of objects in the bucket, the update can take a while to complete. Activating Windows ACLs on an Existing SMB File Share Take the following steps to activate Windows ACLs on an existing SMB file share that has POSIX permissions. To activate Windows ACLs on an existing SMB file share using the Storage Gateway Console 1. Choose the file share and choose Edit file share. 2. 3. For the File/directory access controlled by option, choose Windows Access Control List. Turn on inheritance as appropriate. Note We don't recommend setting the ACLs at the root level, because if you do this and delete your gateway, you need to reset the ACLs again. If you turn on inheritance and update the permissions recursively, Storage Gateway updates all the objects in the S3 bucket. Depending on the number of objects in the bucket, the update can take a while to complete. Limitations When Using Windows ACLs Keep the following limitations in mind when using Windows ACLs to control access to SMB file shares: • Windows ACLs are only supported on file shares that use Active Directory for authentication when you use Windows SMB clients to access the file shares. • File gateways support a maximum of 10 ACL entries for each file and directory. Using ACLs for SMB file share access API Version 2013-06-30 270 AWS Storage Gateway Amazon S3 File Gateway User Guide • File gateways don't support Audit and Alarm entries, which are system access-control list (SACL) entries. file gateways support Allow and Deny entries, which are discretionary access control list (DACL) entries. • File gateways don't support Advanced Access Control Entry (ACE) permissions. • The root ACL settings of SMB file shares are only on the gateway, and the settings are persisted across gateway updates and restarts. Note If you configure the ACLs on the root instead of the parent folder under the root, the ACL permissions aren't persisted in Amazon S3. Given these conditions, make sure to do the following: • If you configure multiple gateways to access the same Amazon S3 bucket, configure the root ACL on each of the
storagegateway-s3file-ug-107
storagegateway-s3file-ug.pdf
107
Deny entries, which are discretionary access control list (DACL) entries. • File gateways don't support Advanced Access Control Entry (ACE) permissions. • The root ACL settings of SMB file shares are only on the gateway, and the settings are persisted across gateway updates and restarts. Note If you configure the ACLs on the root instead of the parent folder under the root, the ACL permissions aren't persisted in Amazon S3. Given these conditions, make sure to do the following: • If you configure multiple gateways to access the same Amazon S3 bucket, configure the root ACL on each of the gateways to keep the permissions consistent. • If you delete a file share and recreate it on the same Amazon S3 bucket, make sure that you use the same set of root ACLs. Compliance validation for AWS Storage Gateway Third-party auditors assess the security and compliance of AWS Storage Gateway as part of multiple AWS compliance programs. These include SOC, PCI, ISO, FedRAMP, HIPAA, MTCS, C5, K- ISMS, ENS High, OSPAR, and HITRUST CSF. For a list of AWS services in scope of specific compliance programs, see AWS Services in Scope by Compliance Program. For general information, see AWS Compliance Programs. You can download third-party audit reports using AWS Artifact. For more information, see Downloading Reports in AWS Artifact. Your compliance responsibility when using Storage Gateway is determined by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations. AWS provides the following resources to help with compliance: Compliance validation API Version 2013-06-30 271 AWS Storage Gateway Amazon S3 File Gateway User Guide • Security and Compliance Quick Start Guides – These deployment guides discuss architectural considerations and provide steps for deploying security- and compliance-focused baseline environments on AWS. • Architecting for HIPAA Security and Compliance Whitepaper – This whitepaper describes how companies can use AWS to create HIPAA-compliant applications. • AWS Compliance Resources – This collection of workbooks and guides might apply to your industry and location. • Evaluating resources with rules in the AWS Config Developer Guide – The AWS Config service assesses how well your resource configurations comply with internal practices, industry guidelines, and regulations. • AWS Security Hub – This AWS service provides a comprehensive view of your security state within AWS that helps you check your compliance with security industry standards and best practices. Resilience in AWS Storage Gateway The AWS global infrastructure is built around AWS Regions and Availability Zones. An AWS Region is a physical location around the world where data centers are clustered. Each group of logical data centers is called an Availability Zone (AZ). Each AWS Region consists of a minimum of three isolated and physically separate AZs within a geographic area. Unlike other cloud providers, who often define a region as a single data center, the multiple AZ design of every AWS Region offers distinct advantages. Each AZ has independent power, cooling, and physical security and is connected via redundant, ultra-low-latency networks. If your deployment requires a focus on high availability, you can configure services and resources to in multiple AZs to achieve greater fault-tolerance. AWS Regions meet the highest levels of infrastructure security, compliance, and data protection. All traffic between AZs is encrypted. The network performance is sufficient to accomplish synchronous replication between AZs. AZs make partitioning services and resources for high availability easy. If your deployment is partitioned across AZs, your resources are better isolated and protected from issues such as power outages, lightning strikes, tornadoes, earthquakes, and more. AZs are physically separated by a meaningful distance from any other AZ, although all are within 100 km (60 miles) of each other. For more information about AWS Regions and Availability Zones, see AWS Global Infrastructure. Resilience API Version 2013-06-30 272 AWS Storage Gateway Amazon S3 File Gateway User Guide In addition to the AWS global infrastructure, Storage Gateway supports VMware vSphere High Availability (VMware HA) to help protect storage workloads against hardware, hypervisor, or network failures. For more information, see Using VMware vSphere High Availability with Storage Gateway. Infrastructure security in AWS Storage Gateway As a managed service, AWS Storage Gateway is protected by the AWS global network security procedures that are described in Security Pillar - AWS Well-Architected Framework. You use AWS published API calls to access Storage Gateway through the network. Clients must support Transport Layer Security (TLS) 1.2. Clients must also support cipher suites with perfect forward secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie- Hellman (ECDHE). Most modern systems such as Java 7 and later support these modes. Additionally, requests must be signed by using an access key ID and a secret access key that is associated with an IAM principal. Or you can use the AWS Security Token Service (AWS STS) to generate temporary security
storagegateway-s3file-ug-108
storagegateway-s3file-ug.pdf
108
Security Pillar - AWS Well-Architected Framework. You use AWS published API calls to access Storage Gateway through the network. Clients must support Transport Layer Security (TLS) 1.2. Clients must also support cipher suites with perfect forward secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie- Hellman (ECDHE). Most modern systems such as Java 7 and later support these modes. Additionally, requests must be signed by using an access key ID and a secret access key that is associated with an IAM principal. Or you can use the AWS Security Token Service (AWS STS) to generate temporary security credentials to sign requests. Note You should treat the AWS Storage Gateway appliance as a managed virtual machine, and should not attempt to access or modify its installation in any way. Attempting to install scanning software or update any software packages using methods other than the normal gateway update mechanism, may cause the gateway to malfunction and could impact our ability to support or fix the gateway. AWS reviews, analyzes, and remediates CVEs on a regular basis. We incorporate fixes for these issues into Storage Gateway as part of our normal software release cycle. These fixes are typically applied as part of the normal gateway update process during scheduled maintenance windows. For more information about gateway updates, see Managing gateway updates using the AWS Storage Gateway console. AWS Security Best Practices AWS provides a number of security features to consider as you develop and implement your own security policies. These best practices are general guidelines and don’t represent a complete Infrastructure security API Version 2013-06-30 273 AWS Storage Gateway Amazon S3 File Gateway User Guide security solution. Because these practices might not be appropriate or sufficient for your environment, treat them as helpful considerations rather than prescriptions. For more information, see AWS Security Best Practices. Logging and monitoring in AWS Storage Gateway Storage Gateway is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in Storage Gateway. CloudTrail captures all API calls for Storage Gateway as events. The calls captured include calls from the Storage Gateway console and code calls to the Storage Gateway API operations. If you create a trail, you can turn on continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for Storage Gateway. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in Event history. Using the information collected by CloudTrail, you can determine the request that was made to Storage Gateway, the IP address from which the request was made, who made the request, when it was made, and additional details. To learn more about CloudTrail, see the AWS CloudTrail User Guide. Storage Gateway information in CloudTrail CloudTrail is activated on your AWS account when you create the account. When activity occurs in Storage Gateway, that activity is recorded in a CloudTrail event along with other AWS service events in Event history. You can view, search, and download recent events in your AWS account. For more information, see Viewing Events with CloudTrail Event History. For an ongoing record of events in your AWS account, including events for Storage Gateway, create a trail. A trail allows CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all AWS Regions. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following: • Overview for Creating a Trail • CloudTrail Supported Services and Integrations • Configuring Amazon SNS Notifications for CloudTrail • Receiving CloudTrail Log Files from Multiple Regions and Receiving CloudTrail Log Files from Multiple Accounts Logging and monitoring API Version 2013-06-30 274 AWS Storage Gateway Amazon S3 File Gateway User Guide All of the Storage Gateway actions are logged and are documented in the Actions topic. For example, calls to the ActivateGateway, ListGateways, and ShutdownGateway actions generate entries in the CloudTrail log files. Every event or log entry contains information about who generated the request. The identity information helps you determine the following: • Whether the request was made with root or AWS Identity and Access Management (IAM) user credentials. • Whether the request was made with temporary security credentials for a role or federated user. • Whether the request was made by another AWS service. For more information, see the CloudTrail userIdentity Element. Understanding Storage Gateway log file entries A trail is a configuration that allows delivery of events as log files to an Amazon S3 bucket that
storagegateway-s3file-ug-109
storagegateway-s3file-ug.pdf
109
the CloudTrail log files. Every event or log entry contains information about who generated the request. The identity information helps you determine the following: • Whether the request was made with root or AWS Identity and Access Management (IAM) user credentials. • Whether the request was made with temporary security credentials for a role or federated user. • Whether the request was made by another AWS service. For more information, see the CloudTrail userIdentity Element. Understanding Storage Gateway log file entries A trail is a configuration that allows delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order. The following example shows a CloudTrail log entry that demonstrates the action. { "Records": [{ "eventVersion": "1.02", "userIdentity": { "type": "IAMUser", "principalId": "AIDAII5AUEPBH2M7JTNVC", "arn": "arn:aws:iam::111122223333:user/StorageGateway-team/JohnDoe", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "JohnDoe" }, "eventTime": "2014-12-04T16:19:00Z", "eventSource": "storagegateway.amazonaws.com", "eventName": "ActivateGateway", "awsRegion": "us-east-2", "sourceIPAddress": "192.0.2.0", "userAgent": "aws-cli/1.6.2 Python/2.7.6 Linux/2.6.18-164.el5", "requestParameters": { Understanding Storage Gateway log file entries API Version 2013-06-30 275 AWS Storage Gateway Amazon S3 File Gateway User Guide "gatewayTimezone": "GMT-5:00", "gatewayName": "cloudtrailgatewayvtl", "gatewayRegion": "us-east-2", "activationKey": "EHFBX-1NDD0-P0IVU-PI259- DHK88", "gatewayType": "VTL" }, "responseElements": { "gatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/cloudtrailgatewayvtl" }, "requestID": "54BTFGNQI71987UJD2IHTCT8NF1Q8GLLE1QEU3KPGG6F0KSTAUU0", "eventID": "635f2ea2-7e42-45f0- bed1-8b17d7b74265", "eventType": "AwsApiCall", "apiVersion": "20130630", "recipientAccountId": "444455556666" }] } The following example shows a CloudTrail log entry that demonstrates the ListGateways action. { "Records": [{ "eventVersion": "1.02", "userIdentity": { "type": "IAMUser", "principalId": "AIDAII5AUEPBH2M7JTNVC", "arn": "arn:aws:iam::111122223333:user/StorageGateway- team/JohnDoe", "accountId:" 111122223333", " accessKeyId ":" AKIAIOSFODNN7EXAMPLE", " userName ":" JohnDoe " }, " eventTime ":" 2014 - 12 - 03T19: 41: 53Z ", " eventSource ":" storagegateway.amazonaws.com ", " eventName ":" ListGateways ", " awsRegion ":" us-east-2 ", " sourceIPAddress ":" 192.0.2.0 ", " userAgent ":" aws - cli / 1.6.2 Python / 2.7.6 Linux / 2.6.18 - 164.el5 ", Understanding Storage Gateway log file entries API Version 2013-06-30 276 AWS Storage Gateway Amazon S3 File Gateway User Guide " requestParameters ":null, " responseElements ":null, "requestID ":" 6U2N42CU37KAO8BG6V1I23FRSJ1Q8GLLE1QEU3KPGG6F0KSTAUU0 ", " eventID ":" f76e5919 - 9362 - 48ff - a7c4 - d203a189ec8d ", " eventType ":" AwsApiCall ", " apiVersion ":" 20130630 ", " recipientAccountId ":" 444455556666" }] } Understanding Storage Gateway log file entries API Version 2013-06-30 277 AWS Storage Gateway Amazon S3 File Gateway User Guide Troubleshooting problems with your Storage Gateway deployment Following, you can find information about best practices and troubleshooting issues related to gateways, host platforms, file shares, high availability, data recovery, and security. The on-premises gateway troubleshooting information covers gateways deployed on supported virtualization platforms. The troubleshooting information for high availability issues covers gateways running on VMware vSphere High Availability (HA) platform. Topics • Troubleshooting: gateway offline issues - Learn how to diagnose problems that can cause your gateway to appear offline in the Storage Gateway console. • Troubleshooting: Active Directory issues - Learn what to do if you receive error messages such as NETWORK_ERROR, TIMEOUT, or ACCESS_DENIED when trying to join your File Gateway to a Microsoft Active Directory domain. • Troubleshooting: gateway activation issues - Learn what to do if you receive an internal error message when attempting to activate your Storage Gateway. • Troubleshooting: on-premises gateway issues - Learn about typical issues that you might encounter working with your on-premises gateways, and how to allow Support to connect to your gateway to assist with troubleshooting. • Troubleshooting: Microsoft Hyper-V setup issues - Learn about typical issues that you might encounter when deploying Storage Gateway on the Microsoft Hyper-V platform. • Troubleshooting: Amazon EC2 gateway issues - Find information about typical issues that you might encounter when working with gateways deployed on Amazon EC2. • Troubleshooting: hardware appliance issues - Learn how to resolve issues that you might encounter with the AWS Storage Gateway Hardware Appliance. • Troubleshooting: File Gateway issues - Find information that can help you understand the cause of errors and health notifications that appear in your File Gateway's CloudWatch logs. • Troubleshooting: file share issues - Learn about actions you can take if you experience unexpected issues with your file share. • Troubleshooting: high availability issues - Learn what to do if you experience issues with gateways that are deployed in a VMware HA environment. API Version 2013-06-30 278 AWS Storage Gateway Amazon S3 File Gateway User Guide Troubleshooting: gateway offline in the Storage Gateway console Use the following troubleshooting information to determine what to do if the AWS Storage Gateway console shows that your gateway is offline. Your gateway might be showing as offline for one or more of the following reasons: • The
storagegateway-s3file-ug-110
storagegateway-s3file-ug.pdf
110
- Learn about actions you can take if you experience unexpected issues with your file share. • Troubleshooting: high availability issues - Learn what to do if you experience issues with gateways that are deployed in a VMware HA environment. API Version 2013-06-30 278 AWS Storage Gateway Amazon S3 File Gateway User Guide Troubleshooting: gateway offline in the Storage Gateway console Use the following troubleshooting information to determine what to do if the AWS Storage Gateway console shows that your gateway is offline. Your gateway might be showing as offline for one or more of the following reasons: • The gateway can't reach the Storage Gateway service endpoints. • The gateway shut down unexpectedly. • A cache disk associated with the gateway has been disconnected or modified, or has failed. To bring your gateway back online, identify and resolve the issue that caused your gateway to go offline. Check the associated firewall or proxy If you configured your gateway to use a proxy, or you placed your gateway behind a firewall, then review the access rules of the proxy or firewall. The proxy or firewall must allow traffic to and from the network ports and service endpoints required by Storage Gateway. For more information, see Network and firewall requirements. Check for an ongoing SSL or deep-packet inspection of your gateway's traffic If an SSL or deep-packet inspection is currently being performed on the network traffic between your gateway and AWS, then your gateway might not be able to communicate with the required service endpoints. To bring your gateway back online, you must disable the inspection. Check the IOWaitPercent metric after a reboot or software update After a reboot or software update, check to see if the IOWaitPercent metric for your File Gateway is 10 or greater. This might cause your gateway to be slow to respond while it rebuilds the index cache to RAM. For more information, see Troubleshooting: Using CloudWatch metrics. Troubleshooting: gateway offline issues API Version 2013-06-30 279 AWS Storage Gateway Amazon S3 File Gateway User Guide Check for a power outage or hardware failure on the hypervisor host A power outage or hardware failure on the hypervisor host of your gateway can cause your gateway to shut down unexpectedly and become unreachable. After you restore the power and network connectivity, your gateway will become reachable again. After your gateway is back online, be sure to take steps to recover your data. For more information, see Best practices: recovering your data. Check for issues with an associated cache disk Your gateway can go offline if at least one of the cache disks associated with your gateway was removed, changed, or resized, or if it is corrupted. If a working cache disk was removed from the hypervisor host: 1. Shut down the gateway. 2. Re-add the disk. Note Make sure you add the disk to the same disk node. 3. Restart the gateway. If a cache disk is corrupted, was replaced, or was resized: • Follow the Method 2 procedure described in Replacing your existing S3 File Gateway with a new instance to set up a new gateway and re-download cache disk information from the AWS cloud. Troubleshooting: issues joining gateway to Active Directory Use the following troubleshooting information to determine what to do if you receive error messages such as NETWORK_ERROR, TIMEOUT, or ACCESS_DENIED when trying to join your File Gateway to a Microsoft Active Directory domain. To resolve these errors, perform the following checks and configurations. Check for a power outage or hardware failure on the hypervisor host API Version 2013-06-30 280 AWS Storage Gateway Amazon S3 File Gateway User Guide Confirm that the gateway can reach the domain controller by running an nping test To run an nping test: 1. Connect to the gateway local console using your hypervisor management software (VMware, Hyper-V, or KVM) for on-premises gateways, or using ssh for Amazon EC2 gateways. 2. Enter the corresponding numeral to select Gateway Console, and then enter h to list all available commands. To test the connectivity between the Storage Gateway virtual machine and the domain, run the following command: nping -d corp.domain.com -p 389 -c 1 -t tcp Note Replace corp.domain.com with your Active Directory domain DNS name and replace 389 with the LDAP port for your environment. Verify that you have opened the required ports within your firewall. The following is an example of a successful nping test where the gateway was able to reach the domain controller: nping -d corp.domain.com -p 389 -c 1 -t tcp Starting Nping 0.6.40 ( http://nmap.org/nping ) at 2022-06-30 16:24 UTC SENT (0.0553s) TCP 10.10.10.21:9783 > 10.10.10.10:389 S ttl=64 id=730 iplen=40 seq=2597195024 win=1480 RCVD (0.0556s) TCP 10.10.10.10:389 > 10.10.10.21:9783 SA ttl=128 id=22332 iplen=44 seq=4170716243 win=8192 <mss 8961> Max rtt: 0.310ms | Min rtt: 0.310ms | Avg rtt: 0.310ms
storagegateway-s3file-ug-111
storagegateway-s3file-ug.pdf
111
domain DNS name and replace 389 with the LDAP port for your environment. Verify that you have opened the required ports within your firewall. The following is an example of a successful nping test where the gateway was able to reach the domain controller: nping -d corp.domain.com -p 389 -c 1 -t tcp Starting Nping 0.6.40 ( http://nmap.org/nping ) at 2022-06-30 16:24 UTC SENT (0.0553s) TCP 10.10.10.21:9783 > 10.10.10.10:389 S ttl=64 id=730 iplen=40 seq=2597195024 win=1480 RCVD (0.0556s) TCP 10.10.10.10:389 > 10.10.10.21:9783 SA ttl=128 id=22332 iplen=44 seq=4170716243 win=8192 <mss 8961> Max rtt: 0.310ms | Min rtt: 0.310ms | Avg rtt: 0.310ms Raw packets sent: 1 (40B) | Rcvd: 1 (44B) | Lost: 0 (0.00%) Nping done: 1 IP address pinged in 1.09 seconds<br> The following is an example of an nping test where there is no connectivity to or response from the corp.domain.com destination: nping -d corp.domain.com -p 389 -c 1 -t tcp Confirm that the gateway can reach the domain controller by running an nping test API Version 2013-06-30 281 AWS Storage Gateway Amazon S3 File Gateway User Guide Starting Nping 0.6.40 ( http://nmap.org/nping ) at 2022-06-30 16:26 UTC SENT (0.0421s) TCP 10.10.10.21:47196 > 10.10.10.10:389 S ttl=64 id=30318 iplen=40 seq=1762671338 win=1480 Max rtt: N/A | Min rtt: N/A | Avg rtt: N/A Raw packets sent: 1 (40B) | Rcvd: 0 (0B) | Lost: 1 (100.00%) Nping done: 1 IP address pinged in 1.07 seconds Check the DHCP options set for the VPC of your Amazon EC2 gateway instance If the File Gateway is running on an Amazon EC2 instance, then you must make sure a DHCP options set is properly configured and attached to the Amazon Virtual Private Cloud (VPC) that contains the gateway instance. For more information, see DHCP option sets in Amazon VPC. Confirm that the gateway can resolve the domain by running a dig query If the domain isn't resolvable by the gateway, then the gateway can't join the domain. To run a dig query: 1. Connect to the gateway local console using your hypervisor management software (VMware, Hyper-V, or KVM) for on-premises gateways, or using ssh for Amazon EC2 gateways. 2. Enter the corresponding numeral to select Gateway Console, and then enter h to list all available commands. To test whether the gateway can resolve the domain, run the following command: dig -d corp.domain.com Note Replace corp.domain.com with your Active Directory domain DNS name. The following is an example of a successful response: ; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.amzn2.5.2 <<>> corp.domain.com Check the DHCP options set for the VPC of your Amazon EC2 gateway instance API Version 2013-06-30 282 AWS Storage Gateway ;; global options: +cmd Amazon S3 File Gateway User Guide ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24817 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4000 ;; QUESTION SECTION: ;corp.domain.com. IN A ;; ANSWER SECTION: corp.domain.com. 600 IN A 10.10.10.10 corp.domain.com. 600 IN A 10.10.20.10 ;; Query time: 0 msec ;; SERVER: 10.10.20.228#53(10.10.20.228) ;; WHEN: Thu Jun 30 16:36:32 UTC 2022 ;; MSG SIZE rcvd: 78 Check the domain controller settings and roles Verify that the domain controller isn't set to read-only, and that the domain controller has enough roles for computers to join. To test this, try joining other servers from the same VPC subnet as the gateway VM to the domain. Check that the gateway is joined to the nearest domain controller As a best practice, we recommend joining your gateway to a domain controller that is geographically close to the gateway appliance. If the gateway appliance can't communicate with the domain controller within 20 seconds due to network latency, then the domain joining process can time out. For example, the process might time out if the gateway appliance is in the US East (N. Virginia) AWS Region and the domain controller is in the Asia Pacific (Singapore) AWS Region. Note To increase the default timeout value of 20 seconds, you can run the join-domain command in the AWS Command Line Interface (AWS CLI) and include the --timeout-in-seconds option to increase the time. You can also use the JoinDomain API call and include the TimeoutInSeconds parameter to increase the time. The maximum timeout value is 3,600 seconds. Check the domain controller settings and roles API Version 2013-06-30 283 AWS Storage Gateway Amazon S3 File Gateway User Guide If you receive errors when running AWS CLI commands, make sure that you’re using the most recent AWS CLI version. Confirm that Active Directory creates new computer objects in the default organizational unit (OU) Make sure Microsoft Active Directory does not have any Group Policy Objects that create new computer objects in any location other than the default OU. Before you can join your gateway to the Active
storagegateway-s3file-ug-112
storagegateway-s3file-ug.pdf
112
parameter to increase the time. The maximum timeout value is 3,600 seconds. Check the domain controller settings and roles API Version 2013-06-30 283 AWS Storage Gateway Amazon S3 File Gateway User Guide If you receive errors when running AWS CLI commands, make sure that you’re using the most recent AWS CLI version. Confirm that Active Directory creates new computer objects in the default organizational unit (OU) Make sure Microsoft Active Directory does not have any Group Policy Objects that create new computer objects in any location other than the default OU. Before you can join your gateway to the Active Directory domain, a new computer object must exist in the default OU. Some Active Directory environments are customized to have different OUs for newly created objects. To guarantee that a new computer object for the gateway VM exists in the default OU, try creating the computer object manually on your domain controller before you join the gateway to the domain. You can also run the join-domain command using the AWS CLI. Then, specify the option for -- organizational-unit. Note The process of creating the computer object is called pre-staging. Check your domain controller event logs If you can't join the gateway to the domain after trying all other checks and configurations described in the previous sections, we recommend examining your domain controller event logs. Check for any errors in the event viewer of the domain controller. Verify that the gateway queries have reached the domain controller. Troubleshooting: internal error during gateway activation Storage Gateway activation requests traverse two network paths. Incoming activation requests sent by a client connect to the gateway's virtual machine (VM) or Amazon Elastic Compute Cloud (Amazon EC2) instance over port 80. If the gateway successfully receives the activation request, then the gateway communicates with the Storage Gateway endpoints to receive an activation key. If the gateway can't reach the Storage Gateway endpoints, then the gateway responds to the client with an internal error message. Confirm that Active Directory creates new computer objects in the default organizational unit (OU) API Version 2013-06-30 284 AWS Storage Gateway Amazon S3 File Gateway User Guide Use the following troubleshooting information to determine what to do if you receive an internal error message when attempting to activate your AWS Storage Gateway. Note • Make sure you deploy new gateways using the latest virtual machine image file or Amazon Machine Image (AMI) version. You will receive an internal error if you attempt to activate a gateway that uses an outdated AMI. • Make sure that you select the correct gateway type that you intend to deploy before you download the AMI. The .ova files and AMIs for each gateway type are different, and they are not interchangeable. Resolve errors when activating your gateway using a public endpoint To resolve activation errors when activating your gateway using a public endpoint, perform the following checks and configurations. Check the required ports For gateways deployed on-premises, check that the ports are open on your local firewall. For gateways deployed on an Amazon EC2 instance, check that the ports are open on the instance's security group. To confirm that the ports are open, run a telnet command on the public endpoint from a server. This server must be in the same subnet as the gateway. For example, the following telnet commands test the connection to port 443: telnet d4kdq0yaxexbo.cloudfront.net 443 telnet storagegateway.region.amazonaws.com 443 telnet dp-1.storagegateway.region.amazonaws.com 443 telnet proxy-app.storagegateway.region.amazonaws.com 443 telnet client-cp.storagegateway.region.amazonaws.com 443 telnet anon-cp.storagegateway.region.amazonaws.com 443 To confirm that the gateway itself can reach the endpoint, access the gateway's local VM console (for gateways deployed on-premises). Or, you can SSH to the gateway's instance (for gateways deployed on Amazon EC2). Then, run a network connectivity test. Confirm that the test returns [PASSED]. For more information, see Testing your gateway's network connectivity. Resolve errors when activating your gateway using a public endpoint API Version 2013-06-30 285 AWS Storage Gateway Amazon S3 File Gateway User Guide Note The default login user name for the gateway console is admin, and the default password is password. Make sure firewall security does not modify packets sent from the gateway to the public endpoints SSL inspections, deep packet inspections, or other forms of firewall security can interfere with packets sent from the gateway. The SSL handshake fails if the SSL certificate is modified from what the activation endpoint expects. To confirm that there's no SSL inspection in progress, run an OpenSSL command on the main activation endpoint ( anon- cp.storagegateway.region.amazonaws.com) on port 443. You must run this command from a machine that's in the same subnet as the gateway: $ openssl s_client -connect anon-cp.storagegateway.region.amazonaws.com:443 - servername anon-cp.storagegateway.region.amazonaws.com Note Replace region with your AWS Region. If there's no SSL inspection in progress, then the command returns a response similar to the following: $ openssl
storagegateway-s3file-ug-113
storagegateway-s3file-ug.pdf
113
firewall security can interfere with packets sent from the gateway. The SSL handshake fails if the SSL certificate is modified from what the activation endpoint expects. To confirm that there's no SSL inspection in progress, run an OpenSSL command on the main activation endpoint ( anon- cp.storagegateway.region.amazonaws.com) on port 443. You must run this command from a machine that's in the same subnet as the gateway: $ openssl s_client -connect anon-cp.storagegateway.region.amazonaws.com:443 - servername anon-cp.storagegateway.region.amazonaws.com Note Replace region with your AWS Region. If there's no SSL inspection in progress, then the command returns a response similar to the following: $ openssl s_client -connect anon-cp.storagegateway.us-east-2.amazonaws.com:443 - servername anon-cp.storagegateway.us-east-2.amazonaws.com CONNECTED(00000003) depth=2 C = US, O = Amazon, CN = Amazon Root CA 1 verify return:1 depth=1 C = US, O = Amazon, OU = Server CA 1B, CN = Amazon verify return:1 depth=0 CN = anon-cp.storagegateway.us-east-2.amazonaws.com verify return:1 --- Certificate chain 0 s:/CN=anon-cp.storagegateway.us-east-2.amazonaws.com Resolve errors when activating your gateway using a public endpoint API Version 2013-06-30 286 AWS Storage Gateway Amazon S3 File Gateway User Guide i:/C=US/O=Amazon/OU=Server CA 1B/CN=Amazon 1 s:/C=US/O=Amazon/OU=Server CA 1B/CN=Amazon i:/C=US/O=Amazon/CN=Amazon Root CA 1 2 s:/C=US/O=Amazon/CN=Amazon Root CA 1 i:/C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./CN=Starfield Services Root Certificate Authority - G2 3 s:/C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./CN=Starfield Services Root Certificate Authority - G2 i:/C=US/O=Starfield Technologies, Inc./OU=Starfield Class 2 Certification Authority --- If there is an ongoing SSL inspection, then the response shows an altered certificate chain, similar to the following: $ openssl s_client -connect anon-cp.storagegateway.ap-southeast-1.amazonaws.com:443 - servername anon-cp.storagegateway.ap-southeast-1.amazonaws.com CONNECTED(00000003) depth=0 DC = com, DC = amazonaws, OU = AWS, CN = anon-cp.storagegateway.ap- southeast-1.amazonaws.com verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 DC = com, DC = amazonaws, OU = AWS, CN = anon-cp.storagegateway.ap- southeast-1.amazonaws.com verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/DC=com/DC=amazonaws/OU=AWS/CN=anon-cp.storagegateway.ap-southeast-1.amazonaws.com i:/C=IN/O=Company/CN=Admin/ST=KA/L=New town/OU=SGW/[email protected] --- The activation endpoint accepts SSL handshakes only if it recognizes the SSL certificate. This means that the gateway's outbound traffic to the endpoints must be exempt from inspections performed by firewalls in your network. These inspections might be an SSL inspection or a deep packet inspection. Check gateway time synchronization Excessive time skews can cause SSL handshake errors. For on-premises gateways, you can use the gateway's local VM console to check your gateway's time synchronization. The time skew should be no larger than 60 seconds. For more information, see Synchronizing Your Gateway VM Time. Resolve errors when activating your gateway using a public endpoint API Version 2013-06-30 287 AWS Storage Gateway Amazon S3 File Gateway User Guide The System Time Management option isn't available on gateways that are hosted on Amazon EC2 instances. To make sure Amazon EC2 gateways can properly synchronize time, confirm that the Amazon EC2 instance can connect to the following NTP server pool list over ports UDP and TCP 123: • 0.amazon.pool.ntp.org • 1.amazon.pool.ntp.org • 2.amazon.pool.ntp.org • 3.amazon.pool.ntp.org Resolve errors when activating your gateway using an Amazon VPC endpoint To resolve activation errors when activating your gateway using an Amazon Virtual Private Cloud (Amazon VPC) endpoint, perform the following checks and configurations. Check the required ports Make sure the required ports within your local firewall (for gateways deployed on-premises) or security group (for gateways deployed in Amazon EC2) are open. The ports required for connecting a gateway to a Storage Gateway VPC endpoint differ from those required when connecting a gateway to public endpoints. The following ports are required for connecting to a Storage Gateway VPC endpoint: • TCP 443 • TCP 1026 • TCP 1027 • TCP 1028 • TCP 1031 • TCP 2222 For more information, see Creating a VPC endpoint for Storage Gateway. Additionally, check the security group that's attached to your Storage Gateway VPC endpoint. The default security group attached to the endpoint might not allow the required ports. Create a new Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 288 AWS Storage Gateway Amazon S3 File Gateway User Guide security group that allows traffic from your gateway's IP address range over the required ports. Then, attach that security group to the VPC endpoint. Note Use the Amazon VPC console to verify the security group that's attached to the VPC endpoint. View your Storage Gateway VPC endpoint from the console, and then choose the Security Groups tab. To confirm that the required ports are open, you can run telnet commands on the Storage Gateway VPC Endpoint. You must run these commands from a server that's in the same subnet as the gateway. You can run the tests on the first DNS name that doesn't specify an Availability Zone. For example, the following telnet commands test the required port connections using the DNS name vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com: telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 443 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1026 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1027 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1028 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1031 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 2222 Make sure firewall security does not
storagegateway-s3file-ug-114
storagegateway-s3file-ug.pdf
114
the console, and then choose the Security Groups tab. To confirm that the required ports are open, you can run telnet commands on the Storage Gateway VPC Endpoint. You must run these commands from a server that's in the same subnet as the gateway. You can run the tests on the first DNS name that doesn't specify an Availability Zone. For example, the following telnet commands test the required port connections using the DNS name vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com: telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 443 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1026 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1027 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1028 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1031 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 2222 Make sure firewall security does not modify packets sent from the gateway to your Storage Gateway Amazon VPC endpoint SSL inspections, deep packet inspections, or other forms of firewall security can interfere with packets sent from the gateway. The SSL handshake fails if the SSL certificate is modified from what the activation endpoint expects. To confirm that there's no SSL inspection in progress, run an OpenSSL command on your Storage Gateway VPC endpoint. You must run this command from a machine that's in the same subnet as the gateway. Run the command for each required port: $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:443 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1026 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 289 AWS Storage Gateway Amazon S3 File Gateway User Guide $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1027 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1028 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1031 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:2222 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com If there's no SSL inspection in progress, then the command returns a response similar to the following: openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1027 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com CONNECTED(00000005) depth=2 C = US, O = Amazon, CN = Amazon Root CA 1 verify return:1 depth=1 C = US, O = Amazon, OU = Server CA 1B, CN = Amazon verify return:1 depth=0 CN = anon-cp.storagegateway.us-east-1.amazonaws.com verify return:1 --- Certificate chain 0 s:CN = anon-cp.storagegateway.us-east-1.amazonaws.com i:C = US, O = Amazon, OU = Server CA 1B, CN = Amazon 1 s:C = US, O = Amazon, OU = Server CA 1B, CN = Amazon i:C = US, O = Amazon, CN = Amazon Root CA 1 2 s:C = US, O = Amazon, CN = Amazon Root CA 1 i:C = US, ST = Arizona, L = Scottsdale, O = "Starfield Technologies, Inc.", CN = Starfield Services Root Certificate Authority - G2 3 s:C = US, ST = Arizona, L = Scottsdale, O = "Starfield Technologies, Inc.", CN = Starfield Services Root Certificate Authority - G2 i:C = US, O = "Starfield Technologies, Inc.", OU = Starfield Class 2 Certification Authority --- Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 290 AWS Storage Gateway Amazon S3 File Gateway User Guide If there is an ongoing SSL inspection, then the response shows an altered certificate chain, similar to the following: openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1027 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com CONNECTED(00000005) depth=2 C = US, O = Amazon, CN = Amazon Root CA 1 verify return:1 depth=1 C = US, O = Amazon, OU = Server CA 1B, CN = Amazon verify return:1 depth=0 DC = com, DC = amazonaws, OU = AWS, CN = anon-cp.storagegateway.us- east-1.amazonaws.com verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/DC=com/DC=amazonaws/OU=AWS/CN=anon-cp.storagegateway.us-east-1.amazonaws.com i:/C=IN/O=Company/CN=Admin/ST=KA/L=New town/OU=SGW/[email protected] --- The activation endpoint accepts SSL handshakes only if it recognizes the SSL certificate. This means that the gateway's outbound traffic to your VPC endpoint over required ports is exempt from inspections performed by your network firewalls. These inspections might be SSL inspections or deep packet inspections. Check gateway time synchronization Excessive time skews can cause SSL handshake errors. For on-premises gateways, you can use the gateway's local VM console to check your gateway's time synchronization. The time skew should be no larger than 60 seconds. For more information, see Synchronizing Your Gateway VM Time. The System Time Management option isn't available on gateways that are hosted on Amazon EC2 instances. To make sure Amazon EC2 gateways can properly synchronize time, confirm that the Amazon EC2 instance can connect to the following NTP server pool list over ports UDP and TCP 123: • 0.amazon.pool.ntp.org • 1.amazon.pool.ntp.org • 2.amazon.pool.ntp.org Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 291 AWS Storage Gateway • 3.amazon.pool.ntp.org Amazon S3 File Gateway User Guide Check for an HTTP proxy and confirm associated security group settings Before activation, check if you have an HTTP proxy on Amazon EC2 configured on the on-premises gateway VM as a Squid proxy on port 3128. In this case, confirm the following: • The security group attached to the HTTP proxy on Amazon EC2 must have an inbound rule. This inbound rule must allow
storagegateway-s3file-ug-115
storagegateway-s3file-ug.pdf
115
UDP and TCP 123: • 0.amazon.pool.ntp.org • 1.amazon.pool.ntp.org • 2.amazon.pool.ntp.org Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 291 AWS Storage Gateway • 3.amazon.pool.ntp.org Amazon S3 File Gateway User Guide Check for an HTTP proxy and confirm associated security group settings Before activation, check if you have an HTTP proxy on Amazon EC2 configured on the on-premises gateway VM as a Squid proxy on port 3128. In this case, confirm the following: • The security group attached to the HTTP proxy on Amazon EC2 must have an inbound rule. This inbound rule must allow Squid proxy traffic on port 3128 from the gateway VM's IP address. • The security group attached to the Amazon EC2 VPC endpoint must have inbound rules. These inbound rules must allow traffic on ports 1026-1028, 1031, 2222, and 443 from the IP address of the HTTP proxy on Amazon EC2. Resolve errors when activating your gateway using a public endpoint and there is a Storage Gateway VPC endpoint in the same VPC To resolve errors when activating your gateway using a public endpoint when there is a Amazon Virtual Private Cloud (Amazon VPC) enpoint in the same VPC, perform the following checks and configurations. Confirm that the Enable Private DNS Name setting isn't enabled on your Storage Gateway VPC endpoint If Enable Private DNS Name is enabled, you can't activate any gateways from that VPC to the public endpoint. To disable the private DNS name option: 1. Open the Amazon VPC console. 2. In the navigation pane, choose Endpoints. 3. Choose your Storage Gateway VPC endpoint. 4. Choose Actions. 5. Choose Manage Private DNS Names. 6. For Enable Private DNS Name, clear Enable for this Endpoint. 7. Choose Modify Private DNS Names to save the setting. Resolve errors when activating your gateway using a public endpoint and there is a Storage Gateway VPC endpoint in the same VPC API Version 2013-06-30 292 AWS Storage Gateway Amazon S3 File Gateway User Guide Troubleshooting: on-premises gateway issues You can find information following about typical issues that you might encounter working with your on-premises gateways, and how to allow Support to connect to your gateway to assist with troubleshooting. The following table lists typical issues that you might encounter working with your on-premises gateways. Issue Action to Take You cannot find the IP address of your gateway. Use the hypervisor client to connect to your host to find the gateway IP address. • For VMware ESXi, the VM's IP address can be found in the vSphere client on the Summary tab. • For Microsoft Hyper-V, the VM's IP address can be found by logging into the local console. If you are still having trouble finding the gateway IP address: • Check that the VM is turned on. Only when the VM is turned on does an IP address get assigned to your gateway. • Wait for the VM to finish startup. If you just turned on your VM, then it might take several minutes for the gateway to finish its boot sequence. • Allow the appropriate ports for your gateway. • If you use a firewall or router to filter or limit network traffic, you must configure your firewall and router to allow these service endpoints for outbound communication to AWS. For more information about network and firewall requirements, see Network and firewall requirements. • Check that the gateway VM can be accessed by pinging the VM from your client. You're having network or firewall problems. Your gateway's activatio n fails when you click the Proceed to Activation Troubleshooting: on-premises gateway issues API Version 2013-06-30 293 AWS Storage Gateway Amazon S3 File Gateway User Guide Issue Action to Take button in the Storage • Check that your VM has network connectivity to the internet. Gateway Management Console. Otherwise, you'll need to configure a SOCKS proxy. For more information on doing so, see Testing your gateway's network connectivity. • Check that the host has the correct time, that the host is configured to synchronize its time automatically to a Network Time Protocol (NTP) server, and that the gateway VM has the correct time. For information about synchronizing the time of hypervisor hosts and VMs, see Configuring a Network Time Protocol (NTP) server for your gateway. • After performing these steps, you can retry the gateway deployment using the Storage Gateway console and the Setup and Activate Gateway wizard. • Check that your VM has at least 16 GB of RAM. Gateway allocation fails if there is less than 16 GB of RAM. For more information, see File Gateway setup requirements. You need to improve bandwidth between your You can improve the bandwidth from your gateway to AWS by setting up your internet connection to AWS on a network adapter gateway and AWS. (NIC)
storagegateway-s3file-ug-116
storagegateway-s3file-ug.pdf
116
VMs, see Configuring a Network Time Protocol (NTP) server for your gateway. • After performing these steps, you can retry the gateway deployment using the Storage Gateway console and the Setup and Activate Gateway wizard. • Check that your VM has at least 16 GB of RAM. Gateway allocation fails if there is less than 16 GB of RAM. For more information, see File Gateway setup requirements. You need to improve bandwidth between your You can improve the bandwidth from your gateway to AWS by setting up your internet connection to AWS on a network adapter gateway and AWS. (NIC) separate from that connecting your applications and the gateway VM. Taking this approach is useful if you have a high- bandwidth connection to AWS and you want to avoid bandwidth contention, especially during a snapshot restore. For high-thro ughput workload needs, you can use AWS Direct Connect to establish a dedicated network connection between your on-premis es gateway and AWS. To measure the bandwidth of the connectio n from your gateway to AWS, use the CloudBytesDownload metrics of the gateway. ed and CloudBytesUploaded For more on this subject, see Performance and optimization. Improving your internet connectivity helps to ensure that your upload buffer does not fill up. Troubleshooting: on-premises gateway issues API Version 2013-06-30 294 AWS Storage Gateway Amazon S3 File Gateway User Guide Issue Action to Take Throughput to or from your gateway drops to • On the Gateway tab of the Storage Gateway console, verify that the IP addresses for your gateway VM are the same that you zero. see using your hypervisor client software (that is, the VMware vSphere client or Microsoft Hyper-V Manager). If you find a mismatch, restart your gateway from the Storage Gateway console, as shown in Shutting down your gateway VM. After the restart, the addresses in the IP Addresses list in the Storage Gateway console's Gateway tab should match the IP addresses for your gateway, which you determine from the hypervisor client. • For VMware ESXi, the VM's IP address can be found in the vSphere client on the Summary tab. • For Microsoft Hyper-V, the VM's IP address can be found by logging into the local console. • Check your gateway's connectivity to AWS as described in Testing your gateway's network connectivity. • Check your gateway's network adapter configuration in your hypervisor management client and ensure that all the interfaces you intend to use for the gateway are activated. • Check your gateway's network adapter configuration in the gateway local console. For instructions, see Configuring your gateway network settings. You can view the throughput to and from your gateway from the Amazon CloudWatch console. For more information about measuring throughput to and from your gateway to AWS, see Performance and optimization. See Troubleshooting: Microsoft Hyper-V setup, which discusses some of the common issues of deploying a gateway on Microsoft Hyper-V. You are having trouble importing (deploying) Storage Gateway on Microsoft Hyper-V. Troubleshooting: on-premises gateway issues API Version 2013-06-30 295 AWS Storage Gateway Amazon S3 File Gateway User Guide Issue Action to Take You receive a message that says: "The data that You receive this message if your gateway VM was created from a clone or snapshot of another gateway VM. If this isn’t the case, has been written to the contact Support. volume in your gateway isn't securely stored at AWS". Troubleshooting: Security scans show open NFS ports Certain NFS ports are enabled by default, even on gateways that you only use with SMB file shares. If you use third-party security software such as Qualys to scan the network where your File Gateway is deployed, the scan results might report these open NFS ports as a potential security vulnerability. If you only use your gateway with SMB file shares and you want to disable the unused NFS ports for security reasons, use the following procedure: To disable NFS ports on a File Gateway: 1. Access the gateway local console command prompt using the procedure outlined in https:// docs.aws.amazon.com/filegateway/latest/files3/MaintenanceGatewayConsole-fgw.html. 2. Enter the following commands to disable NFS traffic: iptables -I INPUT -p udp -m udp --dport 111 -j DROP iptables -I INPUT -p udp -m udp --dport 2049 -j DROP iptables -I INPUT -p udp -m udp --dport 20048 -j DROP iptables -I INPUT -p tcp -m tcp --dport 111 -j DROP iptables -I INPUT -p tcp -m tcp --dport 2049 -j DROP iptables -I INPUT -p tcp -m tcp --dport 20048 -j DROP 3. Enter the following command to confirm that the blocked NFS ports appear in the IP tables: iptables -n -L -v --line-numbers Troubleshooting: Open NFS ports API Version 2013-06-30 296 AWS Storage Gateway Amazon S3 File Gateway User Guide Turning on Support access to help troubleshoot your gateway hosted on-premises Storage Gateway provides a local console you can
storagegateway-s3file-ug-117
storagegateway-s3file-ug.pdf
117
INPUT -p udp -m udp --dport 20048 -j DROP iptables -I INPUT -p tcp -m tcp --dport 111 -j DROP iptables -I INPUT -p tcp -m tcp --dport 2049 -j DROP iptables -I INPUT -p tcp -m tcp --dport 20048 -j DROP 3. Enter the following command to confirm that the blocked NFS ports appear in the IP tables: iptables -n -L -v --line-numbers Troubleshooting: Open NFS ports API Version 2013-06-30 296 AWS Storage Gateway Amazon S3 File Gateway User Guide Turning on Support access to help troubleshoot your gateway hosted on-premises Storage Gateway provides a local console you can use to perform several maintenance tasks, including allowing Support to access your gateway to assist you with troubleshooting gateway issues. By default, Support access to your gateway is turned off. You turn on this access through the host's local console. To give Support access to your gateway, you first log in to the local console for the host, navigate to the Storage Gateway's console, and then connect to the support server. To turn on Support access to your gateway 1. Log in to your host's local console. • VMware ESXi – for more information, see Accessing the Gateway Local Console with VMware ESXi. • Microsoft Hyper-V – for more information, see Access the Gateway Local Console with Microsoft Hyper-V. 2. At the prompt, enter the corresponding numeral to select Gateway Console. 3. Enter h to open the list of available commands. 4. Do one of the following: • If your gateway is using a public endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel to connect to customer support for Storage Gateway. Allow TCP port 22 so you can open a support channel to AWS. When you connect to customer support, Storage Gateway assigns you a support number. Make a note of your support number. • If your gateway is using a VPC endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel. If your gateway is not activated, provide the VPC endpoint or IP address to connect to customer support for Storage Gateway. Allow TCP port 22 so you can open a support channel to AWS. When you connect to customer support, Storage Gateway assigns you a support number. Make a note of your support number. Note The channel number is not a Transmission Control Protocol/User Datagram Protocol (TCP/UDP) port number. Instead, the gateway makes a Secure Shell (SSH) (TCP 22) Turning on Support access to help troubleshoot your gateway API Version 2013-06-30 297 AWS Storage Gateway Amazon S3 File Gateway User Guide connection to Storage Gateway servers and provides the support channel for the connection. 5. After the support channel is established, provide your support service number to Support so Support can provide troubleshooting assistance. 6. When the support session is completed, enter q to end it. Don't close the session until Amazon Web Services Support notifies you that the support session is complete. 7. 8. Enter exit to log out of the Storage Gateway console. Follow the prompts to exit the local console. Troubleshooting: Microsoft Hyper-V setup The following table lists typical issues that you might encounter when deploying Storage Gateway on the Microsoft Hyper-V platform. Issue Action to Take You try to import a gateway and receive the following error message: "A server error occurred while attempting to import the virtual machine. Import failed. Unable to find virtual machine import files under location [...]. You can import a virtual machine only if you used Hyper-V to create and export it." This error can occur for the following reasons: • If you are not pointing to the root of the unzipped gateway source files. The last part of the location you specify in the Import Virtual Machine dialog box should be AWS-Storage- Gateway . For example: C:\prod-gateway\unzippedSourceVM\AWS- Storage-Gateway\ . • If you have already deployed a gateway and you did not select the Copy the virtual machine option and check the Duplicate all files option in the Import Virtual Machine dialog box, then the VM was created in the location where you have the unzipped gateway files and you cannot import from this location again. To fix this problem, get a fresh copy of the unzipped gateway source files and copy to a new location. Use the new location as the source of the import. Troubleshooting: Microsoft Hyper-V setup issues API Version 2013-06-30 298 AWS Storage Gateway Amazon S3 File Gateway User Guide Issue Action to Take If you plan on creating multiple gateways from one unzipped source files location, you must select Copy the virtual machine and check the Duplicate all files box in the Import Virtual Machine dialog box. If you have already deployed a gateway and you try to reuse the default folders that store the virtual hard disk files and virtual machine configuration files, then this
storagegateway-s3file-ug-118
storagegateway-s3file-ug.pdf
118
copy to a new location. Use the new location as the source of the import. Troubleshooting: Microsoft Hyper-V setup issues API Version 2013-06-30 298 AWS Storage Gateway Amazon S3 File Gateway User Guide Issue Action to Take If you plan on creating multiple gateways from one unzipped source files location, you must select Copy the virtual machine and check the Duplicate all files box in the Import Virtual Machine dialog box. If you have already deployed a gateway and you try to reuse the default folders that store the virtual hard disk files and virtual machine configuration files, then this error will occur. To fix this problem, specify new locations under Server in the panel on the left side of the Hyper-V Settings dialog box. When you import the gateway make sure you select Copy the virtual machine and check the Duplicate all files box in the Import Virtual Machine dialog box to create a new unique ID for the VM. You try to import a gateway and receive the following error message: "A server error occurred while attempting to import the virtual machine. Import failed. Import task failed to copy file from [...]: The file exists. (0x80070050)" You try to import a gateway and receive the following error message: "A server error occurred while attempting to import the virtual machine. Import failed. Import failed because the virtual machine must have a new identifier. Select a new identifier and try the import again." Troubleshooting: Microsoft Hyper-V setup issues API Version 2013-06-30 299 AWS Storage Gateway Amazon S3 File Gateway User Guide Issue Action to Take You try to start a gateway VM and receive the This error is likely caused by a CPU discrepancy between the required CPUs for the gateway and the available CPUs on the host. following error message: Ensure that the VM CPU count is supported by the underlying "An error occurred while hypervisor. attempting to start the For more information about the requirements for Storage selected virtual machine(s Gateway, see File Gateway setup requirements. ). The child partition processor setting is incompatible with parent partition. 'AWS-Stor age-Gateway' could not initialize. (Virtual machine ID [...])" You try to start a gateway VM and receive the This error is likely caused by a RAM discrepancy between the required RAM for the gateway and the available RAM on the host. following error message: "An error occurred while Gateway, see File Gateway setup requirements. For more information about the requirements for Storage attempting to start the selected virtual machine(s ). 'AWS-Storage-Gatew ay' could not initializ e. (Virtual machine ID [...]) Failed to create partition: Insufficient system resources exist to complete the requested service. (0x800705AA)" Troubleshooting: Microsoft Hyper-V setup issues API Version 2013-06-30 300 AWS Storage Gateway Amazon S3 File Gateway User Guide Issue Action to Take Your snapshots and gateway software updates The gateway VM's clock might be offset from the actual time, known as clock drift. Check and correct the VM's time using are occurring at slightly local gateway console's time synchronization option. For more different times than information, see Configuring a Network Time Protocol (NTP) expected. server for your gateway. You need to put the unzipped Microsoft Hyper- V Storage Gateway files on the host file system. Access the host as you do a typical Microsoft Windows server. For example, if the hypervisor host is name hyperv-server , then you can use the following UNC path \\hyperv-server\c$ , which assumes that the name hyperv-server can be resolved or is defined in your local hosts file. You are prompted for credentials when Add your user credentials as a local administrator for the hypervisor host by using the Sconfig.cmd tool. connecting to hypervisor. You may notice poor network performance For information about a workaround, see the Microsoft documentation, see Poor network performance on virtual if you turn on virtual machines on a Windows Server 2012 Hyper-V host if VMQ is machine queue (VMQ) turned on. for a Hyper-V host that's using a Broadcom network adapter. Troubleshooting: Amazon EC2 gateway issues In the following sections, you can find typical issues that you might encounter working with your gateway deployed on Amazon EC2. For more information about the difference between an on- premises gateway and a gateway deployed in Amazon EC2, see Deploy a default Amazon EC2 host for S3 File Gateway. For information about using ephemeral storage, see Using ephemeral storage with EC2 gateways. Topics • Your gateway activation hasn't occurred after a few moments Troubleshooting: Amazon EC2 gateway issues API Version 2013-06-30 301 AWS Storage Gateway Amazon S3 File Gateway User Guide • You can't find your EC2 gateway instance in the instance list • You want to connect to your gateway instance using the Amazon EC2 serial console • You want Support to help troubleshoot your Amazon EC2 gateway
storagegateway-s3file-ug-119
storagegateway-s3file-ug.pdf
119
premises gateway and a gateway deployed in Amazon EC2, see Deploy a default Amazon EC2 host for S3 File Gateway. For information about using ephemeral storage, see Using ephemeral storage with EC2 gateways. Topics • Your gateway activation hasn't occurred after a few moments Troubleshooting: Amazon EC2 gateway issues API Version 2013-06-30 301 AWS Storage Gateway Amazon S3 File Gateway User Guide • You can't find your EC2 gateway instance in the instance list • You want to connect to your gateway instance using the Amazon EC2 serial console • You want Support to help troubleshoot your Amazon EC2 gateway Your gateway activation hasn't occurred after a few moments Check the following in the Amazon EC2 console: • Port 80 is open in the security group that you associated with the instance. For more information about adding a security group rule, see Adding a security group rule in the Amazon EC2 User Guide. • The gateway instance is marked as running. In the Amazon EC2 console, the State value for the instance should be RUNNING. • Make sure that your Amazon EC2 instance type meets the minimum requirements, as described in Storage requirements. After correcting the problem, try activating the gateway again. To do this, open the Storage Gateway console, choose Deploy a new Gateway on Amazon EC2, and re-enter the IP address of the instance. You can't find your EC2 gateway instance in the instance list If you didn't give your instance a resource tag and you have many instances running, it can be hard to tell which instance you launched. In this case, you can take the following actions to find the gateway instance: • Check the name of the Amazon Machine Image (AMI) on the Description tab of the instance. An instance based on the Storage Gateway AMI should start with the text aws-storage-gateway- ami. • If you have several instances based on the Storage Gateway AMI, check the instance launch time to find the correct instance. Gateway activation hasn't occurred after a few moments API Version 2013-06-30 302 AWS Storage Gateway Amazon S3 File Gateway User Guide You want to connect to your gateway instance using the Amazon EC2 serial console You can use the Amazon EC2 serial console to troubleshoot boot, network configuration, and other issues. For instructions and troubleshooting tips, see Amazon EC2 Serial Console in the Amazon Elastic Compute Cloud User Guide. You want Support to help troubleshoot your Amazon EC2 gateway Storage Gateway provides a local console you can use to perform several maintenance tasks, including allowing Support to access your gateway to assist you with troubleshooting gateway issues. By default, Support access to your gateway is turned off. You turn on this access through the Amazon EC2 local console. You log in to the Amazon EC2 local console through a Secure Shell (SSH). To successfully log in through SSH, your instance's security group must have a rule that opens TCP port 22. Note If you add a new rule to an existing security group, the new rule applies to all instances that use that security group. For more information about security groups and how to add a security group rule, see Amazon EC2 security groups in the Amazon EC2 User Guide. To let Support connect to your gateway, you first log in to the local console for the Amazon EC2 instance, navigate to the Storage Gateway's console, and then provide the access. To turn on Support access for a gateway deployed on an Amazon EC2 instance 1. Log in to the local console for your Amazon EC2 instance. For instructions, go to Connect to your instance in the Amazon EC2 User Guide. You can use the following command to log in to the EC2 instance's local console. ssh –i PRIVATE-KEY admin@INSTANCE-PUBLIC-DNS-NAME Connect to your Amazon EC2 gateway using the serial console API Version 2013-06-30 303 AWS Storage Gateway Amazon S3 File Gateway User Guide Note The PRIVATE-KEY is the .pem file containing the private certificate of the EC2 key pair that you used to launch the Amazon EC2 instance. For more information, see Retrieving the public key for your key pair in the Amazon EC2 User Guide. The INSTANCE-PUBLIC-DNS-NAME is the public Domain Name System (DNS) name of your Amazon EC2 instance that your gateway is running on. You obtain this public DNS name by selecting the Amazon EC2 instance in the EC2 console and clicking the Description tab. 2. At the prompt, enter 6 - Command Prompt to open the Support Channel console. 3. Enter h to open the AVAILABLE COMMANDS window. 4. Do one of the following: • If your gateway is using a public endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel to connect to customer support for Storage Gateway. Allow TCP port 22 so you can open
storagegateway-s3file-ug-120
storagegateway-s3file-ug.pdf
120
public Domain Name System (DNS) name of your Amazon EC2 instance that your gateway is running on. You obtain this public DNS name by selecting the Amazon EC2 instance in the EC2 console and clicking the Description tab. 2. At the prompt, enter 6 - Command Prompt to open the Support Channel console. 3. Enter h to open the AVAILABLE COMMANDS window. 4. Do one of the following: • If your gateway is using a public endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel to connect to customer support for Storage Gateway. Allow TCP port 22 so you can open a support channel to AWS. When you connect to customer support, Storage Gateway assigns you a support number. Make a note of your support number. • If your gateway is using a VPC endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel. If your gateway is not activated, provide the VPC endpoint or IP address to connect to customer support for Storage Gateway. Allow TCP port 22 so you can open a support channel to AWS. When you connect to customer support, Storage Gateway assigns you a support number. Make a note of your support number. Note The channel number is not a Transmission Control Protocol/User Datagram Protocol (TCP/UDP) port number. Instead, the gateway makes a Secure Shell (SSH) (TCP 22) connection to Storage Gateway servers and provides the support channel for the connection. 5. After the support channel is established, provide your support service number to Support so Support can provide troubleshooting assistance. 6. When the support session is completed, enter q to end it. Don't close the session until Amazon Web Services Support notifies you that the support session is complete. Turning on Support access to help troubleshoot the gateway API Version 2013-06-30 304 AWS Storage Gateway Amazon S3 File Gateway User Guide 7. 8. Enter exit to exit the Storage Gateway console. Follow the console menus to log out of the Storage Gateway instance. Troubleshooting: hardware appliance issues The following topics discuss issues that you might encounter with the AWS Storage Gateway Hardware Appliance, and suggestions on troubleshooting these. Topics • You can't determine the service IP address • How do you perform a factory reset? • How do you perform a remote restart? • Where do you obtain Dell iDRAC support? • You can't find the hardware appliance serial number • Where to obtain hardware appliance support You can't determine the service IP address When attempting to connect to your service, make sure that you are using the service's IP address and not the host IP address. Configure the service IP address in the service console, and the host IP address in the hardware console. You see the hardware console when you start the hardware appliance. To go to the service console from the hardware console, choose Open Service Console. How do you perform a factory reset? If you need to perform a factory reset on your appliance, contact the AWS Storage Gateway Hardware Appliance team for support, as described in the Support section following. How do you perform a remote restart? If you need to perform a remote restart of your appliance, you can do so using the Dell iDRAC management interface. For more information, see iDRAC9 Virtual Power Cycle: Remotely power cycle Dell EMC PowerEdge Servers on the Dell Technologies InfoHub website. Troubleshooting: hardware appliance issues API Version 2013-06-30 305 AWS Storage Gateway Amazon S3 File Gateway User Guide Where do you obtain Dell iDRAC support? The Dell PowerEdge server comes with the Dell iDRAC management interface. We recommend the following: • If you use the iDRAC management interface, you should change the default password. For more information about the iDRAC credentials, see Dell PowerEdge - What is the default sign-in credentials for iDRAC?. • Make sure that the firmware is up-to-date to prevent security breaches. • Moving the iDRAC network interface to a normal (em) port can cause performance issues or prevent the normal functioning of the appliance. You can't find the hardware appliance serial number You can find the serial number for your AWS Storage Gateway Hardware Appliance using the Storage Gateway console. To find the hardware appliance serial number: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Hardware from the navigation menu on the left side of the page. 3. 4. Select your hardware appliance from the list. Locate the Serial Number field on the Details tab for your appliance. Where to obtain hardware appliance support To contact AWS about technical support for your hardware appliance, see Support. The Support team might ask you to activate the support channel to troubleshoot your gateway issues remotely. You don't need this port to be open for the normal operation of your gateway, but it is required for troubleshooting. You can activate
storagegateway-s3file-ug-121
storagegateway-s3file-ug.pdf
121
Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Hardware from the navigation menu on the left side of the page. 3. 4. Select your hardware appliance from the list. Locate the Serial Number field on the Details tab for your appliance. Where to obtain hardware appliance support To contact AWS about technical support for your hardware appliance, see Support. The Support team might ask you to activate the support channel to troubleshoot your gateway issues remotely. You don't need this port to be open for the normal operation of your gateway, but it is required for troubleshooting. You can activate the support channel from the hardware console as shown in the procedure following. To open a support channel for AWS 1. Open the hardware console. How to obtain Dell iDRAC support API Version 2013-06-30 306 AWS Storage Gateway Amazon S3 File Gateway User Guide 2. Choose Open Support Channel at the bottom of the main page of the hardware console, and then press Enter. The assigned port number should appear within 30 seconds if there are no network connectivity or firewall issues. For example: Status: Open on port 19599 3. Note the port number and provide it to Support. Troubleshooting: File Gateway issues You can configure your File Gateway to write log entries to a Amazon CloudWatch log group. If you do, you receive notifications about gateway health status and about any errors that the gateway encounters. You can find information about these error and health notifications in CloudWatch Logs. In the following sections, you can find information that can help you understand the cause of each error and health notification and how to fix issues. Topics • Error: 1344 (0x00000540) • Error: GatewayClockOutOfSync • Error: InaccessibleStorageClass • Error: InvalidObjectState • Error: ObjectMissing • Error: RoleTrustRelationshipInvalid • Error: S3AccessDenied • Error: DroppedNotifications • Notification: HardReboot • Notification: Reboot • Troubleshooting: Security scans show open NFS ports • Troubleshooting: Using CloudWatch metrics Troubleshooting: File Gateway issues API Version 2013-06-30 307 AWS Storage Gateway Amazon S3 File Gateway User Guide Error: 1344 (0x00000540) While migrating files to Amazon S3 you may encounter an ERROR 1344 (0x00000540) if you are trying to copy files with more than 10 Access Control Entries (ACEs) into Amazon S3. Access Control Entries are listed in the Access Control List (ACL). The Amazon S3 File Gateway can only preserve 10 ACE entries per given file or folder. To resolve an Error 1344: Copying NTFS Security to Destination Directory. Reduce the number of entries in Windows Permissions for files or folders that contain more than 10 entries. A common approach is to create a group containing the full list of entries, then replacing the list of entries with that single group. Once the number of entries is less the 10, you can retry copying the files or folders to the gateway. Error: GatewayClockOutOfSync You can get a GatewayClockOutOfSync error when the gateway detects a difference of 5 minutes or more between the local system time and the time reported by the AWS Storage Gateway servers. Clock synchronization issues can negatively impact connectivity between the gateway and AWS. If the gateway clock is out of sync, I/O errors might occur for NFS and SMB connections, and SMB users might experience authentication errors. To resolve a GatewayClockOutOfSync error • Check the network configuration between the gateway and the NTP server. For more information about synchronizing the gateway VM time and updating the NTP server configuration, see Configuring a Network Time Protocol (NTP) server for your gateway. Error: InaccessibleStorageClass You can get an InaccessibleStorageClass error when an object has moved out of the Amazon S3 Standard storage class. Your File Gateway usually encounters this error when it tries to either upload an object to or read an object from the Amazon S3 bucket. Generally, this error means the object has moved to Amazon S3 Glacier and is in either the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage class. Your S3 File Gateway can generate a cache report that lists all files in the gateway cache that are currently failing to upload to Amazon S3 due to this error. The information in this report can help Error: 1344 (0x00000540) API Version 2013-06-30 308 AWS Storage Gateway Amazon S3 File Gateway User Guide you work with Support to resolve issues with your gateway, Amazon S3, or IAM configuration. For more information, see Create a cache report. To resolve an InaccessibleStorageClass error • Restore the object from the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage class back to its original storage class in S3. If you restore the object to the S3 bucket to fix an upload error, the file is eventually uploaded. If you restore the object to fix a read error, the File Gateway's SMB or NFS
storagegateway-s3file-ug-122
storagegateway-s3file-ug.pdf
122
Version 2013-06-30 308 AWS Storage Gateway Amazon S3 File Gateway User Guide you work with Support to resolve issues with your gateway, Amazon S3, or IAM configuration. For more information, see Create a cache report. To resolve an InaccessibleStorageClass error • Restore the object from the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage class back to its original storage class in S3. If you restore the object to the S3 bucket to fix an upload error, the file is eventually uploaded. If you restore the object to fix a read error, the File Gateway's SMB or NFS client can then read the file. Error: InvalidObjectState You can get an InvalidObjectState error when a writer other than the specified File Gateway modifies the specified file in the specified Amazon S3 bucket. As a result, the state of the file for the File Gateway doesn't match its state in Amazon S3. Any subsequent uploads of the file to Amazon S3 or retrievals of the file from Amazon S3 fail. Your S3 File Gateway can generate a cache report that lists all files in the gateway cache that are currently failing to upload to Amazon S3 due to this error. The information in this report can help you work with Support to resolve issues with your gateway, Amazon S3, or IAM configuration. For more information, see Create a cache report. To resolve an InvalidObjectState error If the operation that modifies the file is S3Upload or S3GetObject, do the following: 1. Save the latest copy of the file to the local file system of your SMB or NFS client (you need this file copy in step 4). If the version of the file in Amazon S3 is the latest, download that version. You can do this using the AWS Management Console or AWS CLI. 2. Delete the file in Amazon S3 using the AWS Management Console or AWS CLI. 3. Delete the file from the File Gateway using your SMB or NFS client. 4. Copy the latest version of the file that you saved in step 1 to Amazon S3 using your SMB or NFS client. Do this through your File Gateway. Error: InvalidObjectState API Version 2013-06-30 309 AWS Storage Gateway Amazon S3 File Gateway User Guide Error: ObjectMissing You can get an ObjectMissing error when a writer other than the specified File Gateway deletes the specified file from the S3 bucket. Any subsequent uploads to Amazon S3 or retrievals from Amazon S3 for the object fail. Your S3 File Gateway can generate a cache report that lists all files in the gateway cache that are currently failing to upload to Amazon S3 due to this error. The information in this report can help you work with Support to resolve issues with your gateway, Amazon S3, or IAM configuration. For more information, see Create a cache report. To resolve an ObjectMissing error If the operation that modifies the file is S3Upload or S3GetObject, do the following: 1. Save the latest copy of the file to the local file system of your SMB or NFS client (you need this file copy in step 3). 2. Delete the file from the File Gateway using your SMB or NFS client. 3. Copy the latest version of the file that you saved in step 1 using your SMB or NFS client. Do this through your File Gateway. Error: RoleTrustRelationshipInvalid You get this error when the IAM role for a file share has a misconfigured IAM trust relationship (that is, the IAM role does not trust the Storage Gateway principal named storagegateway.amazonaws.com). As a result, the File Gateway would not be able to get the credentials to run any operations on the S3 bucket that backs the file share. To resolve an RoleTrustRelationshipInvalid error • Use the IAM console or IAM API to include storagegateway.amazonaws.com as a principal that is trusted by your file share's IAMrole. For information about IAM role, see Tutorial: delegate access across AWS accounts using IAM roles. Error: S3AccessDenied You can get an S3AccessDenied error for a file share's Amazon S3 bucket access AWS Identity and Access Management (IAM) role. In this case, the S3 bucket access IAM role that is specified by Error: ObjectMissing API Version 2013-06-30 310 AWS Storage Gateway Amazon S3 File Gateway User Guide roleArn in the error doesn't allow the operation involved. The operation isn't allowed because of the permissions for the objects in the directory specified by the Amazon S3 prefix. Your S3 File Gateway can generate a cache report that lists all files in the gateway cache that are currently failing to upload to Amazon S3 due to this error. The information in this report can help you work with Support to resolve issues with your gateway, Amazon S3, or IAM configuration. For more information,
storagegateway-s3file-ug-123
storagegateway-s3file-ug.pdf
123
by Error: ObjectMissing API Version 2013-06-30 310 AWS Storage Gateway Amazon S3 File Gateway User Guide roleArn in the error doesn't allow the operation involved. The operation isn't allowed because of the permissions for the objects in the directory specified by the Amazon S3 prefix. Your S3 File Gateway can generate a cache report that lists all files in the gateway cache that are currently failing to upload to Amazon S3 due to this error. The information in this report can help you work with Support to resolve issues with your gateway, Amazon S3, or IAM configuration. For more information, see Create a cache report. To resolve an S3AccessDenied error • Modify the Amazon S3 access policy that is attached to roleArn in the File Gateway health log to allow permissions for the Amazon S3 operation. Make sure that the access policy allows permission for the operation that caused the error. Also, allow permission for the directory specified in the log for prefix. For information about Amazon S3 permissions, see Specifying permissions in a policy in Amazon Simple Storage Service User Guide. These operations can cause an S3AccessDenied error to occur: • S3HeadObject • S3GetObject • S3ListObjects • S3DeleteObject • S3PutObject Error: DroppedNotifications You might see a DroppedNotifications error instead of other expected types of CloudWatch log entries when free storage space on your gateway's root disk is less than 1 GB, or if more than 100 health notifications are generated within a 1 minute interval. In these circumstances, the gateway stops generating detailed CloudWatch log notifications as a precautionary measure. To resolve a DroppedNotifications error 1. Check the Root Disk Usage metric on the Monitoring tab for your gateway in the Storage Gateway console to determine whether available root disk space is running low. 2. Increase the size of the gateway's root storage disk if available space is less than 1 GB. Refer to your virtual machine hypervisor's documentation for instructions. Error: DroppedNotifications API Version 2013-06-30 311 AWS Storage Gateway Amazon S3 File Gateway User Guide To increase root disk size for Amazon EC2 gateways, see Request modifications to your EBS volumes in the Amazon Elastic Compute Cloud User Guide. Note It is not possible to increase the root disk size for the AWS Storage Gateway Hardware Appliance. 3. Restart your gateway. Notification: HardReboot You can get a HardReboot notification when the gateway VM is restarted unexpectedly. Such a restart can be due to loss of power, a hardware failure, or another event. For VMware gateways, a reset by vSphere High Availability Application Monitoring can cause this event. When your gateway runs in such an environment, check for the presence of the HealthCheckFailure notification and consult the VMware events log for the VM. Notification: Reboot You can get a reboot notification when the gateway VM is restarted. You can restart a gateway VM by using the VM Hypervisor Management console or the Storage Gateway console. You can also restart by using the gateway software during the gateway's maintenance cycle. If the time of the reboot is within 10 minutes of the gateway's configured maintenance start time, this reboot is probably a normal occurrence and not a sign of any problem. If the reboot occurred significantly outside the maintenance window, check whether the gateway was restarted manually. Troubleshooting: Security scans show open NFS ports Certain NFS ports are enabled by default, even on gateways that you only use with SMB file shares. If you use third-party security software such as Qualys to scan the network where your File Gateway is deployed, the scan results might report these open NFS ports as a potential security vulnerability. If you only use your gateway with SMB file shares and you want to disable the unused NFS ports for security reasons, use the following procedure: Notification: HardReboot API Version 2013-06-30 312 AWS Storage Gateway Amazon S3 File Gateway User Guide To disable NFS ports on a File Gateway: 1. Access the gateway local console command prompt using the procedure outlined in https:// docs.aws.amazon.com/filegateway/latest/files3/MaintenanceGatewayConsole-fgw.html. 2. Enter the following commands to disable NFS traffic: iptables -I INPUT -p udp -m udp --dport 111 -j DROP iptables -I INPUT -p udp -m udp --dport 2049 -j DROP iptables -I INPUT -p udp -m udp --dport 20048 -j DROP iptables -I INPUT -p tcp -m tcp --dport 111 -j DROP iptables -I INPUT -p tcp -m tcp --dport 2049 -j DROP iptables -I INPUT -p tcp -m tcp --dport 20048 -j DROP 3. Enter the following command to confirm that the blocked NFS ports appear in the IP tables: iptables -n -L -v --line-numbers Troubleshooting: Using CloudWatch metrics You can find information following about actions to address issues using Amazon CloudWatch metrics with Storage Gateway. Topics • Your gateway reacts slowly when browsing directories • Your gateway isn't
storagegateway-s3file-ug-124
storagegateway-s3file-ug.pdf
124
iptables -I INPUT -p udp -m udp --dport 20048 -j DROP iptables -I INPUT -p tcp -m tcp --dport 111 -j DROP iptables -I INPUT -p tcp -m tcp --dport 2049 -j DROP iptables -I INPUT -p tcp -m tcp --dport 20048 -j DROP 3. Enter the following command to confirm that the blocked NFS ports appear in the IP tables: iptables -n -L -v --line-numbers Troubleshooting: Using CloudWatch metrics You can find information following about actions to address issues using Amazon CloudWatch metrics with Storage Gateway. Topics • Your gateway reacts slowly when browsing directories • Your gateway isn't responding • Your gateway is slow transferring data to Amazon S3 • Your gateway is performing more Amazon S3 operations than expected • You do not see files in your Amazon S3 bucket • Your gateway backup job fails or there are errors when writing to your gateway Your gateway reacts slowly when browsing directories If your File Gateway reacts slowly when you run the ls command or browse directories, check the IndexFetch and IndexEviction CloudWatch metrics: Troubleshooting with CloudWatch metrics API Version 2013-06-30 313 AWS Storage Gateway Amazon S3 File Gateway User Guide • If the IndexFetch metric is greater than 0 when you run an ls command or browse directories, your File Gateway started without information on the contents of the directory affected and had to access Amazon S3. Subsequent efforts to list the contents of that directory should go faster. • If the IndexEviction metric is greater than 0, it means that your File Gateway has reached the limit of what it can manage in its cache at that time. In this case, your File Gateway has to free some storage space from the least recently accessed directory to list a new directory. If this occurs frequently and there is a performance impact, contact Support. Discuss with Support the contents of the related S3 bucket and recommendations to improve performance based on your use case. Your gateway isn't responding If your File Gateway isn't responding, do the following: • If there was a recent reboot or software update, then check the IOWaitPercent metric. This metric shows the percentage of time that the CPU is idle when there is an outstanding disk I/O request. In some cases, this might be high (10 or greater) and might have risen after the server was rebooted or updated. In these cases, then your File Gateway might be bottlenecked by a slow root disk as it rebuilds the index cache to RAM. You can address this issue by using a faster physical disk for the root disk. • If the MemUsedBytes metric is at or nearly the same as the MemTotalBytes metric, then your File Gateway is running out of available RAM. Make sure that your File Gateway has at least the minimum required RAM. If it already does, consider adding more RAM to your File Gateway based on your workload and use case. If the file share is SMB, the issue might also be due to the number of SMB clients connected to the file share. To see the number of clients connected at any given time, check the SMBV(1/2/3)Sessions metric. If there are many clients connected, you might need to add more RAM to your File Gateway. Your gateway is slow transferring data to Amazon S3 If your File Gateway is slow transferring data to Amazon S3, do the following: Troubleshooting with CloudWatch metrics API Version 2013-06-30 314 AWS Storage Gateway Amazon S3 File Gateway User Guide • If the CachePercentDirty metric is 80 or greater, your File Gateway is writing data faster to disk than it can upload the data to Amazon S3. Consider increasing the bandwidth for upload from your File Gateway, adding one or more cache disks, or slowing down client writes. • If the CachePercentDirty metric is low, check the IoWaitPercent metric. If IoWaitPercent is greater than 10, your File Gateway might be bottlenecked by the speed of the local cache disk. We recommend local solid state drive (SSD) disks for your cache, preferably NVM Express (NVMe). If such disks aren't available, try using multiple cache disks from separate physical disks for a performance improvement. • If S3PutObjectRequestTime, S3UploadPartRequestTime, or S3GetObjectRequestTime are high, there might be a network bottleneck. Try analyzing your network to verify that the gateway has the expected bandwidth. Your gateway is performing more Amazon S3 operations than expected If your File Gateway is performing more Amazon S3 operations than expected, check the FilesRenamed metric. Rename operations are expensive to run in Amazon S3. Optimize your workflow to minimize the number of rename operations. You do not see files in your Amazon S3 bucket If you notice that files on the gateway are not reflected in the Amazon S3 bucket, check the FilesFailingUpload
storagegateway-s3file-ug-125
storagegateway-s3file-ug.pdf
125
If S3PutObjectRequestTime, S3UploadPartRequestTime, or S3GetObjectRequestTime are high, there might be a network bottleneck. Try analyzing your network to verify that the gateway has the expected bandwidth. Your gateway is performing more Amazon S3 operations than expected If your File Gateway is performing more Amazon S3 operations than expected, check the FilesRenamed metric. Rename operations are expensive to run in Amazon S3. Optimize your workflow to minimize the number of rename operations. You do not see files in your Amazon S3 bucket If you notice that files on the gateway are not reflected in the Amazon S3 bucket, check the FilesFailingUpload metric. If the metric reports that some files are failing upload, check your health notifications. When files fail to upload, the gateway generates a health notification containing more details on the issue. Your gateway backup job fails or there are errors when writing to your gateway If your File Gateway backup job fails or there are errors when writing to your File Gateway, do the following: • If the CachePercentDirty metric is 90 percent or greater, your File Gateway can't accept new writes to disk because there is not enough available space on the cache disk. To see how fast your File Gateway is uploading to Amazon S3, view the CloudBytesUploaded metric. Compare that metric with the WriteBytes metric, which shows how fast the client is writing files to your File Gateway. If the SMB client is writing to your File Gateway faster than it can upload to Amazon S3, add more cache disks to cover the size of the backup job at a minimum. Or, increase the upload bandwidth. Troubleshooting with CloudWatch metrics API Version 2013-06-30 315 AWS Storage Gateway Amazon S3 File Gateway User Guide • If a large file copy such as backup job fails but the CachePercentDirty metric is less than 80 percent, your File Gateway might be hitting a client-side session timeout. For SMB, you can increase this timeout using the PowerShell command Set-SmbClientConfiguration - SessionTimeout 300. Running this command sets the timeout to 300 seconds. For NFS, make sure that the client is mounted using a hard mount instead of a soft mount. Troubleshooting: file share issues You can find information following about actions to take if you experience unexpected issues with your file share. Topics • Your file share is stuck in CREATING status • You can't create a file share • SMB file shares don't allow multiple different access methods • Multiple file shares can't write to the mapped S3 bucket • Notification for deleted log group when using audit logs • Can't upload files into your S3 bucket • Can't change the default encryption to use SSE-KMS to encrypt objects stored in my S3 bucket • Changes made directly in an S3 bucket with object versioning turned on may affect what you see in your file share • When writing to an S3 bucket with versioning turned on, the Amazon S3 File Gateway may create multiple versions of Amazon S3 objects • Changes to an S3 bucket are not reflected in Storage Gateway • ACL permissions aren't working as expected • Your gateway performance declined after you performed a recursive operation Your file share is stuck in CREATING status When your file share is being created, the status is CREATING. The status transitions to AVAILABLE status after the file share is created. If your file share gets stuck in the CREATING status, do the following: Troubleshooting: file share issues API Version 2013-06-30 316 AWS Storage Gateway Amazon S3 File Gateway User Guide 1. Open the Amazon S3 console at https://console.aws.amazon.com/s3/. 2. Make sure the S3 bucket that you mapped your file share to exists. If the bucket doesn’t exist, create it. After you create the bucket, the file share status transitions to AVAILABLE. For information about how to create an S3 bucket, see Create a bucket in the Amazon Simple Storage Service User Guide. 3. Make sure your bucket name complies with the rules for bucket naming in Amazon S3. For more information, see Rules for bucket naming in the Amazon Simple Storage Service User Guide. Note S3 File Gateway does not support support Amazon S3 buckets with periods (.) in the bucket name. 4. Make sure the IAM role you used to access the S3 bucket has the correct permissions and verify that the S3 bucket is listed as a resource in the IAM policy. For more information, see Granting access to an Amazon S3 bucket. You can't create a file share 1. If you can't create a file share because your file share is stuck in CREATING status, verify that the S3 bucket you mapped your file share to exists. For information on how to do so, see Your file share is stuck in CREATING status, preceding. 2. If
storagegateway-s3file-ug-126
storagegateway-s3file-ug.pdf
126
the bucket name. 4. Make sure the IAM role you used to access the S3 bucket has the correct permissions and verify that the S3 bucket is listed as a resource in the IAM policy. For more information, see Granting access to an Amazon S3 bucket. You can't create a file share 1. If you can't create a file share because your file share is stuck in CREATING status, verify that the S3 bucket you mapped your file share to exists. For information on how to do so, see Your file share is stuck in CREATING status, preceding. 2. If the S3 bucket exists, then verify that AWS Security Token Service is activated in the region where you are creating the file share. If a security token is not active, you should activate it. For information about how to activate a token using AWS Security Token Service, see Activating and deactivating AWS STS in an AWS Region in the IAM User Guide. SMB file shares don't allow multiple different access methods SMB file shares have the following restrictions: 1. When the same client attempts to mount both an Active Directory and Guest access SMB file share the following error message is displayed: Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. Can't create a file share API Version 2013-06-30 317 AWS Storage Gateway Amazon S3 File Gateway User Guide 2. A Windows user cannot remain connected to two Guest Access SMB file shares, and may be disconnected when a new Guest Access connection is established. 3. A Windows client can't mount both a Guest Access and an Active Directory SMB file share that is exported by the same gateway. Multiple file shares can't write to the mapped S3 bucket We don't recommend configuring your S3 bucket to allow multiple file shares to write to one S3 bucket. This approach can cause unpredictable results. Instead, we recommend that you allow only one file share to write to each S3 bucket. You create a bucket policy to allow only the role associated with your file share to write to the bucket. For more information, see Best Practices for File Gateway. Notification for deleted log group when using audit logs If the log group does not exist, the user could select the log group link below that message to go either create a new log group or use an existing log group to use as the target for audit logs Can't upload files into your S3 bucket If you can't upload files into your S3 bucket, do the following: 1. Make sure you have granted the required access for the Amazon S3 File Gateway to upload files into your S3 bucket. For more information, see Granting access to an Amazon S3 bucket. 2. Make sure the role that created the bucket has permission to write to the S3 bucket. For more information, see Best Practices for File Gateway. 3. If your File Gateway uses SSE-KMS or DSSE-KMS for encryption, make sure the IAM role associated with the file share includes kms:Encrypt, kms:Decrypt, kms:ReEncrypt*, kms:GenerateDataKey, and kms:DescribeKey permissions. For more information, see Using Identity-Based Policies (IAM Policies) for Storage Gateway. Can't change the default encryption to use SSE-KMS to encrypt objects stored in my S3 bucket If you change the default encryption and make SSE-KMS (server-side encryption with AWS KMS– managed keys) the default for your S3 bucket, objects that a Amazon S3 File Gateway stores in the Multiple file shares can't write to the mapped S3 bucket API Version 2013-06-30 318 AWS Storage Gateway Amazon S3 File Gateway User Guide bucket are not encrypted with SSE-KMS. By default, a S3 File Gateway uses server-side encryption managed with Amazon S3 (SSE-S3) when it writes data to an S3 bucket. Changing the default won't automatically change your encryption. To change the encryption to use SSE-KMS with your own AWS KMS key, you must turn on SSE- KMS encryption. To do so, you provide the Amazon Resource Name (ARN) of the KMS key when you create your file share. You can also update KMS settings for your file share by using the UpdateNFSFileShare or UpdateSMBFileShare API operation. This update applies to objects stored in the S3 buckets after the update. For more information, see Data encryption using AWS KMS. Changes made directly in an S3 bucket with object versioning turned on may affect what you see in your file share If your S3 bucket has objects written to it by another client, your view of the S3 bucket might not be up-to-date as a result of S3 bucket object versioning. You should always refresh your cache before examining files of interest.
storagegateway-s3file-ug-127
storagegateway-s3file-ug.pdf
127
also update KMS settings for your file share by using the UpdateNFSFileShare or UpdateSMBFileShare API operation. This update applies to objects stored in the S3 buckets after the update. For more information, see Data encryption using AWS KMS. Changes made directly in an S3 bucket with object versioning turned on may affect what you see in your file share If your S3 bucket has objects written to it by another client, your view of the S3 bucket might not be up-to-date as a result of S3 bucket object versioning. You should always refresh your cache before examining files of interest. Object versioning is an optional S3 bucket feature that helps protect data by storing multiple copies of the same-named object. Each copy has a separate ID value, for example file1.jpg: ID="xxx" and file1.jpg: ID="yyy". The number of identically named objects and their lifetimes is controlled by Amazon S3 lifecycle policies. For more details on these Amazon S3 concepts, see Using versioning and Object lifecycle management in the Amazon S3 Developer Guide. When you delete a versioned object, that object is flagged with a delete marker but retained. Only an S3 bucket owner can permanently delete an object with versioning turned on. In your S3 File Gateway, files shown are the most recent versions of objects in an S3 bucket at the time the object was fetched or the cache was refreshed. S3 File Gateways ignore any older versions or any objects marked for deletion. When reading a file, you read data from the latest version. When you write a file in your file share, your S3 File Gateway creates a new version of a named object with your changes, and that version becomes the latest version. Your S3 File Gateway continues to read from the earlier version, and updates that you make are based on the earlier version should a new version be added to the S3 bucket outside of your application. To read the latest version of an object, use the RefreshCache API action or refresh from the console as described in Refreshing Amazon S3 bucket object cache. Changes made directly in an S3 bucket with object versioning turned on may affect what you see in your file share API Version 2013-06-30 319 AWS Storage Gateway Amazon S3 File Gateway User Guide Important We don't recommend that objects or files be written to your S3 File Gateway S3 bucket from outside of the file share. When writing to an S3 bucket with versioning turned on, the Amazon S3 File Gateway may create multiple versions of Amazon S3 objects With object versioning turned on, you may have multiple versions of an object created in Amazon S3 on every update to a file from your NFS or SMB client. Here are scenarios that can result in multiple versions of an object being created in your S3 bucket: • When a file is modified in the Amazon S3 File Gateway by an NFS or SMB client after it has been uploaded to Amazon S3, the S3 File Gateway uploads the new or modified data instead of uploading the whole file. The file modification results in a new version of the Amazon S3 object being created. • When a file is written to the S3 File Gateway by an NFS or SMB client, the S3 File Gateway uploads the file's data to Amazon S3 followed by its metadata, (ownerships, timestamps, etc.). Uploading the file data creates an Amazon S3 object, and uploading the metadata for the file updates the metadata for the Amazon S3 object. This process creates another version of the object, resulting in two versions of an object. • When the S3 File Gateway is uploading larger files, it might need to upload smaller chunks of the file before the client is done writing to the File Gateway. Some reasons for this include to free up cache space or a high rate of writes to a file. This can result in multiple versions of an object in the S3 bucket. You should monitor your S3 bucket to determine how many versions of an object exist before setting up lifecycle policies to move objects to different storage classes. You should configure lifecycle expiration for previous versions to minimize the number of versions you have for an object in your S3 bucket. The use of Same-Region replication (SRR) or Cross-Region replication (CRR) between S3 buckets will increase the storage used. For more information about replication, see Replication. When writing to an S3 bucket with versioning turned on, the Amazon S3 File Gateway may create multiple versions of Amazon S3 objects API Version 2013-06-30 320 AWS Storage Gateway Amazon S3 File Gateway User Guide Important Do not configure replication between S3 buckets until you understand how much storage is being used when object versioning
storagegateway-s3file-ug-128
storagegateway-s3file-ug.pdf
128
expiration for previous versions to minimize the number of versions you have for an object in your S3 bucket. The use of Same-Region replication (SRR) or Cross-Region replication (CRR) between S3 buckets will increase the storage used. For more information about replication, see Replication. When writing to an S3 bucket with versioning turned on, the Amazon S3 File Gateway may create multiple versions of Amazon S3 objects API Version 2013-06-30 320 AWS Storage Gateway Amazon S3 File Gateway User Guide Important Do not configure replication between S3 buckets until you understand how much storage is being used when object versioning is turned on. Use of versioned S3 buckets can greatly increase the amount of storage in Amazon S3 because each modification to a file creates a new version of the S3 object. By default, Amazon S3 continues to store all of these versions unless you specifically create a policy to override this behavior and limit the number of versions that are kept. If you notice unusually large storage usage with object versioning turned on, check that you have your storage policies set appropriately. An increase in the number of HTTP 503-slow down responses for browser requests can also be the result of problems with object versioning. If you turn on object versioning after installing a S3 File Gateway, all unique objects are retained (ID=”NULL”) and you can see them all in the file system. New versions of objects are assigned a unique ID (older versions are retained). Based on the object's timestamp only the newest versioned object is viewable in the NFS file system. After you turn on object versioning, your S3 bucket can't be returned to a nonversioned state. You can, however, suspend versioning. When you suspend versioning, a new object is assigned an ID. If the same named object exists with an ID=”NULL” value, the older version is overwritten. However, any version that contains a non-NULL ID is retained. Timestamps identify the new object as the current one, and that is the one that appears in the NFS file system. Changes to an S3 bucket are not reflected in Storage Gateway Storage Gateway updates the file share cache automatically when you write files to the cache locally using the file share. However, Storage Gateway doesn't automatically update the cache when you upload a file directly to Amazon S3. When you do this, you must perform a RefreshCache operation to see the changes on the file share. If you have more than one file share, then you must run the RefreshCache operation on each file share. You can refresh the cache using the Storage Gateway console and the AWS Command Line Interface (AWS CLI): • To refresh the cache using the Storage Gateway console, see Refreshing objects in your Amazon S3 bucket. Changes to an S3 bucket are not reflected in Storage Gateway API Version 2013-06-30 321 AWS Storage Gateway Amazon S3 File Gateway User Guide • To refresh the cache using the AWS CLI: 1. Run the command aws storagegateway list-file-shares 2. Copy the Amazon Resource Number (ARN) of the file share with the cache that you want to refresh. 3. Run the refresh-cache command with your ARN as the value for --file-share-arn: aws storagegateway refresh-cache --file-share-arn arn:aws:storagegateway:eu-west-1:12345678910:share/share-FFDEE12 To automate the RefreshCache operation, see How can I automate the RefreshCache operation on Storage Gateway? ACL permissions aren't working as expected If access control list (ACL) permissions aren't working as you expect with your SMB file share, you can perform a test. To do this, first test the permissions on a Microsoft Windows file server or a local Windows file share. Then compare the behavior to your gateway's file share. Your gateway performance declined after you performed a recursive operation In some cases, you might perform a recursive operation, such as renaming a directory or turning on inheritance for an ACL, and force it down the tree. If you do this, your S3 File Gateway recursively applies the operation to all objects in the file share. For example, suppose that you apply inheritance to existing objects in an S3 bucket. Your S3 File Gateway recursively applies inheritance to all objects in the bucket. Such operations can cause your gateway performance to decline. High Availability Health Notifications When running your gateway on the VMware vSphere High Availability (HA) platform, you may receive health notifications. For more information about health notifications, see Troubleshooting: high availability issues. ACL permissions aren't working as expected API Version 2013-06-30 322 AWS Storage Gateway Amazon S3 File Gateway User Guide Troubleshooting: high availability issues You can find information following about actions to take if you experience availability issues. Topics • Health notifications • Metrics Health notifications When you run your gateway on VMware vSphere HA, all gateways produce the following health notifications to your configured Amazon
storagegateway-s3file-ug-129
storagegateway-s3file-ug.pdf
129
performance to decline. High Availability Health Notifications When running your gateway on the VMware vSphere High Availability (HA) platform, you may receive health notifications. For more information about health notifications, see Troubleshooting: high availability issues. ACL permissions aren't working as expected API Version 2013-06-30 322 AWS Storage Gateway Amazon S3 File Gateway User Guide Troubleshooting: high availability issues You can find information following about actions to take if you experience availability issues. Topics • Health notifications • Metrics Health notifications When you run your gateway on VMware vSphere HA, all gateways produce the following health notifications to your configured Amazon CloudWatch log group. These notifications go into a log stream called AvailabilityMonitor. Topics • Notification: Reboot • Notification: HardReboot • Notification: HealthCheckFailure • Notification: AvailabilityMonitorTest Notification: Reboot You can get a reboot notification when the gateway VM is restarted. You can restart a gateway VM by using the VM Hypervisor Management console or the Storage Gateway console. You can also restart by using the gateway software during the gateway's maintenance cycle. Action to Take If the time of the reboot is within 10 minutes of the gateway's configured maintenance start time, this is probably a normal occurrence and not a sign of any problem. If the reboot occurred significantly outside the maintenance window, check whether the gateway was restarted manually. Notification: HardReboot You can get a HardReboot notification when the gateway VM is restarted unexpectedly. Such a restart can be due to loss of power, a hardware failure, or another event. For VMware gateways, a reset by vSphere High Availability Application Monitoring can cause this event. Troubleshooting: high availability issues API Version 2013-06-30 323 AWS Storage Gateway Action to Take Amazon S3 File Gateway User Guide When your gateway runs in such an environment, check for the presence of the HealthCheckFailure notification and consult the VMware events log for the VM. Notification: HealthCheckFailure For a gateway on VMware vSphere HA, you can get a HealthCheckFailure notification when a health check fails and a VM restart is requested. This event also occurs during a test to monitor availability, indicated by an AvailabilityMonitorTest notification. In this case, the HealthCheckFailure notification is expected. Note This notification is for VMware gateways only. Action to Take If this event repeatedly occurs without an AvailabilityMonitorTest notification, check your VM infrastructure for issues (storage, memory, and so on). If you need additional assistance, contact Support. Notification: AvailabilityMonitorTest For a gateway on VMware vSphere HA, you can get an AvailabilityMonitorTest notification when you run a test of the Availability and application monitoring system in VMware. Metrics The AvailabilityNotifications metric is available on all gateways. This metric is a count of the number of availability-related health notifications generated by the gateway. Use the Sum statistic to observe whether the gateway is experiencing any availability-related events. Consult with your configured CloudWatch log group for details about the events. Metrics API Version 2013-06-30 324 AWS Storage Gateway Amazon S3 File Gateway User Guide Best practices for File Gateway This section contains the following topics, which provide information about the best practices for working with gateways, file shares, buckets, and data. We recommend that you familiarize yourself with the information outlined in this section, and attempt to follow these guidelines in order to avoid problems with your AWS Storage Gateway. For additional guidance on diagnosing and solving common issues you might encounter with your deployment, see Troubleshooting problems with your Storage Gateway deployment. Topics • Best practices: recovering your data • Best practices: managing multipart uploads • Best practices: Unzip compressed files locally before copying to a gateway • Retain file attributes when copying data from Windows Server • Best practices: Proper sizing of cache disks • Working with multiple file shares and Amazon S3 buckets • Clean up unnecessary resources Best practices: recovering your data Although it is rare, your gateway might encounter an unrecoverable failure. Such a failure can occur in your virtual machine (VM), the gateway itself, the local storage, or elsewhere. If a failure occurs, we recommend that you follow the instructions in the appropriate section following to recover your data. Important Storage Gateway doesn’t support recovering a gateway VM from a snapshot that is created by your hypervisor or from your Amazon EC2 Amazon Machine Image (AMI). If your gateway VM malfunctions, activate a new gateway and recover your data to that gateway using the instructions following. Recovering your data API Version 2013-06-30 325 AWS Storage Gateway Amazon S3 File Gateway User Guide Recovering from an unexpected virtual machine shutdown If your VM shuts down unexpectedly, for example during a power outage, your gateway becomes unreachable. When power and network connectivity are restored, your gateway becomes reachable and starts to function normally. Following are some steps you can take at that point to help recover your data:
storagegateway-s3file-ug-130
storagegateway-s3file-ug.pdf
130
hypervisor or from your Amazon EC2 Amazon Machine Image (AMI). If your gateway VM malfunctions, activate a new gateway and recover your data to that gateway using the instructions following. Recovering your data API Version 2013-06-30 325 AWS Storage Gateway Amazon S3 File Gateway User Guide Recovering from an unexpected virtual machine shutdown If your VM shuts down unexpectedly, for example during a power outage, your gateway becomes unreachable. When power and network connectivity are restored, your gateway becomes reachable and starts to function normally. Following are some steps you can take at that point to help recover your data: • If an outage causes network connectivity issues, you can troubleshoot the issue. For information about how to test network connectivity, see Testing your gateway's network connectivity. Recovering your data from a malfunctioning cache disk If your cache disk encounters a failure, we recommend you use the following steps to recover your data depending on your situation: • If the malfunction occurred because a cache disk was removed from your host, shut down the gateway, re-add the disk, and restart the gateway. Recovering your data from an inaccessible data center If your gateway or data center becomes inaccessible for some reason, you can recover your data to another gateway in a different data center or recover to a gateway hosted on an Amazon EC2 instance. If you don't have access to another data center, we recommend creating the gateway on an Amazon EC2 instance. The steps you follow depends on the gateway type you are covering the data from. To recover data from a File Gateway in an inaccessible data center For File Gateway, you map a new to the Amazon S3 bucket that contains the data you want to recover. 1. Create and activate a new File Gateway on an Amazon EC2 host. For more information, see Deploy a default Amazon EC2 host for S3 File Gateway. 2. Create a new on the EC2 gateway you created. For more information, see Create a file share. 3. Mount your file share on your client and map it to the S3 bucket that contains the data that you want to recover. For more information, see Mount and use your file share. Recovering from an unexpected VM shutdown API Version 2013-06-30 326 AWS Storage Gateway Amazon S3 File Gateway User Guide Best practices: managing multipart uploads When transferring large files, S3 File Gateway makes use of the Amazon S3 multipart upload feature to split the files into smaller parts and transfer them in parallel for improved efficiency. For more information about multipart upload, see Uploading and copying objects using multipart upload in the Amazon Simple Storage Service User Guide. If a multipart upload doesn't complete successfully for any reason, the gateway typically stops the transfer, deletes any partially-transferred pieces of the file from Amazon S3, and attempts the transfer again. In rare cases, such as when hardware or network failure prevent the gateway from cleaning up after an unsuccessful multipart upload, pieces of the partially-transferred file might remain on Amazon S3 where they can incur storage charges. As a best practice for minimizing Amazon S3 storage costs from incomplete multipart uploads, we recommend configuring an Amazon S3 bucket lifecycle rule that uses the AbortIncompleteMultipartUpload API action to automatically stop unsuccessful transfers and delete associated file parts after a designated number of days. For instructions, see Configuring a bucket lifecycle configuration to delete incomplete multipart uploads in the Amazon Simple Storage Service User Guide. Best practices: Unzip compressed files locally before copying to a gateway If you try to unzip a compressed archive containing thousands of files while it is stored on your gateway, you might encounter significant performance-related delays. The process of unzipping an archive that contains large numbers of files on any type of network file share inherently involves a high volume of input/output operations, metadata cache manipulation, network overhead, and latency. Additionally, Storage Gateway is unable to determine when each file from the archive has finished unzipping, and can begin uploading files before the process is complete, which further impacts performance. These issues are compounded when the files inside the archive are numerous, but small in size. As a best practice, we recommend transferring compressed archives from your gateway to your local machine first, before you unzip them. Then, if necessary, you can use a tool such as robocopy or rsync to transfer the unzipped files back to the gateway. Managing multipart uploads API Version 2013-06-30 327 AWS Storage Gateway Amazon S3 File Gateway User Guide Retain file attributes when copying data from Windows Server It is possible to copy files to your File Gateway using the basic copy command on Microsoft Windows, but this command copies only the file data by default - omitting certain file attributes such as
storagegateway-s3file-ug-131
storagegateway-s3file-ug.pdf
131
practice, we recommend transferring compressed archives from your gateway to your local machine first, before you unzip them. Then, if necessary, you can use a tool such as robocopy or rsync to transfer the unzipped files back to the gateway. Managing multipart uploads API Version 2013-06-30 327 AWS Storage Gateway Amazon S3 File Gateway User Guide Retain file attributes when copying data from Windows Server It is possible to copy files to your File Gateway using the basic copy command on Microsoft Windows, but this command copies only the file data by default - omitting certain file attributes such as security descriptors. If the files are copied to the gateway without the corresponding security restrictions and Discretionary Access Control List (DACL) information, it is possible that they could be accessed by unauthorized users. As a best practice for preserving all file attributes and security information when copying files to your gateway on Microsoft Windows Server, we recommend using the robocopy or xcopy commands, with the /copy:DS or /o flags, respectively. For more information, see robocopy and xcopy in the Microsoft Windows Server command reference documentation. Best practices: Proper sizing of cache disks For best performance, the total disk cache size must be large enough to cover the size of your active working set. For read-heavy and mixed read/write workloads, this ensures that you can achieve a high percentage of cache hits on reads, which is desirable. You can monitor this via the CacheHitPercent metric for your S3 File Gateway. For write-heavy workloads (e.g. for backup and archival), the S3 File Gateway buffers incoming writes on the disk cache prior to copying this data asynchronously to Amazon S3. You should ensure that you have sufficient cache capacity to buffer written data. The CachePercentDirty metric provides an indication of the percentage of the disk cache that has not yet been persisted to AWS. Low values of CachePercentDirty are desirable. Values that are consistently close to 100% indicate that the S3 File Gateway is unable to keep up with the rate of incoming write traffic. You can avoid this by either increasing the provisioned disk cache capacity, or increasing the dedicated network bandwidth available from the S3 File Gateway to Amazon S3, or both. For more information about cache disk sizing, see Amazon S3 File Gateway cache sizing best practices on the official Amazon Web Services YouTube channel. Working with multiple file shares and Amazon S3 buckets When you configure a single Amazon S3 bucket to allow multiple gateways or file shares to write to it, the results can be unpredictable. You can configure your buckets in one of two ways to avoid Copying data from Windows Server API Version 2013-06-30 328 AWS Storage Gateway Amazon S3 File Gateway User Guide unpredictable results. Choose the configuration method that best fits your use case from the following options: • Configure your S3 buckets so that only one file share can write to each bucket. Use a different file share to write to each bucket. To do this, create an S3 bucket policy that denies all roles except for the role that's used for a specific file share to put or delete objects in the bucket. Attach a similar policy to each bucket, specifying a different file share to write to each bucket. The following example policy denies S3 bucket write permissions to all roles except for the role that created the bucket. The s3:DeleteObject and s3:PutObject actions are denied for all roles except "TestUser". The policy applies to all objects in the "arn:aws:s3:::amzn-s3- demo-bucket/*" bucket. { "Version":"2012-10-17", "Statement":[ { "Sid":"DenyMultiWrite", "Effect":"Deny", "Principal":"*", "Action":[ "s3:DeleteObject", "s3:PutObject" ], "Resource":"arn:aws:s3:::amzn-s3-demo-bucket/*", "Condition":{ "StringNotLike":{ "aws:userid":"TestUser:*" } } } ] } • If you do want multiple file shares to write to the same Amazon S3 bucket, you must prevent the file shares from trying to write to the same objects simultaneously. To do this, configure a separate, unique object prefix for each file share. This means that each file share only writes to objects with the corresponding prefix, and doesn't write to objects that are Multiple file shares and buckets API Version 2013-06-30 329 AWS Storage Gateway Amazon S3 File Gateway User Guide associated with the other file shares in your deployment. You configure the object prefix in the S3 prefix name field when you create a new file share. Clean up unnecessary resources As a best practice, we recommend cleaning up Storage Gateway resources to avoid unexpected or unnecessary charges. For example, if you created a gateway as a demonstration exercise or a test, consider deleting it and its virtual appliance from your deployment. Use the following procedure to clean up resources. To clean up resources you don't need 1. If you no longer plan to continue using a gateway, delete it. For more information, see Deleting your
storagegateway-s3file-ug-132
storagegateway-s3file-ug.pdf
132
in your deployment. You configure the object prefix in the S3 prefix name field when you create a new file share. Clean up unnecessary resources As a best practice, we recommend cleaning up Storage Gateway resources to avoid unexpected or unnecessary charges. For example, if you created a gateway as a demonstration exercise or a test, consider deleting it and its virtual appliance from your deployment. Use the following procedure to clean up resources. To clean up resources you don't need 1. If you no longer plan to continue using a gateway, delete it. For more information, see Deleting your gateway and removing associated resources. 2. Delete the Storage Gateway VM from your on-premises host. If you created your gateway on an Amazon EC2 instance, terminate the instance. Clean up unnecessary resources API Version 2013-06-30 330 AWS Storage Gateway Amazon S3 File Gateway User Guide Additional Storage Gateway resources This section contains the following topics, which provide additional information and resources related to setting up and using AWS Storage Gateway: Topics • Host setup - Learn how to deploy and configure a virtual machine host for your gateway. • Using Storage Gateway with VMware HA - Learn how to set up Storage Gateway to work with VMware vSphere high availability features. • Getting activation key - Learn where to find the activation key that you need to provide when you deploy a new gateway. • File attribute support - Learn how your gateway handles DOS and Windows file attributes. • Using AWS Direct Connect - Learn how to create a dedicated network connection between your on-premises gateway and the AWS cloud. • Active Directory permissions - Learn which permissions your service account must have to be able to join your gateway to your Active Directory domain. • Getting the IP address for your gateway appliance - Learn where to find the gateway's virtual machine host IP address, which you need to provide when you deploy a new gateway. • Understanding resources and resource IDs - Learn how AWS identifies the resources and subresources that are created by Storage Gateway. • Tagging your resources - Learn how to use metadata tags to categorize your resources and make them easier to manage. • Open-source components - Learn about the third-party tools and licenses that are used to deliver Storage Gateway functionality. • Quotas - Learn about limits and quotas for File Gateway, including minimum and maximum limitations for file shares and local cache disks. • Using storage classes - Learn about the Amazon S3 storage classes that File Gateway supports, and what to consider when choosing a storage class. • Using Kubernetes CSI drivers - Learn how to install and configure Container Storage Interface (CSI) drivers to allow Kubernetes instances to use File Gateway for storage. • Terraform module - Learn how to use Terraform to deploy File Gateway as a virtual machine. API Version 2013-06-30 331 AWS Storage Gateway Amazon S3 File Gateway User Guide Deploying and configuring the gateway VM host The following topics provide information about setting up the virtual machine host platform for your gateway. Topics • Deploy a default Amazon EC2 host for S3 File Gateway • Deploy a customized Amazon EC2 host for S3 File Gateway • Modify Amazon EC2 instance metadata options • Synchronize VM time with Hyper-V or Linux KVM host time • Synchronize VM time with VMware host time • Configuring network adapters for your gateway • Using VMware vSphere High Availability with Storage Gateway Deploy a default Amazon EC2 host for S3 File Gateway This topic lists the steps to deploy an Amazon EC2 host using the default specifications. You can deploy and activate an Amazon S3 File Gateway on an Amazon Elastic Compute Cloud (Amazon EC2) instance. The AWS Storage Gateway Amazon Machine Image (AMI) is available as a community AMI. Note Storage Gateway community AMIs are published and fully supported by AWS. You can see that the publisher is AWS, a verified provider. 1. 2. To set up the Amazon EC2 instance, choose Amazon EC2 as the Host platform in the Platform options section of the workflow. For instructions on configuring the Amazon EC2 instance, see Deploying an Amazon EC2 instance to host your Amazon S3 File Gateway. Select Launch instance to open the AWS Storage Gateway AMI template in the Amazon EC2 console and customize additional settings such as Instance types, Network settings and Configure storage. 3. Optionally, you can select Use default settings in the Storage Gateway console to deploy an Amazon EC2 instance with the default configuration. Host setup API Version 2013-06-30 332 AWS Storage Gateway Amazon S3 File Gateway User Guide The Amazon EC2 instance that Use default settings creates has the following default specifications: • Instance type — m5.xlarge • Network Settings • For VPC,
storagegateway-s3file-ug-133
storagegateway-s3file-ug.pdf
133
instance to host your Amazon S3 File Gateway. Select Launch instance to open the AWS Storage Gateway AMI template in the Amazon EC2 console and customize additional settings such as Instance types, Network settings and Configure storage. 3. Optionally, you can select Use default settings in the Storage Gateway console to deploy an Amazon EC2 instance with the default configuration. Host setup API Version 2013-06-30 332 AWS Storage Gateway Amazon S3 File Gateway User Guide The Amazon EC2 instance that Use default settings creates has the following default specifications: • Instance type — m5.xlarge • Network Settings • For VPC, select the VPC that you want your EC2 instance to run in. • For Subnet, specify the subnet that your EC2 instance should be launched in. Note VPC subnets will appear in the drop down only if they have the auto-assign public IPv4 address setting activated from the VPC management console. • Auto-assign Public IP — Activated • An EC2 security group is created and associated with the EC2 Instance. The security group has the following inbound port rules: Note You will need Port 80 open during gateway activation. The port is closed immediately following activation. Thereafter, your EC2 instance can only be accessed over the other ports from the selected VPC. The file shares on your gateway are only accessible from the hosts in the same VPC as the gateway. If the file shares need to be accessed from hosts outside of the VPC, you should update the appropriate security group rules. You can edit security groups at any time by navigating to the Amazon EC2 instance details page, selecting Security, navigating to Security group details, and choosing the security group ID. Deploy a default Amazon EC2 host for File Gateway API Version 2013-06-30 333 AWS Storage Gateway Amazon S3 File Gateway User Guide Port Protocol 80 TCP File System Protocol HTTP access for activation 111 139 445 TCP, UDP NFSv3 TCP, UDP SMB TCP SMB 2049 TCP, UDP NFS 20048 TCP, UDP NFSv3 • Configure storage Default Settings AMI Root Volume Volume 2 Cache Device Name '/dev/sdb' Size 80 Gib 165 GiB Volume Type gp3 gp3 IOPS 3000 3000 Yes Yes Delete on terminati on Encrypted No No Deploy a default Amazon EC2 host for File Gateway API Version 2013-06-30 334 AWS Storage Gateway Amazon S3 File Gateway User Guide Default Settings AMI Root Volume Volume 2 Cache Throughpu t 125 125 Deploy a customized Amazon EC2 host for S3 File Gateway You can deploy and activate an Amazon S3 File Gateway on an Amazon Elastic Compute Cloud (Amazon EC2) instance. The AWS Storage Gateway Amazon Machine Image (AMI) is available as a community AMI. Note Storage Gateway community AMIs are published and fully supported by AWS. You can see that the publisher is AWS, a verified provider. S3 File Gateway AMIs use the following naming convention. The version number appended to the AMI name changes with each version release. aws-storage-gateway-FILE_S3-1.25.0 To deploy an Amazon EC2 instance to host your Amazon S3 File Gateway 1. Start setting up a new gateway using the Storage Gateway console. For instructions, see Set up an Amazon S3 File Gateway. When you reach the Platform options section, choose Amazon EC2 as the Host platform, then use the following steps to launch the Amazon EC2 instance that will host your File Gateway. 2. Choose Launch instance to open the AWS Storage Gateway AMI template in the Amazon EC2 console, where you can configure additional settings. Use Quicklaunch to launch the Amazon EC2 instance with default settings. For more information on Amazon EC2 Quicklaunch default specifications, see Quicklaunch Configuration Specifications for Amazon EC2. 3. 4. For Name, enter a name for the Amazon EC2 instance. After the instance is deployed, you can search for this name to find your instance on list pages in the Amazon EC2 console. In the Instance type section, for Instance type, choose the hardware configuration for your instance. The hardware configuration must meet certain minimum requirements to support Deploy a customized Amazon EC2 host for File Gateway API Version 2013-06-30 335 AWS Storage Gateway Amazon S3 File Gateway User Guide your gateway. We recommend starting with the m5.xlarge instance type, which meets the minimum hardware requirements for your gateway to function properly. For more information, see Requirements for Amazon EC2 instance types. You can resize your instance after you launch, if necessary. For more information, see Resizing your instance in the Amazon EC2 User Guide. Note Certain instance types, particularly i3 EC2, use NVMe SSD disks. These can cause problems when you start or stop File Gateway; for example, you can lose data from the cache. Monitor the CachePercentDirty Amazon CloudWatch metric, and only start or stop your system when that parameter is 0. To learn more about monitoring
storagegateway-s3file-ug-134
storagegateway-s3file-ug.pdf
134
type, which meets the minimum hardware requirements for your gateway to function properly. For more information, see Requirements for Amazon EC2 instance types. You can resize your instance after you launch, if necessary. For more information, see Resizing your instance in the Amazon EC2 User Guide. Note Certain instance types, particularly i3 EC2, use NVMe SSD disks. These can cause problems when you start or stop File Gateway; for example, you can lose data from the cache. Monitor the CachePercentDirty Amazon CloudWatch metric, and only start or stop your system when that parameter is 0. To learn more about monitoring metrics for your gateway, see Storage Gateway metrics and dimensions in the CloudWatch documentation. 5. In the Key pair (login) section, for Key pair name - required, select the key pair you want to use to securely connect to your instance. You can create a new key pair if necessary. For more information, see Create a key pair in the Amazon Elastic Compute Cloud User Guide for Linux Instances. 6. In the Network settings section, review the preconfigured settings and choose Edit to make changes to the following fields: a. b. For VPC - required, choose the VPC where you want to launch your Amazon EC2 instance. For more information, see How Amazon VPC works in the Amazon Virtual Private Cloud User Guide. (Optional) For Subnet, choose the subnet where you want to launch your Amazon EC2 instance. c. For Auto-assign Public IP, choose Enable. 7. In the Firewall (security groups) subsection, review the preconfigured settings. You can change the default name and description of the new security group to be created for your Amazon EC2 instance if you want, or choose to apply firewall rules from an existing security group instead. 8. In the Inbound security groups rules subsection, add firewall rules to open the ports that clients will use to connect to your instance. For more information on the ports required for Amazon S3 File Gateway, see Port requirements. For more information on adding firewall Deploy a customized Amazon EC2 host for File Gateway API Version 2013-06-30 336 AWS Storage Gateway Amazon S3 File Gateway User Guide rules, see Security group rules in the Amazon Elastic Compute Cloud User Guide for Linux Instances. Note Amazon S3 File Gateway requires TCP port 80 to be open for inbound traffic and one- time HTTP access during gateway activation. After activation, you can close this port. If you plan to create NFS file shares, you must open TCP/UDP port 2049 for NFS access, TCP/UDP port 111 for NFSv3 access, and TCP/UDP port 20048 for NFSv3 access. If you plan to create SMB file shares, you must open TCP port 445 for SMB access. 9. In the Advanced network configuration subsection, review the preconfigured settings and make changes if necessary. 10. In the Configure storage section, choose Add new volume to add storage to your gateway instance. Important You must add at least one Amazon EBS volume with at least 150 GiB capacity for cache storage in addition to the preconfigured Root volume. For increased performance, we recommend allocating multiple EBS volumes for cache storage with at least 150 GiB each. 11. In the Advanced details section, review the preconfigured settings and make changes if necessary. 12. Choose Launch instance to launch your new Amazon EC2 gateway instance with the configured settings. 13. To verify that your new instance launched successfully, navigate to the Instances page in the Amazon EC2 console and search for your new instance by name. Ensure that that Instance state displays Running with a green check mark, and that the Status check is complete, and shows a green check mark. 14. Select your instance from the details page. Copy the Public IPv4 address from the Instance summary section, then return to the Set up gateway page in the Storage Gateway console to resume setting up your Amazon S3 File Gateway. Deploy a customized Amazon EC2 host for File Gateway API Version 2013-06-30 337 AWS Storage Gateway Amazon S3 File Gateway User Guide You can determine the AMI ID to use for launching a File Gateway by using the Storage Gateway console or by querying the AWS Systems Manager parameter store. To determine the AMI ID, do one of the following: • Start setting up a new gateway using the Storage Gateway console. For instructions, see Set up an Amazon S3 File Gateway. When you reach the Platform options section, choose Amazon EC2 as the Host platform, then choose Launch instance to open the AWS Storage Gateway AMI template in the Amazon EC2 console. You are redirected to the EC2 community AMI page, where you can see the AMI ID for your AWS Region in the URL. • Query the Systems Manager parameter store. You can use the AWS
storagegateway-s3file-ug-135
storagegateway-s3file-ug.pdf
135
parameter store. To determine the AMI ID, do one of the following: • Start setting up a new gateway using the Storage Gateway console. For instructions, see Set up an Amazon S3 File Gateway. When you reach the Platform options section, choose Amazon EC2 as the Host platform, then choose Launch instance to open the AWS Storage Gateway AMI template in the Amazon EC2 console. You are redirected to the EC2 community AMI page, where you can see the AMI ID for your AWS Region in the URL. • Query the Systems Manager parameter store. You can use the AWS CLI or Storage Gateway API to query the Systems Manager public parameter under the namespace /aws/service/ storagegateway/ami/FILE_S3/latest. For example, using the following CLI command returns the ID of the current AMI in the AWS Region you specify. aws --region us-east-2 ssm get-parameter --name /aws/service/storagegateway/ami/ FILE_S3/latest The CLI command returns output similar to the following. { "Parameter": { "Type": "String", "LastModifiedDate": 1561054105.083, "Version": 4, "ARN": "arn:aws:ssm:us-east-2::parameter/aws/service/storagegateway/ami/ FILE_S3/latest", "Name": "/aws/service/storagegateway/ami/FILE_S3/latest", "Value": "ami-123c45dd67d891000" } } Modify Amazon EC2 instance metadata options The instance metadata service (IMDS) is an on-instance component that provides secure access to Amazon EC2 instance metadata. An instance can be configured to accept incoming metadata requests that use IMDS Version 1 (IMDSv1) or require that all metadata requests use IMDS Version Modify Amazon EC2 instance metadata options API Version 2013-06-30 338 AWS Storage Gateway Amazon S3 File Gateway User Guide 2 (IMDSv2). IMDSv2 uses session-oriented requests and mitigates several types of vulnerabilities that could be used to try to access the IMDS. For information about IMDSv2, see How Instance Metadata Service Version 2 works in the Amazon Elastic Compute Cloud User Guide. We recommend that you require IMDSv2 for all Amazon EC2 instances that host Storage Gateway. IMDSv2 is required by default on all newly launched gateway instances. If you have existing instances that are still configured to accept IMDSv1 metadata requests, see Require the use of IMDSv2 in the Amazon Elastic Compute Cloud User Guide for instructions to modify your instance metadata options to require the use of IMDSv2. Applying this change does not require an instance reboot. Synchronize VM time with Hyper-V or Linux KVM host time For a gateway deployed on VMware ESXi, setting the hypervisor host time and synchronizing the virtual machine time to the host is sufficient to avoid time drift. For more information, see Synchronize VM time with VMware host time. For a gateway deployed on Microsoft Hyper-V or Linux KVM, we recommend that you periodically check the virtual machine time using the procedure described following. To view and synchronize the time of a hypervisor gateway virtual machine to a Network Time Protocol (NTP) server 1. Log in to your gateway's local console: • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the local console for Linux Kernel-based Virtual Machine (KVM), see Accessing the Gateway Local Console with Linux KVM. 2. On the Storage Gateway Configuration main menu screen, enter the corresponding numeral to select System Time Management. 3. On the System Time Management menu screen, enter the corresponding numeral to select View and Synchronize System Time. The gateway local console displays the current system time and compares it with the time reported by the NTP server, then reports the exact discrepancy between the two times in seconds. 4. If the time discrepancy is greater than 60 seconds, enter y to synchronize the system time with NTP time. Otherwise, enter n. Synchronize VM time with Hyper-V or Linux KVM host time API Version 2013-06-30 339 AWS Storage Gateway Amazon S3 File Gateway User Guide Time synchronization might take a few moments. Synchronize VM time with VMware host time To successfully activate your gateway, you must ensure that your VM time is synchronized to the host time, and that the host time is correctly set. In this section, you first synchronize the time on the VM to the host time. Then you check the host time and, if needed, set the host time and configure the host to synchronize its time automatically to a Network Time Protocol (NTP) server. Important Synchronizing the VM time with the host time is required for successful gateway activation. To synchronize VM time with host time 1. Configure your VM time. a. In the vSphere client, right-click on the name of your gateway VM in panel on the left side of the application window to open the context menu for the VM, and then choose Edit Settings. The Virtual Machine Properties dialog box opens. b. Choose the Options tab, and then choose VMware Tools from the options list. c. Check the Synchronize guest time with host option in the
storagegateway-s3file-ug-136
storagegateway-s3file-ug.pdf
136
Network Time Protocol (NTP) server. Important Synchronizing the VM time with the host time is required for successful gateway activation. To synchronize VM time with host time 1. Configure your VM time. a. In the vSphere client, right-click on the name of your gateway VM in panel on the left side of the application window to open the context menu for the VM, and then choose Edit Settings. The Virtual Machine Properties dialog box opens. b. Choose the Options tab, and then choose VMware Tools from the options list. c. Check the Synchronize guest time with host option in the Advanced section on the right side of the Virtual Machine Properties dialog box, and then choose OK. The VM synchronizes its time with the host. 2. Configure the host time. It is important to make sure that your host clock is set to the correct time. If you have not configured your host clock, perform the following steps to set and synchronize it with an NTP server. a. In the VMware vSphere client, select the vSphere host node in the left panel, and then choose the Configuration tab. b. Select Time Configuration in the Software panel, and then choose the Properties link. Synchronize VM time with VMware host time API Version 2013-06-30 340 AWS Storage Gateway Amazon S3 File Gateway User Guide The Time Configuration dialog box appears. c. Under Date and Time, set the date and time for your vSphere host. d. Configure the host to synchronize its time automatically to an NTP server. i. Choose Options in the Time Configuration dialog box, and then in the NTP Daemon (ntpd) Options dialog box, choose NTP Settings in the left panel. ii. Choose Add to add a new NTP server. iii. In the Add NTP Server dialog box, type the IP address or the fully qualified domain name of an NTP server, and then choose OK. You can use pool.ntp.org as the domain name. iv. In the NTP Daemon (ntpd) Options dialog box, choose General in the left panel. v. Under Service Commands, choose Start to start the service. Note that if you change this NTP server reference or add another later, you will need to restart the service to use the new server. e. f. Choose OK to close the NTP Daemon (ntpd) Options dialog box. Choose OK to close the Time Configuration dialog box. Configuring network adapters for your gateway Storage Gateway uses a single VMXNET3 (10 GbE) network adapter by default, but you can configure your gateway to use more than one network adapter so that it can be accessed by multiple IP addresses. You might want to do this in the following situations: • Maximizing throughput– You might want to maximize throughput to a gateway when network adapters are a bottleneck. • Application separation – You might need to separate how your applications write to a gateway's volumes. For example, you might choose to have a critical storage application exclusively use one particular adapter defined for your gateway. • Network constraints – Your application environment might require that you keep your file shares and the initiators that connect to them in an isolated network. This network is different from the network by which the gateway communicates with AWS. Configuring network adapters for your gateway API Version 2013-06-30 341 AWS Storage Gateway Amazon S3 File Gateway User Guide In a typical multiple-adapter use case, one adapter is configured as the route by which the gateway communicates with AWS (that is, as the default gateway). Except for this one adapter, initiators must be in the same subnet as the adapter that contains the file shares to which they connect. Otherwise, communication with the intended targets might not be possible. If a target is configured on the same adapter that is used for communication with AWS, then file share traffic for that target and AWS traffic flows through the same adapter. In some cases, you might configure one adapter to connect to the Storage Gateway console and then add a second adapter. In such a case, Storage Gateway automatically configures the route table to use the second adapter as the preferred route. For instructions on how to configure multiple adapters, see the following topics: Topics • Configuring Your Gateway for Multiple NICs on a VMware ESXi Host • Configuring Your Gateway for Multiple NICs in Microsoft Hyper-V Host Configuring Your Gateway for Multiple NICs on a VMware ESXi Host The following procedure assumes that your gateway VM already has one network adapter defined, and describes how to add an adapter on VMware ESXi. To configure your gateway to use an additional network adapter in VMware ESXi host 1. 2. 3. Shut down the gateway. In the VMware vSphere client, select your gateway VM. The VM can remain turned on
storagegateway-s3file-ug-137
storagegateway-s3file-ug.pdf
137
adapters, see the following topics: Topics • Configuring Your Gateway for Multiple NICs on a VMware ESXi Host • Configuring Your Gateway for Multiple NICs in Microsoft Hyper-V Host Configuring Your Gateway for Multiple NICs on a VMware ESXi Host The following procedure assumes that your gateway VM already has one network adapter defined, and describes how to add an adapter on VMware ESXi. To configure your gateway to use an additional network adapter in VMware ESXi host 1. 2. 3. Shut down the gateway. In the VMware vSphere client, select your gateway VM. The VM can remain turned on for this procedure. In the client, open the context (right-click) menu for your gateway VM, and choose Edit Settings. 4. On the Hardware tab of the Virtual Machine Properties dialog box, choose Add to add a device. 5. Follow the Add Hardware wizard to add a network adapter. a. b. In the Device Type pane, choose Ethernet Adapter to add an adapter, and then choose Next. In the Network Type pane, ensure that Connect at power on is selected for Type, and then choose Next. Configuring network adapters for your gateway API Version 2013-06-30 342 AWS Storage Gateway Amazon S3 File Gateway User Guide We recommend that you use the VMXNET3 network adapter with Storage Gateway. For more information on the adapter types that might appear in the adapter list, see Network Adapter Types in the ESXi and vCenter Server Documentation. c. In the Ready to Complete pane, review the information, and then choose Finish. 6. Choose the Summary tab for the VM, and choose View All next to the IP Address box. The Virtual Machine IP Addresses window displays all the IP addresses you can use to access the gateway. Confirm that a second IP address is listed for the gateway. Note It might take several moments for the adapter changes to take effect and the VM summary information to refresh. 7. 8. In the Storage Gateway console, turn on the gateway. In the Navigation pane of the Storage Gateway console, choose Gateways and choose the gateway to which you added the adapter. Confirm that the second IP address is listed in the Details tab. Note The example mounting commands provided on the info page for a file share in the Storage Gateway console will always include the IP address of the network adapter that was most recently added to the file share's associated gateway. For information about local console tasks common to VMware, Hyper-V, and KVM hosts, see Performing tasks on the virtual machine local console Configuring Your Gateway for Multiple NICs in Microsoft Hyper-V Host The following procedure assumes that your gateway VM already has one network adapter defined and that you are adding a second adapter. This procedure shows how to add an adapter for a Microsoft Hyper-V host. To configure your gateway to use an additional network adapter in a Microsoft Hyper-V Host 1. On the Storage Gateway console, turn off the gateway. Configuring network adapters for your gateway API Version 2013-06-30 343 AWS Storage Gateway Amazon S3 File Gateway User Guide 2. 3. In the Microsoft Hyper-V Manager, select your gateway VM from the Virtual Machines panel. If the gateway VM isn't turned off already, right-click the VM name to open the context menu, and then choose Turn Off. 4. Right-click the gateway VM name to open the context menu, and then choose Settings. 5. 6. In the Settings dialog box, under Hardware, choose Add Hardware. In the Add Hardware panel on the right side of the Settings dialog box, choose Network Adapter, and then choose Add to add a device. 7. Configure the network adapter, and then choose Apply to apply settings. 8. In the Settings dialog box, under Hardware, confirm that the new network adapter was added to the hardware list, and then choose OK. 9. Turn on the gateway using the Storage Gateway console. 10. In the Navigation panel of the Storage Gateway console, choose Gateways, then select the gateway to which you added the adapter. Confirm that a second IP address is listed in the Details tab. Note The example mounting commands provided on the info page for a file share in the Storage Gateway console will always include the IP address of the network adapter that was most recently added to the file share's associated gateway. For information about local console tasks common to VMware, Hyper-V, and KVM hosts, see Performing tasks on the virtual machine local console Using VMware vSphere High Availability with Storage Gateway Storage Gateway provides high availability on VMware through a set of application-level health checks integrated with VMware vSphere High Availability (VMware HA). This approach helps protect storage workloads against hardware, hypervisor, or network failures. It also helps protect against software errors, such as
storagegateway-s3file-ug-138
storagegateway-s3file-ug.pdf
138
share in the Storage Gateway console will always include the IP address of the network adapter that was most recently added to the file share's associated gateway. For information about local console tasks common to VMware, Hyper-V, and KVM hosts, see Performing tasks on the virtual machine local console Using VMware vSphere High Availability with Storage Gateway Storage Gateway provides high availability on VMware through a set of application-level health checks integrated with VMware vSphere High Availability (VMware HA). This approach helps protect storage workloads against hardware, hypervisor, or network failures. It also helps protect against software errors, such as connection timeouts and file share or volume unavailability. With this integration, a gateway deployed in a VMware environment on-premises or in a VMware Cloud on AWS automatically recovers from most service interruptions. It generally does this in under 60 seconds with no data loss. Using Storage Gateway with VMware HA API Version 2013-06-30 344 AWS Storage Gateway Amazon S3 File Gateway User Guide Note We recommend doing the following things if you deploy Storage Gateway in a VMware HA cluster: • Deploy the VMware ESX .ova downloadable package that contains the Storage Gateway VM on only one host in a cluster. • When deploying the .ova package, select a data store that is not local to one host. Instead, use a data store that is accessible to all hosts in the cluster. If you select a data store that is local to a host and the host fails, then the data source might not be accessible to other hosts in the cluster and failover to another host might not succeed. • With clustering, if you deploy the .ova package to the cluster, select a host when you are prompted to do so. Alternately, you can deploy directly to a host in a cluster. The following topics describe how to deploy Storage Gateway in a VMware HA cluster: Topics • Configure Your vSphere VMware HA Cluster • Set Up Your Gateway Type • Deploy the Gateway • (Optional) Add Override Options for Other VMs on Your Cluster • Activate Your Gateway • Test Your VMware High Availability Configuration Configure Your vSphere VMware HA Cluster First, if you haven’t already created a VMware cluster, create one. For information about how to create a VMware cluster, see Create a vSphere HA Cluster in the VMware documentation. Next, configure your VMware cluster to work with Storage Gateway. To configure your VMware cluster 1. On the Edit Cluster Settings page in VMware vSphere, make sure that VM monitoring is configured for VM and application monitoring. To do so, set the following values for each option: Using Storage Gateway with VMware HA API Version 2013-06-30 345 AWS Storage Gateway Amazon S3 File Gateway User Guide • Host Failure Response: Restart VMs • Response for Host Isolation: Shut down and restart VMs • Datastore with PDL: Disabled • Datastore with APD: Disabled • VM Monitoring: VM and Application Monitoring 2. Fine-tune the sensitivity of the cluster by adjusting the following values: • Failure interval – After this interval, the VM is restarted if a VM heartbeat isn't received. • Minimum uptime – The cluster waits this long after a VM starts to begin monitoring for VM tools' heartbeats. • Maximum per-VM resets – The cluster restarts the VM a maximum of this many times within the maximum resets time window. • Maximum resets time window – The window of time in which to count the maximum resets per-VM resets. If you aren't sure what values to set, use these example settings: • Failure interval: 30 seconds • Minimum uptime: 120 seconds • Maximum per-VM resets: 3 • Maximum resets time window: 1 hour If you have other VMs running on the cluster, you might want to set these values specifically for your VM. You can't do this until you deploy the VM from the .ova. For more information on setting these values, see (Optional) Add Override Options for Other VMs on Your Cluster. Set Up Your Gateway Type Use the following procedure to set up the gateway To download the .ova image for your gateway type • Download the .ova image for your gateway type from one of the following: • File Gateway – Create and activate an Amazon S3 File Gateway Using Storage Gateway with VMware HA API Version 2013-06-30 346 AWS Storage Gateway Deploy the Gateway Amazon S3 File Gateway User Guide In your configured cluster, deploy the .ova image to one of the cluster's hosts. For instructions, see Deploy an OVF or OVA Template in the VMware vSphere online documentation. To deploy the gateway .ova image 1. Deploy the .ova image to one of the hosts in the cluster. 2. Make sure the data stores that you choose for the root disk and the
storagegateway-s3file-ug-139
storagegateway-s3file-ug.pdf
139
of the following: • File Gateway – Create and activate an Amazon S3 File Gateway Using Storage Gateway with VMware HA API Version 2013-06-30 346 AWS Storage Gateway Deploy the Gateway Amazon S3 File Gateway User Guide In your configured cluster, deploy the .ova image to one of the cluster's hosts. For instructions, see Deploy an OVF or OVA Template in the VMware vSphere online documentation. To deploy the gateway .ova image 1. Deploy the .ova image to one of the hosts in the cluster. 2. Make sure the data stores that you choose for the root disk and the cache are available to all hosts in the cluster. (Optional) Add Override Options for Other VMs on Your Cluster If you have other VMs running on your cluster, you might want to set the cluster values specifically for each VM. For instructions, see Customize an Individual Virtual Machine in the VMware vSphere online documentation. To add override options for other VMs on your cluster 1. On the Summary page in VMware vSphere, choose your cluster to open the cluster page, and then choose Configure. 2. Choose the Configuration tab, and then choose VM Overrides. 3. Add a new VM override option to change each value. Set the following values for each option under vSphere HA - VM Monitoring: • VM Monitoring: Override Enabled - VM and Application Monitoring • VM monitoring sensitivity: Override Enabled - VM and Application Monitoring • VM Monitoring: Custom • Failure interval: 30 seconds • Minimum uptime: 120 seconds • Maximum per-VM resets: 5 • Maximum resets time window: Within 1 hrs Using Storage Gateway with VMware HA API Version 2013-06-30 347 AWS Storage Gateway Activate Your Gateway Amazon S3 File Gateway User Guide After the .ova is deployed in your VMware environment, activate your gateway using the Storage Gateway console. For instructions, see Review settings and activate your Amazon S3 File Gateway. Test Your VMware High Availability Configuration After you activate your gateway, test your configuration. To test your VMware HA configuration 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway that you want to test for VMware HA. For Actions, choose Verify VMware HA. In the Verify VMware High Availability Configuration box that appears, choose OK. 3. 4. Note Testing your VMware HA configuration reboots your gateway VM and interrupts connectivity to your gateway. The test might take a few minutes to complete. If the test is successful, the status of Verified appears in the details tab of the gateway in the console. 5. Choose Exit. You can find information about VMware HA events in the Amazon CloudWatch log groups. For more information, see Getting S3 File Gateway health logs with CloudWatch log groups. Getting an activation key for your gateway To receive an activation key for your gateway, make a web request to the gateway virtual machine (VM). The VM returns a redirect that contains the activation key, which is passed as one of the parameters for the ActivateGateway API action to specify the configuration of your gateway. For more information, see ActivateGateway in the Storage Gateway API Reference. Getting activation key API Version 2013-06-30 348 AWS Storage Gateway Amazon S3 File Gateway User Guide Note Gateway activation keys expire in 30 minutes if unused. The request that you make to the gateway VM includes the AWS Region where the activation occurs. The URL that's returned by the redirect in the response contains a query string parameter called activationkey. This query string parameter is your activation key. The format of the query string looks like the following: http://gateway_ip_address/? activationRegion=activation_region. The output of this query returns both activation region and key. The URL also includes vpcEndpoint, the VPC Endpoint ID for gateways that connect using the VPC endpoint type. Note The AWS Storage Gateway Hardware Appliance, VM image templates, and Amazon EC2 Amazon Machine Images (AMI) come preconfigured with the HTTP services necessary to receive and respond to the web requests described on this page. It's not required or recommended to install any additional services on your gateway. Topics • Linux (curl) • Linux (bash/zsh) • Microsoft Windows PowerShell • Using your local console Linux (curl) The following examples show you how to get an activation key using Linux (curl). Note Replace the highlighted variables with actual values for your gateway. Acceptable values are as follows: Linux (curl) API Version 2013-06-30 349 AWS Storage Gateway Amazon S3 File Gateway User Guide • gateway_ip_address - The IPv4 address of your gateway, for example 172.31.29.201 • gateway_type - The type of gateway you want to activate, such as STORED, CACHED, VTL, FILE_S3, or FILE_FSX_SMB. • region_code - The Region where you want to activate your gateway. See Regional endpoints in the AWS General Reference