Skip to content

Error 400 with putBucketIntelligentTieringConfiguration: "The XML you provided was not well-formed" #5915

@alessiafrasson-agile

Description

@alessiafrasson-agile

Describe the bug

I am trying to configure Intelligent Tiering for an S3 bucket using the AWS SDK for Java (software.amazon.awssdk s3 version 2.30.27).
However, I receive a 400 error with the message:
"The XML you provided was not well-formed or did not validate against our published schema."

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

The Intelligent Tiering configuration should be successfully applied to the bucket.

Current Behavior

The XML you provided was not well-formed or did not validate against our published schema (Service: S3, Status Code: 400, Request ID: SVDDWG3HVH2HQX6C, Extended Request ID: tzlCI6Dj7DXq8XzdB1zKbql3el1XqaA52dKOPnoo9YMEoFzvt7sKER4zYmsLjvapOqUBUiBwQUw=) (SDK Attempt Count: 1)

Reproduction Steps

Create an S3 client using S3Client.create().
Call the putBucketIntelligentTieringConfiguration method with the following configuration:

import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.model.*;

...

PutBucketIntelligentTieringConfigurationRequest request =
        PutBucketIntelligentTieringConfigurationRequest.builder()
                .bucket(bucketName)
                .id("testIntelligentTieringConfigurationRequest")
                .intelligentTieringConfiguration(IntelligentTieringConfiguration.builder()
                        .id("IntelligentTieringConfigurationRequestConfig")
                        .status(IntelligentTieringStatus.ENABLED)
                        .filter(IntelligentTieringFilter.builder().prefix("v0").build())
                        .tierings(Tiering.builder()
                                .days(90)
                                .accessTier(IntelligentTieringAccessTier.ARCHIVE_ACCESS)
                                .build())
                        .build())
                .build();

s3Client.putBucketIntelligentTieringConfiguration(request);


Possible Solution

No response

Additional Information/Context

The bucket exists, and IAM permissions have been verified.

Debugging details:
I extracted the generated XML request, and it appears as follows:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IntelligentTieringConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Id>IntelligentTieringConfigurationRequestConfig</Id>
    <Filter>
        <Prefix>v0</Prefix>
    </Filter>
    <Status>Enabled</Status>
    <Tiering>
        <Days>90</Days>
        <AccessTier>ARCHIVE_ACCESS</AccessTier>
    </Tiering>
</IntelligentTieringConfiguration>

AWS Java SDK version used

2.30.27

JDK version used

22

Operating System and version

MacOS Sequoia 15.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.closing-soonThis issue will close in 4 days unless further comments are made.p2This is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions