title: Amazon S3 Unable to find credentials in C#
body: <p>I'm trying to upload an image file to <code>aws s3</code> storage and get back that image <code>URL</code>. I'm using secret key and access key to create credentials. But when the program runs it it says </p>
  
  <blockquote>
    <p>"Unable to find credentials" .</p>
  </blockquote>
  
  <p>Here is my code which i used. </p>
  
  <pre><code>    public string sendMyFileToS3(string from,string to, string bucketName, string fileName)
      {
          BasicAWSCredentials awsCreds = new BasicAWSCredentials(bucketName, fileName);
          AmazonS3Client client = new AmazonS3Client(awsCreds);
          TransferUtility utility = new TransferUtility(client);
          TransferUtilityUploadRequest request = new TransferUtilityUploadRequest();
          request.BucketName = bucketName;
          request.Key = fileName; 
          request.FilePath = from; 
          utility.Upload(request); 
          string urlString = "";
          GetPreSignedUrlRequest request1 = new GetPreSignedUrlRequest
          {
              BucketName = bucketName,
              Key = fileName,
              Expires = DateTime.Now.AddYears(2)
  
          };
          urlString = client.GetPreSignedURL(request1);
          Console.WriteLine(urlString);
  
          File.Move(from, to);
  
          return urlString ;
      }
  </code></pre>