AWS S3 Lifecycle Policy Not Deleting Objects in Glacier Class - advanced patterns
I've hit a wall trying to I'm attempting to set up I've searched everywhere and can't find a clear answer... After trying multiple solutions online, I still can't figure this out. I'm working with an scenario with my S3 bucket lifecycle policy thatโs supposed to transition objects to the Glacier storage class after 30 days and permanently delete them after 365 days. However, I noticed that some objects remain in the Glacier class and are not being deleted as expected. I set the lifecycle policy using the AWS Management Console and confirmed that the policy is active. Here's the lifecycle configuration I used: ```json { "Rules": [ { "ID": "TransitionToGlacier", "Status": "Enabled", "Filter": { "Prefix": "" }, "Transitions": [ { "Days": 30, "StorageClass": "GLACIER" } ], "Expiration": { "Days": 365 } } ] } ``` The objects Iโm testing with are text files uploaded to the bucket over 60 days ago, and they successfully transitioned to the Glacier class. However, when I check the bucket, some of these objects are still there after a year. Iโve ensured that there are no conflicting lifecycle rules. When I try to delete the objects manually, I receive an behavior message: "The operation is not valid for the storage class of the object" which indicates to me that they were not properly marked for expiration. I even checked the AWS CLI for the lifecycle policy and confirmed it matches what I entered in the console: ```bash aws s3api get-bucket-lifecycle-configuration --bucket my-bucket-name ``` Iโm at a loss here. Could this be a delay in the policy application, or is there something Iโm missing in the configuration? Has anyone else encountered similar behavior? Any advice would be appreciated! My development environment is Windows. Am I missing something obvious? My development environment is Windows. What am I doing wrong? What's the best practice here? I've been using Json for about a year now. Any ideas how to fix this?