0

I am trying to create a static website on AWS S3 via the AWS node SDK. I am at the step where I am putting the bucket website. I am calling putBucketWebsite(params = {}, callback) with the following parameters:

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

but I am getting the following error:

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

What am I doing wrong?

When I getBucketWebsite from a site that works, I get:

{
  "IndexDocument": {
    "Suffix": "index.html"
  },
  "RoutingRules": []
}
4
  • Have you tried to not include RoutingRules at all? Commented Oct 13, 2015 at 18:21
  • @VsevolodGoloviznin yes. That causes a different error. Commented Oct 13, 2015 at 18:22
  • 1
    Which one? Because as it seems in the doc, if you specify RoutingRules key, you need to specify objects inside it Commented Oct 13, 2015 at 18:26
  • Actually, that did work. I could have sworn that I tried that.... Thanks! Submit an answer and I will accept it. Commented Oct 13, 2015 at 18:31

1 Answer 1

1

Try removing RoutingRules from your request. As per documentation it requires some properties to be present.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.