S3 updated, but NFS share on the file gateway is not

0

Hello,
We noticed that when S3 updated, NFS share on file gateway still has an old copy. I know we can force the update, but what needs to be done, so, it work automatically.
Thanks
Egor

asked 6 years ago858 views
3 Answers
0

Egor,

The behavior you reported is as per design. Gateway assumes that all the write activity to the S3 occurs through itself. If you have workflow that writes to S3 directly, then you need to use the RefreshCache API to trigger the gateway to read the latest from the S3 bucket associated with the FileShare.

Please refer to the following links. We made an enhancement to the RefreshCache API recently to be able to specify list of folders instead of the root of the bucket.

https://docs.aws.amazon.com/storagegateway/latest/userguide/managing-gateway-file.html#refresh-cache
https://docs.aws.amazon.com/storagegateway/latest/APIReference/API_RefreshCache.html

Shashi

AWS
answered 6 years ago
0

Shashi,
Do you have code examples that done the refresh? Do you recommend to use lambda to update on schedule? or something else?
Egor

answered 6 years ago
0

Egor,

It depends on your workflow and how frequently objects are getting uploaded to S3 and how soon you need to access those objects through Storage Gateway. If you control the workflow that uploads the objects to S3, you can make it invoke the RefreshCache API through the AWS CLI/SDK at logical points (e.g: Uploading data in a folder) after a upload is complete. Alternately you can use Lambda to invoke the API on schedule.

To reduce the processing associated with the RefreshCache API specify the folder list when possible. At any point, Gateway only accepts two RefreshCache API requests. If you send a 3rd request while two requests are pending, it will be rejected with error "ThrottlingException".

Shashi

AWS
answered 6 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions