upload_object#

ltdconveyor.s3.upload_object(bucket_path, bucket, content='', metadata=None, acl=None, cache_control=None, content_type=None)#

Upload an arbitrary object to an S3 bucket.

Parameters:
  • bucket_path (str) – Destination path (also known as the key name) of the file in the S3 bucket.

  • content (Union[str, bytes], default: '') – Object content.

  • bucket (Any) – S3 bucket.

  • metadata (Optional[Dict[str, str]], default: None) – Header metadata values. These keys will appear in headers as x-amz-meta-*.

  • acl (Optional[str], default: None) – A pre-canned access control list. See https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl Default is None, meaning that no ACL is applied to the object.

  • cache_control (Optional[str], default: None) – The cache-control header value. For example, 'max-age=31536000'.

  • content_type (Optional[str], default: None) – The object’s content type (such as text/html). If left unset, no MIME type is passed to boto3 (which defaults to binary/octet-stream).

Return type:

None