Error 403 Forbiden when configure lifecycle for s3 bucket with boto and python
I'm programmatically creating and setting up an s3 buckets with boto.
I can create buckets, objects .. and write on objects ...
I would like to configure a lifecyle for bucket but when I run the code below I get this exception:
boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden with code SignatureDoesNotMatch.
lifecycle = Lifecycle()
lifecycle.add_rule(
'rulename',
prefix='/',
status='Enabled',
expiration=Expiration(days=1)
)
bucket = s3.get_bucket('mybucket')
this debug result can help to answer.
reply: 'HTTP/1.1 403 Forbiddenrn'
header: x-amz-request-id: tx000000000000000000027-0059db8d59-39289-default
header: Content-Length: 196
header: Accept-Ranges: bytes
header: Content-Type: application/xml
header: Date: Mon, 09 Oct 2017 14:53:13 GMT
Traceback (most recent call last):
File "pyth.py", line 28, in
bucket.configure_lifecycle(lifecycle)
File "/usr/lib/python2.7/site-packages/boto/s3/bucket.py", line 1366, in
configure_lifecycle
response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden
SignatureDoesNotMatch
tx000000000000000000027-0059db8d59-39289-default
39289-default-default
bucket.configure_lifecycle(lifecycle)
After some research i can say that this error is caused by the actual ceph version (10.2.7 Jowel) that not support lifecycle policies
$ ceph --version
ceph version 10.2.7-27.el7cp (e0d2d4f2fac9d95a26486121257255260bbec8d5)
链接地址: http://www.djcxy.com/p/70222.html