Why aren't changes on my Amazon S3 bucket showing on the Storage Gateway file share?
Last updated: 2022-06-25
I made changes to my Amazon Simple Storage Service (Amazon S3) bucket, such as uploading a new file or removing an existing file. However, the changes aren't propagating to my AWS Storage Gateway file share. How can I fix this?
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).
Using the Storage Gateway console
To refresh the cache using the Storage Gateway console, see Refreshing objects in your Amazon S3 bucket.
Using the AWS CLI
1. Run the list-file-shares command:
$ aws storagegateway list-file-shares
Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.
2. Copy the Amazon Resource Number (ARN) of the file share with the cache that you want to refresh. Then, run the refresh-cache command and enter the 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?