public static IConfigurationBuilder AddAwsS3(this IConfigurationBuilder builder, string bucket, string key, bool optional = false, TimeSpan?period = default, string prefix = default, Func <AsyncLoaderExceptionContext, Task> onException = default) { return(builder.AddAwsS3(() => new AmazonS3Client(), new GetObjectRequest { BucketName = bucket, Key = key }, optional, period, prefix, onException)); }