Error-handling functions for boto3/botocore
