code: def build_post_policy(self, expiration_time, conditions):
          
          assert type(expiration_time) == time.struct_time, \
              'Policy document must include a valid expiration Time object'
  
          # Convert conditions object mappings to condition statements
  
          return '{"expiration": "%s",\n"conditions": [%s]}' % \
              (time.strftime(boto.utils.ISO8601, expiration_time), ",".join(conditions))
docs: Taken from the AWS book Python examples and modified for use with boto