0

I'am new to S3 and I'm trying to apply LUA script to manage object via storage class in radosgw and this is what came out in radosgw logs by using this command "s3cmd put ti s3://totodash". (The file has been upload but in the wrong storage class.)

s3:put_obj evaluate_iam_policies: implicit deny from identity-based policy
lua background: cache get: name=rdc.rgw.log++script.background. : hit (negative entry)
s3:put_obj required_mask= 2 user.op_mask=7

LUA :

-- Lua script to auto-tier S3 object PUT requests
-- exit script quickly if it is not a PUT request
if Request == nil or Request.RGWOp ~= "put_obj"
then
 return
end
RGWDebugLog("File size: " .. Request.ContentLength)
if Request.ContentLength < 65536 then
 Request.HTTP.StorageClass = "DEEP_ARCHIVE"
 RGWDebugLog("Applied DEEP_ARCHIVE to object: " .. Request.Object.Name)
elseif Request.ContentLength < 1048576 then
 Request.HTTP.StorageClass = "STANDARD_IA"
 RGWDebugLog("Applied STANDARD_IA to object: " .. Request.Object.Name)
else
 Request.HTTP.StorageClass = "STANDARD"
 RGWDebugLog("Applied STANDARD to object: " .. Request.Object.Name)
end

radosgw-admin bucket list --bucket=totodash

"name": "ti",
 "instance": "",
 "ver": {
 "pool": 93,
 "epoch": 222
 },
 "locator": "",
 "exists": true,
 "meta": {
 "category": 1,
 "size": 1024,
 "mtime": "2025年12月08日T10:33:29.002460Z",
 "etag": "0f343b0931126a20f133d67c2b018a3b",
 "storage_class": "STANDARD",
 "owner": "dashboard",
 "owner_display_name": "dashboard",
 "content_type": "application/octet-stream",
 "accounted_size": 1024,
 "user_data": "",
 "appendable": false
 },
Thanks for any help 
Koni
asked Dec 8, 2025 at 13:12

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.