Closed CriztianiX closed 8 years ago
@CriztianiX yes, both are not implemented, yet. it may take time. (because I'm busy now :<) when you need it (ASAP?)
@umegaya yes... at the moment i've using awscli from lua with os.execute("awscli s3 ...") but, I do not think it's right
@umegaya any news on this? Thanks!
@lblasc I'm starting a project that use aws-cli from lua.. maybe it will be helpful for you... https://github.com/CriztianiX/luaws
Some example using s3 taken from tests
describe("-> S3 -> #s3", function()
it("should create a bucket", function()
local bucket = luaws:S3():createBucket({
Bucket = os.getenv("AWS_BUCKET"),
ACL = "public-read"
})
assert.same({
Location = "/luaws"
}, bucket)
end)
it("should put an object", function()
local object = luaws:S3():putObject({
Key = "LICENSE",
Bucket = os.getenv("AWS_BUCKET"),
ACL = "public-read"
})
assert.are_not.equals(nil, object.ETag)
end)
it("should delete an object", function()
local object = luaws:S3():deleteObject({
Bucket = os.getenv("AWS_BUCKET"),
Key = "LICENSE"
})
assert.equals(nil, object)
end)
it("should delete a bucket", function()
local object = luaws:S3():deleteBucket({
Bucket = os.getenv("AWS_BUCKET")
})
assert.equals(nil, object)
end)
it("should list buckets", function()
local buckets = luaws:S3():listBuckets()
assert.are_not.equals(nil, buckets.Buckets)
end)
end)
@CriztianiX thanks! But @umegaya approach is much more cleaner than executing external tools. Also for s3 you can also use lua-spore (https://github.com/fperrad/lua-Spore/blob/master/test/23-aws.t).
anyway Kinesis is working fine, now I would like to get s3 with the same library.
@CriztianiX @lblasc hi, I have started working on it, but implementing rest-xml seems to need large effort. please wait for next update, and if you need it ASAP, maybe better to take CriztianiX's approach. thanks!
@umegaya Thanks! I'll wait.
@lblasc @CriztianiX can you check my fix is suitable for your use-case? it should test with fundamental functionality of s3, but I only test this branch with ~30kb file IO.
feel free to report bug or improvement idea. thanks!
@lblasc @CriztianiX hi, due to fix for #22, I will merge it first. thank you for reporting this :D
Trying to use s3 does not work, There are not s3 signer and, rest-xml request,