Exemple #1
0
        private void BindAppSettingConfiguration(IServiceCollection services)
        {
            var awsS3BucketCredentials = new AwsS3BucketCredentials();

            _configuration.Bind(nameof(AwsS3BucketCredentials), awsS3BucketCredentials);
            services.AddSingleton(awsS3BucketCredentials);

            var sessionSettings = new SessionSettings();

            _configuration.Bind(nameof(SessionSettings), sessionSettings);
            services.AddSingleton(sessionSettings);
        }
 public AmazonS3Broker(AwsS3BucketCredentials awsS3Bucket)
 {
     _client      = new AmazonS3Client(new BasicAWSCredentials(awsS3Bucket.Accesskey, awsS3Bucket.SecretKey), RegionEndpoint.EUWest1);
     _awsS3Bucket = awsS3Bucket;
 }