-
Notifications
You must be signed in to change notification settings - Fork 862
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
LifecycleRule.NoncurrentVersionExpiration.NewerNoncurrentVersions is not populating in PutLifecycleConfiguration request XML #3580
Comments
Per S3 API: NoncurrentVersionExpiration, it does support Per Changelog, |
@ashishdhingra in addition to this, if we retrieve the rules and without any change if we call AmazonS3Client.PutLifecycleConfigurationAsync method, it throws the exception Step 1: Create below lifecycle configuration rule Step 2: Get Lifecycle configuration rule using AmazonS3Client.GetLifecycleConfigurationAsync(configurationRequest)
and in LifeCycleConfigurationRule it will set Filter = null Step 3: Call AmazonS3Client.PutLifecycleConfigurationAsync without changing any configuration or rule which was received in Step#2. It will generate below xml and add in request payload
As it is not generating the Filter element which was received in response in Step#2, hence it throws exception "Amazon.S3.AmazonS3Exception: The XML you provided was not well-formed or did not validate against our published schema"
|
@vkadiwala-conga For the other issue that you reported in previous comment, it appears to be similar to aws/aws-tools-for-powershell#367. Per my discussion with the team, it would be fixed in next major version of AWS SDK and PowerShell, which are currently in preview. There is a workaround proposed in aws/aws-tools-for-powershell#367 (comment), which is to parse response from |
Fix released in AWSSDK.S3 (3.7.410.9) |
Comments on closed issues are hard for our team to see. |
Describe the bug
This is the rule I am creating on bucket through .Net AWSSDK.S3
While calling AmazonS3Client.PutLifecycleConfigurationAsync method below XML is getting generated
As you see,
NewerNoncurrentVersions
property is not getting generated in request XML and hence when the rule is applied it will not set the valueRegression Issue
Expected Behavior
It should add the xml element NewerNoncurrentVersions in NoncurrentVersionExpiration element while calling
AmazonS3Client.PutLifecycleConfigurationAsync
methodCurrent Behavior
While calling
AmazonS3Client.PutLifecycleConfigurationAsync
method below XML is getting generatedReproduction Steps
Possible Solution
Possible reason is in class
PutLifecycleConfigurationRequestMarshaller.cs
it is not creating an XML element for NewerNoncurrentVersions which has to be done like NoncurrentDaysAdditional Information/Context
No response
AWS .NET SDK and/or Package version used
It is happening in all versions of AWSSDK.S3 starting from Version="3.7.405.9" to Version="4.0.0-preview.4"
Targeted .NET Platform
.Net 8.0
Operating System and version
Windows 11 Enterprise
The text was updated successfully, but these errors were encountered: