2015-10-13 106 views
0

我正尝试通过AWS节点SDK在AWS S3上创建一个静态网站。我在我的步骤putting the bucket website。我打电话putBucketWebsite(params = {}, callback)以下参数:AWS S3静态网站通过Nodejs SDK

{ 
    "Bucket": "xxx.example.com", 
    "WebsiteConfiguration": { 
    "IndexDocument": { 
     "Suffix": "index.html" 
    }, 
    "RoutingRules": [] 
    } 
} 

,但我收到以下错误:

MalformedXML: The XML you provided was not well-formed or did not validate against our published schema

我在做什么错?

当我getBucketWebsite从工作的网站,我得到:

{ 
    "IndexDocument": { 
    "Suffix": "index.html" 
    }, 
    "RoutingRules": [] 
} 
+0

您是否尝试过不包含'RoutingRules'呢? –

+0

@VsevolodGoloviznin是的。这会导致不同的错误。 – Erik

+1

哪一个?因为在文档中看来,如果指定RoutingRules键,则需要在其中指定对象 –

回答

1

尝试从您的要求,移除RoutingRules。根据documentation它需要一些属性存在。