"""General constants for lambda functions.""" import datetime import os LAMBDA_NAME = 'store-dynamodb-item-on-fail' # The default value is 30 days DEFAULT_DYNAMODB_ERROR_RECORD_TTL_MINUTES = 30 * 24 * 60 custom_ttl = os.environ.get( 'DYNAMODB_ERROR_RECORD_TTL_MINUTES', DEFAULT_DYNAMODB_ERROR_RECORD_TTL_MINUTES) DYNAMODB_ERROR_RECORD_TTL = datetime.timedelta(minutes=int(custom_ttl))