-
Notifications
You must be signed in to change notification settings - Fork 863
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
Calling AmazonS3Client.GetObjectAsync() on lambda function take too long (~5s) on the first invoke #3116
Comments
@hoainam1593 Good morning. Thanks for opening the issue. The 1st invocation could take long due to Lambda cold start times, also you confirmed that the subsequent executions happen almost instantaneously. You may also try temporarily enabling verbose logging to see any SDK logic causing delay using code below: Amazon.AWSConfigs.LoggingConfig.LogResponses = Amazon.ResponseLoggingOption.Always;
Amazon.AWSConfigs.LoggingConfig.LogTo = Amazon.LoggingOptions.Console;
Amazon.AWSConfigs.AddTraceListener("Amazon", new System.Diagnostics.ConsoleTraceListener()); Thanks, |
Thanks for your answer. about the operation taking too long (~5s), it's just function to get S3 object: |
@hoainam1593 Could you please share the Lambda memory settings as well? |
I used the lowest one 128MB |
@hoainam1593 We recently pushed a new version Thanks, |
This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled. |
Describe the bug
I'm using S3 client in lambda function, this is my code:
when I deploy and invoke in the first time, it took ~5s to execute client.GetObjectAsync, when I run later (reuse lambda instance), it complete instantly
Expected Behavior
AmazonS3Client.GetObjectAsync complete instantly on any invoke
Current Behavior
AmazonS3Client.GetObjectAsync take too long in the first invoke
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.S3 3.7.304.1
Targeted .NET Platform
.net 6.0
Operating System and version
lambda environment
The text was updated successfully, but these errors were encountered: