client.put_object(Bucket='example-space-name/example-folder/', # The path to the directory you want to upload the object to, starting with your Space name.
Key='hello-world.txt', # Object key, referenced whenever you want to access this file later.
Body=b'Hello, World!', # The object's contents.
ACL='private', # Defines Access-control List (ACL) permissions, such as private or public.
Metadata={ # Defines metadata tags.
'x-amz-meta-my-key': 'your-value'
If you attempt to use
You will receive a ParamValidationError:
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid bucket name "grb-backups/p2pooler-backups": Bucket name must match the regex "^[a-zA-Z0-9.\-_]{1,255}$" or be an ARN matching the regex "^arn:(aws).
Instead you should use: