我正在尝试使用python boto3更新存储桶的复制规则。但我不断收到错误:botocore.exceptions.ClientError: An error occurred (MalformedXML) when calling the PutBucketReplication operation: The XML you provided was not well-formed or did not validate against our published schema
我正在按照此处的文档进行操作:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.put_bucket_replication
这是我正在运行的功能。谁能看到我传递的xml怎么了?
def apply_bucket_replication_rule(client):
response = client.put_bucket_replication(
Bucket= 'my-bucket',
'Role': 'arn:aws:iam::0123456:role/replicate_s3_buckets',
'Rules': [
{
'Status': 'Enabled',
'Destination': {
'Bucket': 'arn:aws:s3:::my-bucket-backup',
'Account': '111222333'
}
}
]
},
)
print (response)