Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
alessiafrasson-agile opened this issue Feb 28, 2025 · 1 comment
Labels
bug This issue is a bug. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Comments

@alessiafrasson-agile
Copy link

alessiafrasson-agile commented Feb 28, 2025

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

@alessiafrasson-agile alessiafrasson-agile added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 28, 2025
@bhoradc
Copy link

bhoradc commented Feb 28, 2025

Hi @alessiafrasson-agile,

Thank you for reporting the issue. By having the same ID for both the request and the configuration, it would ensure that the configuration being set is clearly associated with the overall request being made. Can you match the Configuration ID and the Request ID and try again?

 PutBucketIntelligentTieringConfigurationRequest.builder()
                .bucket(bucketName)
                .id("testIntelligentTieringConfigurationRequest")
                .intelligentTieringConfiguration(IntelligentTieringConfiguration.builder()
                        .id("testIntelligentTieringConfigurationRequest")

Regards,
Chaitanya

@bhoradc bhoradc added p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Projects
None yet
Development

No branches or pull requests

2 participants