imageflow-dotnet-server icon indicating copy to clipboard operation
imageflow-dotnet-server copied to clipboard

Update all dependent projects, docs, and examples to fix S3 startup delay

Open lilith opened this issue 3 years ago • 1 comments

There's a bug in AWSSDK that can cause a 30 second startup delay if the "AWS_REGION=us-west-2" environment variable doesn't exist, despite the fact we provide that configuration in code.

lilith avatar Feb 24 '23 05:02 lilith

Per https://github.com/aws/aws-sdk-net/issues/2546 the workaround is to specify DefaultConfigurationMode = DefaultConfigurationMode.Standard

services.AddAWSService<IAmazonS3>(new AWSOptions 
{
    Credentials = new AnonymousAWSCredentials(),
    Region = RegionEndpoint.USEast1,
    DefaultConfigurationMode = DefaultConfigurationMode.Standard
});

lilith avatar Feb 25 '23 02:02 lilith