title: Thumbor + tc_aws - Error on save result
body: <p>I'm trying install Thumbor with tc_aws and I have a problem with result storage.</p>
  
  <p>The image can not be saved in result bucket and Thumbor return error that cannot be debugged.</p>
  
  <p>Someone can help me?</p>
  
  <p>Start command: sudo thumbor --log-level debug --port=9000 --conf=/etc/thumbor/thumbor.conf</p>
  
  <p>The Thumbor URL is: <a href="http://thumbor.centraldoevento.com.br:9000/UgCH96k1fNiFS-fR_Dgh2B-Hujs=/122x101/smart/Koala.jpg" rel="nofollow">http://thumbor.centraldoevento.com.br:9000/UgCH96k1fNiFS-fR_Dgh2B-Hujs=/122x101/smart/Koala.jpg</a></p>
  
  <p>Config file is:</p>
  
  <pre><code>TC_AWS_REGION='us-west-2' # AWS Region
  
  TC_AWS_STORAGE_BUCKET='images-centraldoevento' # S3 bucket for Storage
  TC_AWS_STORAGE_ROOT_PATH='' # S3 path prefix for Storage bucket
  
  TC_AWS_LOADER_BUCKET='images-centraldoevento' #S3 bucket for loader
  TC_AWS_LOADER_ROOT_PATH='' # S3 path prefix for Loader bucket
  
  TC_AWS_RESULT_STORAGE_BUCKET='thumbor-centraldoevento' # S3 bucket for result Storage
  TC_AWS_RESULT_STORAGE_ROOT_PATH='result' # S3 path prefix for Result storage bucket
  
  # put data into S3 using the Server Side Encryption functionality to
  # encrypt data at rest in S3
  # https://aws.amazon.com/about-aws/whats-new/2011/10/04/amazon-s3-announces-server-side-encryption-support/
  TC_AWS_STORAGE_SSE=False
  
  # put data into S3 with Reduced Redundancy
  # https://aws.amazon.com/about-aws/whats-new/2010/05/19/announcing-amazon-s3-reduced-redundancy-storage/
  TC_AWS_STORAGE_RRS=False
  
  
  # Enable HTTP Loader as well?
  # This would allow you to load watermarks in over your images dynamically through a URI
  # E.g.
  # http://your-thumbor.com/unsafe/filters:watermark(http://example.com/watermark.png,0,0,50)/s3_bucket/photo.jpg
  TC_AWS_ENABLE_HTTP_LOADER=False
  
  TC_AWS_ALLOWED_BUCKETS=False # List of allowed bucket to be requested
  TC_AWS_STORE_METADATA=False # Store result with metadata (for instance content-type)
  
  
  ################################### Logging ####################################
  
  ## Log Format to be used by thumbor when writing log messages.
  ## Defaults to: %(asctime)s %(name)s:%(levelname)s %(message)s
  #THUMBOR_LOG_FORMAT = '%(asctime)s %(name)s:%(levelname)s %(message)s'
  
  ## Date Format to be used by thumbor when writing log messages.
  ## Defaults to: %Y-%m-%d %H:%M:%S
  #THUMBOR_LOG_DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
  
  ################################################################################
  
  
  ################################### Imaging ####################################
  
  ## Max width in pixels for images read or generated by thumbor
  ## Defaults to: 0
  #MAX_WIDTH = 0
  
  ## Max height in pixels for images read or generated by thumbor
  ## Defaults to: 0
  #MAX_HEIGHT = 0
  
  ## Min width in pixels for images read or generated by thumbor
  ## Defaults to: 1
  #MIN_WIDTH = 1
  
  ## Min width in pixels for images read or generated by thumbor
  ## Defaults to: 1
  #MIN_HEIGHT = 1
  
  ## Allowed domains for the http loader to download. These are regular
  ## expressions.
  ## Defaults to: []
  #ALLOWED_SOURCES = #    [
  #    ]
  
  
  ## Quality index used for generated JPEG images
  ## Defaults to: 80
  #QUALITY = 80
  
  ## Max AGE sent as a header for the image served by thumbor in seconds
  ## Defaults to: 86400
  #MAX_AGE = 86400
  
  ## Indicates the Max AGE header in seconds for temporary images (images that
  ## haven't been detected yet)
  ## Defaults to: 0
  #MAX_AGE_TEMP_IMAGE = 0
  
  ## Indicates whether thumbor should rotate images that have an Orientation EXIF
  ## header
  ## Defaults to: False
  #RESPECT_ORIENTATION = False
  
  ## Indicates whether thumbor should enable the EXPERIMENTAL support for animated
  ## gifs.
  ## Defaults to: True
  #ALLOW_ANIMATED_GIFS = True
  
  ################################################################################
  
  
  ################################ Extensibility #################################
  
  ## The loader thumbor should use to load the original image. This must be the
  ## full name of a python module (python must be able to import it)
  ## Defaults to: thumbor.loaders.http_loader
  #LOADER = 'thumbor.loaders.http_loader'
  LOADER = 'tc_aws.loaders.s3_loader'
  
  
  ## The file storage thumbor should use to store original images. This must be the
  ## full name of a python module (python must be able to import it)
  ## Defaults to: thumbor.storages.file_storage
  #STORAGE = 'thumbor.storages.file_storage'
  STORAGE = 'thumbor.storages.no_storage'
  
  
  ## The result storage thumbor should use to store generated images. This must be
  ## the full name of a python module (python must be able to import it)
  ## Defaults to: None
  #RESULT_STORAGE = None
  RESULT_STORAGE = 'tc_aws.result_storages.s3_storage'
  
  ## The imaging engine thumbor should use to perform image operations. This must
  ## be the full name of a python module (python must be able to import it)
  ## Defaults to: thumbor.engines.pil
  #ENGINE = 'thumbor.engines.pil'
  
  ################################################################################
  
  
  ################################### Security ###################################
  
  ## The security key thumbor uses to sign image URLs
  ## Defaults to: MY_SECURE_KEY
  #SECURITY_KEY = '3dwekYgsys1BxXPi4Xphof39zX034m38'
  
  ## Indicates if the /unsafe URL should be available
  ## Defaults to: True
  #ALLOW_UNSAFE_URL = True
  
  ## Indicates if encrypted (old style) URLs should be allowed
  ## Defaults to: True
  #ALLOW_OLD_URLS = True
  
  ################################################################################
  
  
  ################################# File Loader ##################################
  
  ## The root path where the File Loader will try to find images
  ## Defaults to: /tmp
  #FILE_LOADER_ROOT_PATH = '/tmp'
  
  ################################################################################
  
  
  ################################# File Storage #################################
  
  ## Expiration in seconds for the images in the File Storage. Defaults to one
  ## month
  ## Defaults to: 2592000
  #STORAGE_EXPIRATION_SECONDS = 2592000
  
  ## Indicates whether thumbor should store the signing key for each image in the
  ## file storage. This allows the key to be changed and old images to still be
  ## properly found
  ## Defaults to: False
  #STORES_CRYPTO_KEY_FOR_EACH_IMAGE = False
  
  ## The root path where the File Storage will try to find images
  ## Defaults to: /var/folders/th/z6vmj34j1gngpvwl5fg5t9440000gp/T/thumbor/storage
  #FILE_STORAGE_ROOT_PATH = '/var/folders/th/z6vmj34j1gngpvwl5fg5t9440000gp/T/thumbor/storage'
  
  ################################################################################
  
  
  #################################### Upload ####################################
  
  ## Max size in Kb for images uploaded to thumbor
  ## Aliases: MAX_SIZE
  ## Defaults to: 0
  #UPLOAD_MAX_SIZE = 0
  
  ## Indicates whether thumbor should enable File uploads
  ## Aliases: ENABLE_ORIGINAL_PHOTO_UPLOAD
  ## Defaults to: False
  #UPLOAD_ENABLED = False
  
  ## The type of storage to store uploaded images with
  ## Aliases: ORIGINAL_PHOTO_STORAGE
  ## Defaults to: thumbor.storages.file_storage
  #UPLOAD_PHOTO_STORAGE = 'thumbor.storages.file_storage'
  
  ## Indicates whether image deletion should be allowed
  ## Aliases: ALLOW_ORIGINAL_PHOTO_DELETION
  ## Defaults to: False
  #UPLOAD_DELETE_ALLOWED = False
  
  ## Indicates whether image overwrite should be allowed
  ## Aliases: ALLOW_ORIGINAL_PHOTO_PUTTING
  ## Defaults to: False
  #UPLOAD_PUT_ALLOWED = False
  
  ## Default filename for image uploaded
  ## Defaults to: image
  #UPLOAD_DEFAULT_FILENAME = 'image'
  
  ################################################################################
  
  
  ############################### MongoDB Storage ################################
  
  ## MongoDB storage server host
  ## Defaults to: localhost
  #MONGO_STORAGE_SERVER_HOST = 'localhost'
  
  ## MongoDB storage server port
  ## Defaults to: 27017
  #MONGO_STORAGE_SERVER_PORT = 27017
  
  ## MongoDB storage server database name
  ## Defaults to: thumbor
  #MONGO_STORAGE_SERVER_DB = 'thumbor'
  
  ## MongoDB storage image collection
  ## Defaults to: images
  #MONGO_STORAGE_SERVER_COLLECTION = 'images'
  
  ################################################################################
  
  
  ################################ Redis Storage #################################
  
  ## Redis storage server host
  ## Defaults to: localhost
  #REDIS_STORAGE_SERVER_HOST = 'localhost'
  
  ## Redis storage server port
  ## Defaults to: 6379
  #REDIS_STORAGE_SERVER_PORT = 6379
  
  ## Redis storage database index
  ## Defaults to: 0
  #REDIS_STORAGE_SERVER_DB = 0
  
  ## Redis storage server password
  ## Defaults to: None
  #REDIS_STORAGE_SERVER_PASSWORD = None
  
  ################################################################################
  
  
  ############################### Memcache Storage ###############################
  
  ## List of Memcache storage server hosts
  ## Defaults to: ['localhost:11211']
  #MEMCACHE_STORAGE_SERVERS = #    [
  #        'localhost:11211',
  #    ]
  
  
  ################################################################################
  
  
  ################################ Mixed Storage #################################
  
  ## Mixed Storage file storage. This must be the full name of a python module
  ## (python must be able to import it)
  ## Defaults to: thumbor.storages.no_storage
  #MIXED_STORAGE_FILE_STORAGE = 'thumbor.storages.no_storage'
  
  ## Mixed Storage signing key storage. This must be the full name of a python
  ## module (python must be able to import it)
  ## Defaults to: thumbor.storages.no_storage
  #MIXED_STORAGE_CRYPTO_STORAGE = 'thumbor.storages.no_storage'
  
  ## Mixed Storage detector information storage. This must be the full name of a
  ## python module (python must be able to import it)
  ## Defaults to: thumbor.storages.no_storage
  #MIXED_STORAGE_DETECTOR_STORAGE = 'thumbor.storages.no_storage'
  
  ################################################################################
  
  
  ##################################### Meta #####################################
  
  ## The callback function name that should be used by the META route for JSONP
  ## access
  ## Defaults to: None
  #META_CALLBACK_NAME = None
  
  ################################################################################
  
  
  ################################## Detection ###################################
  
  ## List of detectors that thumbor should use to find faces and/or features. All
  ## of them must be full names of python modules (python must be able to import
  ## it)
  ## Defaults to: []
  #DETECTORS = #    [
  #    ]
  
  
  ## The cascade file that opencv will use to detect faces
  ## Defaults to: haarcascade_frontalface_alt.xml
  #FACE_DETECTOR_CASCADE_FILE = 'haarcascade_frontalface_alt.xml'
  
  ################################################################################
  
  
  ################################### Filters ####################################
  
  ## List of filters that thumbor will allow to be used in generated images. All of
  ## them must be full names of python modules (python must be able to import
  ## it)
  ## Defaults to: []
  #FILTERS = #    [
  #    ]
  
  
  
  
  
  ################################ Result Storage ################################
  
  ## Expiration in seconds of generated images in the result storage
  ## Defaults to: 0
  #RESULT_STORAGE_EXPIRATION_SECONDS = 0
  
  ## Path where the Result storage will store generated images
  ## Defaults to: /var/folders/th/z6vmj34j1gngpvwl5fg5t9440000gp/T/thumbor/result_storage
  #RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = '/var/folders/th/z6vmj34j1gngpvwl5fg5t9440000gp/T/thumbor/result_storage'
  
  ## Indicates whether unsafe requests should also be stored in the Result Storage
  ## Defaults to: False
  #RESULT_STORAGE_STORES_UNSAFE = False
  
  
  
  
  ############################ Queued Redis Detector #############################
  
  ## Server host for the queued redis detector
  ## Defaults to: localhost
  #REDIS_QUEUE_SERVER_HOST = 'localhost'
  
  ## Server port for the queued redis detector
  ## Defaults to: 6379
  #REDIS_QUEUE_SERVER_PORT = 6379
  
  ## Server database index for the queued redis detector
  ## Defaults to: 0
  #REDIS_QUEUE_SERVER_DB = 0
  
  ## Server password for the queued redis detector
  ## Defaults to: None
  #REDIS_QUEUE_SERVER_PASSWORD = None
  
  ################################################################################
  
  
  ############################# Queued SQS Detector ##############################
  
  ## AWS key id
  ## Defaults to: None
  #SQS_QUEUE_KEY_ID = None
  
  ## AWS key secret
  ## Defaults to: None
  #SQS_QUEUE_KEY_SECRET = None
  
  ## AWS SQS region
  ## Defaults to: us-east-1
  #SQS_QUEUE_REGION = 'us-east-1'
  
  
  #################################### Errors ####################################
  
  ## This configuration indicates whether thumbor should use a custom error
  ## handler.
  ## Defaults to: False
  #USE_CUSTOM_ERROR_HANDLING = False
  
  ## Error reporting module. Needs to contain a class called ErrorHandler with a
  ## handle_error(context, handler, exception) method.
  ## Defaults to: thumbor.error_handlers.sentry
  #ERROR_HANDLER_MODULE = 'thumbor.error_handlers.sentry'
  
  ################################################################################
  
  
  ############################### Errors - Sentry ################################
  
  ## Sentry thumbor project dsn. i.e.: http://5a63d58ae7b94f1dab3dee740b301d6a:73ee
  ## a45d3e8649239a973087e8f21f98@localhost:9000/2
  ## Defaults to: 
  #SENTRY_DSN_URL = ''
  
  ################################################################################
  </code></pre>
  
  <p>Console is:</p>
  
  <pre><code>ubuntu@ip-172-31-37-226:~$ sudo thumbor --log-level debug --port=9000 --conf=/etc/thumbor/thumbor.conf
  2016-05-23 18:17:25 root:DEBUG thumbor running at 0.0.0.0:9000
  2016-05-23 18:17:31 botocore.credentials:DEBUG Skipping environment variable credential check because profile name was explicitly set.
  2016-05-23 18:17:31 botocore.credentials:DEBUG Looking for credentials via: env
  2016-05-23 18:17:31 botocore.credentials:DEBUG Looking for credentials via: assume-role
  2016-05-23 18:17:31 botocore.credentials:DEBUG Looking for credentials via: shared-credentials-file
  2016-05-23 18:17:31 botocore.credentials:INFO Found credentials in shared credentials file: ~/.aws/credentials
  2016-05-23 18:17:31 botocore.loaders:DEBUG Loading JSON file: /usr/local/lib/python2.7/dist-packages/botocore/data/endpoints.json
  2016-05-23 18:17:31 botocore.loaders:DEBUG Loading JSON file: /usr/local/lib/python2.7/dist-packages/botocore/data/s3/2006-03-01/service-2.json
  2016-05-23 18:17:31 botocore.loaders:DEBUG Loading JSON file: /usr/local/lib/python2.7/dist-packages/botocore/data/_retry.json
  2016-05-23 18:17:31 botocore.client:DEBUG Registering retry handlers for service: s3
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event creating-client-class.s3: calling handler &lt;function add_generate_presigned_post at 0x7fc54c2a6398&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event creating-client-class.s3: calling handler &lt;function add_generate_presigned_url at 0x7fc54c2a2b18&gt;
  2016-05-23 18:17:31 botocore.client:DEBUG The s3 config key is not a dictionary type, ignoring its value of: None
  2016-05-23 18:17:31 botocore.endpoint:DEBUG Setting s3 timeout as (60, 60)
  2016-05-23 18:17:31 thumbor:DEBUG Cleaning key: UgCH96k1fNiFS-fR_Dgh2B-Hujs=/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 thumbor:DEBUG Cleansed key: UgCH96k1fNiFS-fR_Dgh2B-Hujs=/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-parameter-build.s3.GetObject: calling handler &lt;function sse_md5 at 0x7fc54c2c8d70&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-parameter-build.s3.GetObject: calling handler &lt;function validate_bucket_name at 0x7fc54c2c8cf8&gt;
  2016-05-23 18:17:31 tornado_botocore.base:DEBUG Making request for OperationModel(name=GetObject) (verify_ssl=True) with params: {'body': '', 'url': u'https://s3-us-west-2.amazonaws.com/thumbor-centraldoevento/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg', 'headers': {'User-Agent': 'Botocore/1.4.22 Python/2.7.6 Linux/3.13.0-74-generic'}, 'query_string': {}, 'url_path': u'/thumbor-centraldoevento/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg', 'method': u'GET'}
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event request-created.s3.GetObject: calling handler &lt;bound method RequestSigner.handler of &lt;botocore.signers.RequestSigner object at 0x7fc549ff7c90&gt;&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-sign.s3.GetObject: calling handler &lt;function fix_s3_host at 0x7fc54c7f2c08&gt;
  2016-05-23 18:17:31 botocore.utils:DEBUG Checking for DNS compatible bucket for: https://s3-us-west-2.amazonaws.com/thumbor-centraldoevento/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 botocore.utils:DEBUG URI updated to: https://thumbor-centraldoevento.s3.amazonaws.com/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 botocore.auth:DEBUG Calculating signature using hmacv1 auth.
  2016-05-23 18:17:31 botocore.auth:DEBUG HTTP request method: GET
  2016-05-23 18:17:31 botocore.auth:DEBUG StringToSign:
  GET
  
  
  Mon, 23 May 2016 18:17:31 GMT
  /thumbor-centraldoevento/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 botocore.parsers:DEBUG Response headers: &lt;tornado.httputil.HTTPHeaders object at 0x7fc549fb2c10&gt;
  2016-05-23 18:17:31 botocore.parsers:DEBUG Response body:
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Error&gt;&lt;Code&gt;NoSuchKey&lt;/Code&gt;&lt;Message&gt;The specified key does not exist.&lt;/Message&gt;&lt;Key&gt;UgCH96k1fNiFS-fR_Dgh2B-Hujs=/122x101/smart/Koala.jpg&lt;/Key&gt;&lt;RequestId&gt;12939AAD027FDF0C&lt;/RequestId&gt;&lt;HostId&gt;11ijwYI+YqYsGp2Wl/6o9ES1sB/aWNWFkH53PEq+dkKn+j5jCuQ8yAZfpwo3y7ylpYohZzUlGsM=&lt;/HostId&gt;&lt;/Error&gt;
  2016-05-23 18:17:31 thumbor:DEBUG METRICS: timing: result_storage.incoming_time:131
  2016-05-23 18:17:31 thumbor:DEBUG METRICS: inc: result_storage.miss:1
  2016-05-23 18:17:31 thumbor:DEBUG METRICS: inc: storage.miss:1
  2016-05-23 18:17:31 botocore.client:DEBUG Registering retry handlers for service: s3
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event creating-client-class.s3: calling handler &lt;function add_generate_presigned_post at 0x7fc54c2a6398&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event creating-client-class.s3: calling handler &lt;function add_generate_presigned_url at 0x7fc54c2a2b18&gt;
  2016-05-23 18:17:31 botocore.client:DEBUG The s3 config key is not a dictionary type, ignoring its value of: None
  2016-05-23 18:17:31 botocore.endpoint:DEBUG Setting s3 timeout as (60, 60)
  2016-05-23 18:17:31 thumbor:DEBUG Cleaning key: Koala.jpg
  2016-05-23 18:17:31 thumbor:DEBUG Cleansed key: Koala.jpg
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-parameter-build.s3.GetObject: calling handler &lt;function sse_md5 at 0x7fc54c2c8d70&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-parameter-build.s3.GetObject: calling handler &lt;function validate_bucket_name at 0x7fc54c2c8cf8&gt;
  2016-05-23 18:17:31 tornado_botocore.base:DEBUG Making request for OperationModel(name=GetObject) (verify_ssl=True) with params: {'body': '', 'url': u'https://s3-us-west-2.amazonaws.com/images-centraldoevento/Koala.jpg', 'headers': {'User-Agent': 'Botocore/1.4.22 Python/2.7.6 Linux/3.13.0-74-generic'}, 'query_string': {}, 'url_path': u'/images-centraldoevento/Koala.jpg', 'method': u'GET'}
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event request-created.s3.GetObject: calling handler &lt;bound method RequestSigner.handler of &lt;botocore.signers.RequestSigner object at 0x7fc549fb2c10&gt;&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-sign.s3.GetObject: calling handler &lt;function fix_s3_host at 0x7fc54c7f2c08&gt;
  2016-05-23 18:17:31 botocore.utils:DEBUG Checking for DNS compatible bucket for: https://s3-us-west-2.amazonaws.com/images-centraldoevento/Koala.jpg
  2016-05-23 18:17:31 botocore.utils:DEBUG URI updated to: https://images-centraldoevento.s3.amazonaws.com/Koala.jpg
  2016-05-23 18:17:31 botocore.auth:DEBUG Calculating signature using hmacv1 auth.
  2016-05-23 18:17:31 botocore.auth:DEBUG HTTP request method: GET
  2016-05-23 18:17:31 botocore.auth:DEBUG StringToSign:
  GET
  
  
  Mon, 23 May 2016 18:17:31 GMT
  /images-centraldoevento/Koala.jpg
  2016-05-23 18:17:31 botocore.parsers:DEBUG Response headers: &lt;tornado.httputil.HTTPHeaders object at 0x7fc549698790&gt;
  2016-05-23 18:17:31 botocore.parsers:DEBUG Response body:
  &lt;botocore.response.StreamingBody object at 0x7fc54a138c10&gt;
  2016-05-23 18:17:31 thumbor:DEBUG No image format specified. Retrieving from the image extension: .jpg.
  2016-05-23 18:17:31 thumbor:DEBUG Content Type of image/jpeg detected.
  2016-05-23 18:17:31 tornado.access:INFO 200 GET /UgCH96k1fNiFS-fR_Dgh2B-Hujs=/122x101/smart/Koala.jpg (187.5.184.32) 729.83ms
  2016-05-23 18:17:31 thumbor:DEBUG Cleaning key: UgCH96k1fNiFS-fR_Dgh2B-Hujs=/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 thumbor:DEBUG Cleansed key: UgCH96k1fNiFS-fR_Dgh2B-Hujs=/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 botocore.client:DEBUG Registering retry handlers for service: s3
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event creating-client-class.s3: calling handler &lt;function add_generate_presigned_post at 0x7fc54c2a6398&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event creating-client-class.s3: calling handler &lt;function add_generate_presigned_url at 0x7fc54c2a2b18&gt;
  2016-05-23 18:17:31 botocore.client:DEBUG The s3 config key is not a dictionary type, ignoring its value of: None
  2016-05-23 18:17:31 botocore.endpoint:DEBUG Setting s3 timeout as (60, 60)
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-parameter-build.s3.PutObject: calling handler &lt;function validate_ascii_metadata at 0x7fc54c2c46e0&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-parameter-build.s3.PutObject: calling handler &lt;function sse_md5 at 0x7fc54c2c8d70&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-parameter-build.s3.PutObject: calling handler &lt;function convert_body_to_file_like_object at 0x7fc54c2c4c80&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-parameter-build.s3.PutObject: calling handler &lt;function validate_bucket_name at 0x7fc54c2c8cf8&gt;
  2016-05-23 18:17:31 tornado_botocore.base:DEBUG Making request for OperationModel(name=PutObject) (verify_ssl=True) with params: {'body': &lt;StringIO.StringIO instance at 0x7fc549fcf4d0&gt;, 'url': u'https://s3-us-west-2.amazonaws.com/thumbor-centraldoevento/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg', 'headers': {u'x-amz-meta-Server': 'Thumbor/6.0.1', u'x-amz-storage-class': 'STANDARD', u'x-amz-meta-Cache-Control': 'max-age=86400,public', u'x-amz-meta-Date': 'Mon, 23 May 2016 18:17:31 GMT', 'User-Agent': 'Botocore/1.4.22 Python/2.7.6 Linux/3.13.0-74-generic', u'x-amz-meta-Expires': 'Tue, 24 May 2016 18:17:31 GMT', u'x-amz-meta-Content-Type': 'image/jpeg'}, 'query_string': {}, 'url_path': u'/thumbor-centraldoevento/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg', 'method': u'PUT'}
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event request-created.s3.PutObject: calling handler &lt;bound method RequestSigner.handler of &lt;botocore.signers.RequestSigner object at 0x7fc54e598890&gt;&gt;
  2016-05-23 18:17:31 botocore.hooks:DEBUG Event before-sign.s3.PutObject: calling handler &lt;function fix_s3_host at 0x7fc54c7f2c08&gt;
  2016-05-23 18:17:31 botocore.utils:DEBUG Checking for DNS compatible bucket for: https://s3-us-west-2.amazonaws.com/thumbor-centraldoevento/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 botocore.utils:DEBUG URI updated to: https://thumbor-centraldoevento.s3.amazonaws.com/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 botocore.auth:DEBUG Calculating signature using hmacv1 auth.
  2016-05-23 18:17:31 botocore.auth:DEBUG HTTP request method: PUT
  2016-05-23 18:17:31 botocore.auth:DEBUG StringToSign:
  PUT
  
  
  Mon, 23 May 2016 18:17:31 GMT
  x-amz-meta-cache-control:max-age=86400,public
  x-amz-meta-content-type:image/jpeg
  x-amz-meta-date:Mon, 23 May 2016 18:17:31 GMT
  x-amz-meta-expires:Tue, 24 May 2016 18:17:31 GMT
  x-amz-meta-server:Thumbor/6.0.1
  x-amz-storage-class:STANDARD
  /thumbor-centraldoevento/UgCH96k1fNiFS-fR_Dgh2B-Hujs%3D/122x101/smart/Koala.jpg
  2016-05-23 18:17:31 tornado.application:ERROR Exception in callback &lt;functools.partial object at 0x7fc549670100&gt;
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 600, in _run_callback
      ret = callback()
    File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
      return fn(*args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 615, in &lt;lambda&gt;
      self.add_future(ret, lambda f: f.result())
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 232, in result
      raise_exc_info(self._exc_info)
    File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 282, in wrapper
      yielded = next(result)
    File "/usr/local/lib/python2.7/dist-packages/thumbor/handlers/__init__.py", line 371, in save_to_result_storage
      yield gen.maybe_future(context.modules.result_storage.put(results))
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 473, in wrapper
      future.result()
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 232, in result
      raise_exc_info(self._exc_info)
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 461, in wrapper
      result = f(*args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/tc_aws/result_storages/s3_storage.py", line 41, in put
      super(Storage, self).set(bytes, path, callback=callback)
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 473, in wrapper
      future.result()
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 232, in result
      raise_exc_info(self._exc_info)
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 461, in wrapper
      result = f(*args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/tc_aws/aws/storage.py", line 79, in set
      callback=callback,
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 473, in wrapper
      future.result()
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 232, in result
      raise_exc_info(self._exc_info)
    File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 461, in wrapper
      result = f(*args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/tc_aws/aws/bucket.py", line 100, in put
      session.call(**args)
    File "/usr/local/lib/python2.7/dist-packages/tornado_botocore/base.py", line 97, in call
      return self._make_api_call(operation_name=self.operation, api_params=kwargs, callback=callback)
    File "/usr/local/lib/python2.7/dist-packages/tornado_botocore/base.py", line 60, in _make_api_call
      operation_model=operation_model, request_dict=request_dict, callback=callback)
    File "/usr/local/lib/python2.7/dist-packages/tornado_botocore/base.py", line 54, in _make_request
      request_dict=request_dict, operation_model=operation_model, callback=callback)
    File "/usr/local/lib/python2.7/dist-packages/tornado_botocore/base.py", line 40, in _send_request
      validate_cert=False)
    File "/usr/local/lib/python2.7/dist-packages/tornado/httpclient.py", line 430, in __init__
      self.body = body
    File "/usr/local/lib/python2.7/dist-packages/tornado/httpclient.py", line 475, in body
      self._body = utf8(value)
    File "/usr/local/lib/python2.7/dist-packages/tornado/escape.py", line 203, in utf8
      "Expected bytes, unicode, or None; got %r" % type(value)
  TypeError: Expected bytes, unicode, or None; got &lt;type 'instance&gt;
  </code></pre>