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.bucket (boto3 Bucket instance) – S3 bucket.
metadata (
dict
, optional) – Header metadata values. These keys will appear in headers asx-amz-meta-*
.acl (
str
, optional) – A pre-canned access control list. See https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl Default isNone
, meaning that no ACL is applied to the object.cache_control (
str
, optional) – The cache-control header value. For example,'max-age=31536000'
.content_type (
str
, optional) – The object’s content type (such astext/html
). If left unset, no MIME type is passed to boto3 (which defaults tobinary/octet-stream
).
- Return type: