-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s3 files bigger then 21 mb delete after container restart #4087
Comments
Hello @dolevhadad, could you please share your
|
Hi, @mgagliardo The file I tried to upload call AWSCLIV2.msi
If you don't restart the container everting is ok because the file is in the memory, and you can download it or delete it . When you restart the container it will try to load the AWSCLIV2.msi file from the file outside the container , but you receive an errors as number of PUT request you have in the upload. Example of one of the errors:
My docker compose file :
To work around this issue you will need to change the multipart_threshold parameter in the .aws/config file to value bigger then the file you want to upload . Example of .aws/config file
|
I confirmed the same issue happened in my environment.
It restores the 8MB.img properly if you set the |
The root cause for this issue is in the constructor of the
The call to A Multipart upload is a series of API calls where the later API calls reference the ID that is contained in the response to the first API call. When localstack replays the API calls, the first API call gets a new ID (bc of the One possible fix is to make the id generation pseudo random (based on the key). For instance one can do something like:
I tried that a little while back and it worked fine for my use case. However every multipart upload to the same key will have the same request id which is not ideal (it deviates from how AWS behaves). Ultimately the correct solution for this problem would be to modify the localstack replay code so that it supports the change in IDs. |
Hello. Is this issue (or similar #2527) being planned for a fix? With this KeyError, we are unable to use localstack for multi-part upload testing with the Java AWS SDK, as any restart of the container requires a reset of the files uploaded. I thought I was able to workaround the KeyError by patching the FakeMultipart class as @benediktbrandt mentioned in the last comment, but while this fixes the KeyError after a localstack restart, it doesn't actually populate the data. I see a success message that replay was successful, but the files it says were replayed do not exist (verified using the
For me, this solution would work fine for us if the file data was replayed correctly, as I have logic to change the key to the upload if there is an existing file with the same key. The patch I used with suggestion from the last comment against 0.12.19.1, which prevented the KeyError:
|
Hi @dolevhadad, does the problem still persist? With today's |
Type of request: This is a ...
[X] bug report
[ ] feature request
Detailed description
files bigger then 21 mb desapird after container restart
Expected behavior
...
Actual behavior
...
Steps to reproduce
Command used to start LocalStack
...
Client code (AWS SDK code snippet, or sequence of "awslocal" commands)
...
The text was updated successfully, but these errors were encountered: