AWSput_bucket_lifecycle_configuration抛出格式错误的XML错误

时间:2019-02-25 05:18:52

标签: python boto3

尽管有几种尝试和错误方法,但我仍收到此错误消息。

我收到的错误是

raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (MalformedXML) when

calling the PutBucketLifecycleConfiguration operation: The XML you provided was not well-formed or did not validate against our published schema

python代码如下

lfc=  {"Rules":[{"Expiration": { "Days":3650, }, 'Filter':{'Prefix': 'XYZ'}, 'ID': 'XXX','Status':'Enabled', 'Transitions':[ {'Date': datetime.datetime(2019, 2, 27),'Days': 2,'StorageClass': 'GLACIER'} ]}]}

client.put_bucket_lifecycle_configuration(Bucket "XXXXXXXX", LifecycleConfiguration=lfc)

有人可以建议我需要做什么吗?

0 个答案:

没有答案