title: boto3 S3: get_object error handling
body: <p>What is the best way to do error handling when getting an object from S3 using Python boto3?</p>
  
  <p>My approach:</p>
  
  <pre><code>from botocore.exceptions import ClientError
  import boto3
  
  s3_client = boto3.client('s3')
  
  try:
      s3_object = s3_client.get_object("MY_BUCKET", "MY_KEY")
  except ClientError, e:
      error_code = e.response["Error"]["Code"]
      # do error code checks here
  </code></pre>
  
  <p>I am not sure if ClientError is the best Exception to use here. I know there is a Boto3Error class, but I do not think you can do error code checks similarly to ClientError.</p>