Ejemplo n.º 1
0
        public void RefreshAwsCliProfiles()
        {
            _awsCliProfiles.Children.Clear();

            try
            {
                foreach (string profileName in AwsCliCredentials.EnumerateProfiles())
                {
                    AWSCredentials creds = AwsCliCredentials.GetCredentials(profileName);

                    _awsCliProfiles.Children.Add(new AwsCliProfile(profileName, creds));
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex, "discovery failed");
            }
        }
Ejemplo n.º 2
0
        //https://github.com/awslabs/aws-sdk-net-samples/blob/master/ConsoleSamples/AmazonS3Sample/AmazonS3Sample/S3Sample.cs


#if !NET16
        public static AwsS3BlobStorage FromAwsCliProfile(string profileName, string bucketName, string region)
        {
            return(new AwsS3BlobStorage(bucketName, region, AwsCliCredentials.GetCredentials(profileName)));
        }