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

已提问 5 年前596 查看次数
3 回答
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
已回答 5 年前
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

已回答 5 年前
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
已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则