I\'m trying to write \"good\" python and capture a S3 no such key error with this:
session = botocore.session.get_session() client = session.create_client(\'s3\'
Using botocore 1.5, it looks like the client handle exposes the exception classes:
session = botocore.session.get_session() client = session.create_client('s3') try: client.get_object(Bucket=BUCKET, Key=FILE) except client.exceptions.NoSuchKey as e: print >> sys.stderr, "no such key in bucket"