title: boto3 s3.Object- - expected string or bytes-like object
body: <p>I tried searching for a solution to this problem but still couldn't figure out the issue. So, I am trying to check if a key exists in a bucket. My code works perfectly fine if I use the following:</p>
  
  <pre><code>s3.Object("bucket_name", "key_name").load()
  </code></pre>
  
  <p>But when I pass the reference variable rather than the actually values, I get an error.</p>
  
  <pre><code>bucket = "bucket_name"
  key = "key_name"
  s3.Object(bucket, key).load()
  </code></pre>
  
  <p>Error: <code>expected string or bytes-like object</code></p>
  
  <p>Edit -  I don't get this issue in python shell. I get it only when I run this through a python module.</p>