Processors - S3 Exception Code

Code

exception lambdas.s3_exceptions.S3ProcessingException(detail=None, code=None)[source]

Bases: Exception

Base class for Exceptions due to S3 processing. Subclasses should provide .status_code and .default_detail properties.

status_code = 1100
default_detail = 'An error has occurred.'
default_code = 'Failed'
__init__(detail=None, code=None)[source]
Parameters
  • detail – detailed message for the Exception to be initialised with

  • code – error code the exception is to be initialised with

__str__()[source]
Returns

returns a string representation of the exception for printing.

exception lambdas.s3_exceptions.S3InputInvalidEventError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when the event cannot be parsed for s3 information.

status_code = 1100
default_detail = 'The event passed by AWS cannot be processed'
default_code = "Event doesn't parse"
exception lambdas.s3_exceptions.S3InputNotPutEventError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when the event cannot be parsed for s3 information.

status_code = 1100
default_detail = 'The event passed by AWS cannot be processed'
default_code = "Event doesn't parse"
exception lambdas.s3_exceptions.S3InputUnableToProcessError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when object within the event cannot be processed from S3 as a CSV.

status_code = 1102
default_detail = 'The object in the AWS event cannot be processed as a CSV file'
default_code = 'Object cannot be read from S3'
exception lambdas.s3_exceptions.S3InvalidSourceObjectNamesError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to copy and object on S3 and the source attributes are incorrect/invalid.

code = 1103
default_detail = 'The object in the AWS event cannot be processed as a CSV file'
default_code = 'Object cannot be read from S3'
exception lambdas.s3_exceptions.S3InvalidDestinationObjectNamesError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to copy and object on S3 and the destination attributes are incorrect/invalid.

status_code = 1104
default_detail = 'The object in the AWS event cannot be processed as a CSV file'
default_code = 'Object cannot be read from S3'
exception lambdas.s3_exceptions.S3FailedToCopyError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to copy and object on S3 and the destination attributes are incorrect/invalid.

status_code = 1105
default_detail = 'Failed to Copy the object in S3'
default_code = 'Failed to Copy the object in S3'
exception lambdas.s3_exceptions.S3FailedToDeleteError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to copy and object on S3 and the destination attributes are incorrect/invalid.

status_code = 1106
default_detail = 'Failed to Delete the object in S3'
default_code = 'Failed to Delete the object in S3'
exception lambdas.s3_exceptions.S3InvalidBucketError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to copy and object on S3 and the destination attributes are incorrect/invalid.

status_code = 1107
default_detail = 'Invalid bucket name passed to function'
default_code = 'Invalid bucket name passed to function'
exception lambdas.s3_exceptions.S3InvalidKeyError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to copy and object on S3 and the destination attributes are incorrect/invalid.

status_code = 1108
default_detail = 'Invalid key name passed to function'
default_code = 'Invalid key name passed to function'
exception lambdas.s3_exceptions.S3NoHeadersPassedError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to copy and object on S3 and the destination attributes are incorrect/invalid.

status_code = 1109
default_detail = 'No headers were passed to the write function'
default_code = 'No headers were passed to the write function'
exception lambdas.s3_exceptions.S3NoListPassedError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to copy and object on S3 and the destination attributes are incorrect/invalid.

status_code = 1110
default_detail = 'No items were passed to the write function'
default_code = 'No items were passed to the write function'
exception lambdas.s3_exceptions.S3CannotCreateCSVError(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to create the in-memory CSV file.

status_code = 1111
default_detail = 'An error occurred when trying to construct the in-memory CSV'
default_code = 'In-memory CSV error'
exception lambdas.s3_exceptions.S3CannotWriteCSVToS3Error(detail=None, code=None)[source]

Bases: lambdas.s3_exceptions.S3ProcessingException

Error raised when trying to create the in-memory CSV file.

status_code = 1112
default_detail = 'An error occurred when trying to write the CSV to S3'
default_code = 'Writing CSV error'