- Newest
- Most votes
- Most comments
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
Shashi,
Do you have code examples that done the refresh? Do you recommend to use lambda to update on schedule? or something else?
Egor
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
Relevant content
- Accepted Answerasked 3 years ago
- asked 2 years ago
- asked 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 days ago
- AWS OFFICIALUpdated 2 years ago