PutBucketLifecycleConfiguration: "Filter" is always required and should be a non-empty object ? #6895
              
                Unanswered
              
          
                  
                    
                      SanjalKatiyar
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to create a bucket lifecycle rule (S3 SDK version:
"@aws-sdk/client-s3": "3.667.0") which applies to all the objects of the bucket. I tried specifying"Filter": {}(please check the snippet below).But, above syntax threw a
TypeError:I thought of omitting the "Filter" entirely (as it is supposed to be optional as per the docs), but that resulted in error as well. Found a similar issue for this aws/aws-sdk-js#2530.
Only workaround that did work for me is to use following:
Filter: { Prefix: '' }and SDK was happy with this syntax.Is this an expected behaviour or a bug on SDK or documentation side ?
Beta Was this translation helpful? Give feedback.
All reactions