title: how to upload a file to aws s3 bucket using aws .net c# sdk
body: <pre><code> var client = new AmazonS3Client(Amazon.RegionEndpoint.USEast2);
  
          try
          {
              PutObjectRequest putRequest = new PutObjectRequest
              {
                  BucketName = bucketName,
                  Key = keyName,
                  ContentBody = filePath,
                  ContentType = "text/plain"
              };
  
              PutObjectResponse response = client.PutObject(putRequest);
          }
  </code></pre>
  
  <p>I want to upload a file to s3 bucket using this code
  this is the error i am getting.</p>
  
  <pre><code>Error   CS0122  'AmazonS3Client.PutObject(PutObjectRequest)' is inaccessible due to its protection level    
  </code></pre>