umegaya / lua-aws Goto Github PK
View Code? Open in Web Editor NEWpure-lua implementation of aws REST APIs
pure-lua implementation of aws REST APIs
Hello, I'm returning to use the library in a new project!.
So, using lua-resty-http as preferred_engine, s3 putOject returns:
core.lua:159: api_log(): s3:v[2006-03-01]:PutObject:error:...al/share/lua/5.1/lua-aws/engines/http/lua-resty-http.lua:24: Method not supported: PUT @ stack traceback:
Can you add support for AWS Athena and Firehose?
Hey, I'm currently sending a json-string in the sqs body message.
I'm having troubles when i try to decode this string message, seems to be that the xml contains
" in each attribute of the message body.
To handle this my poor solution was to do a base64.encode in a string, and a base.decode
AWS Lambda just updated the CreateFunction request payload as seen in this commit:
awsdocs/aws-lambda-developer-guide@682401c
In particular, I'm interested in Code.ImageUri
, ImageConfig
, and PackageType
.
refs #63
figure out the way to test STS use case
Sometimes... when i am sending messages to sqs i get
SENDED: OK
SENDED: OK
sqs:v[2012-11-05]: Something wrong in the request 403 f172e95b-e0c7-4c64-b1be-6b4efcd705654711480a2ec1eb9a97ac41c3268dbcc277a6782e-af92-52ec-9728-34992d8b18dff27f1369-b07b-4faf-9b9b-53af6648d41488bcf4efe24e40ab3131b8c595165db65f212ede-085a-5789-9ce5-62698a40803f6e1930a3-5cb4-4ba5-9241-fda26574ccacaab93f3e2d8c0b37bda597a4038cd320c8d6f592-19ef-5943-bcd0-b9259bf502fbfcb2175f-1fa1-4405-a316-ff7e53a40c5e0e88c6ad853c3e41e04fbf6ec86cc308b95e80fe-b1ff-5a62-917f-cc4933e4b1b00b59c5bb-100d-4ee7-9fa7-fbb4714611b94a4fec4e894444d85dac079518d9ee468fb7d210-3422-5864-a616-9ea7b639936f8b70a9ba-3aba-4751-93d7-ace85b8eab7df287283c0b8cea2d952688cb5174274be153be9c-67e4-5512-adb5-f22be5f8612a67da005e-e9e6-425d-b6fa-a6daddd6fbf9c90029612d8016f39a83d48319a0d5c058f9cf2e-0ed4-5d68-b5a1-83998cc8a65cSenderSignatureDoesNotMatch
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.9a08c7ac-067f-5d0a-b3b7-8b1b846273fb
SENDED: OK
SENDED: OK
SENDED: OK
any idea?
Hey. i am using the library inside a web app using lapis framework (running on openresty) and i get this error when i try to use it:
ls: cannot access /usr/local/openresty/lualib//usr/local/share/lua/5.1/lua-aws/services//definitions/dynamodb*: No such file or directory
Any idea?
use demo for dynamodb.lua error
message:lua-aws/core.lua:83: application require lfs for fs strictly but cannot
Hi,
I was trying out describeInstances by providing an array (as a lua table) of 1 instance ID. But it always returns all the instances. I tried initializing the array table from the 0 index but that does not work either. Has anyone tried this?
suggested by @nkzawa, and I'm +1 on this.
-- if omitted, proper default value is set
{
max_retry: number,
jitter: {
lower: number,
upper: number
},
initial_backoff: number
}
-- as default config to AWS.new
local aws = AWS.new({
accessKeyId = os.getenv('AWS_ACCESS_KEY'),
secretAccessKey = os.getenv('AWS_SECRET_KEY'),
retry = { ... above configuration }
})
-- or as per call configuration of each API, as its 2nd argument
-- (need breaking change for the 2nd argument specification, because it currently used to provide response object, which contains file handle to write response directly, see s3 test getObject to file for example)
aws.EC2:api():describeInstances({}, {
retry = { ... above configuration }
})
I am not able to create a function with Layers
defined. I think the issue is that the spec is from 2015 and was last updated in #55.
For example, I see MemorySize
but not Layers
.
The the javascript SDK and the CreateFunction API says that Layers
is an optional array of strings.
Is it possible to update lua-aws
to support layers?
Trying to use s3 does not work,
There are not s3 signer and, rest-xml request,
local super_class = (type(super) == 'string' or classes[super] and super)
if "type(super)" is "string", then super_class is true, but i think what you want is "classes[super]"
Trying to test swf i get:
swf:v[2012-01-25]: Something wrong in the request nil {"__type":"com.amazon.coral.service#IncompleteSignatureException","message":
"Date must be in ISO-8601 'basic format'. Got '1442252505'. See http://en.wikipedia.org/wiki/ISO_8601"}
as title. reported to fail with following error
./lua-aws/services/base.lua:19: attempt to index a userdata value
in the situation like below.
local aws1 = AWS.new({ ..., region = 'us-west-1' })
local aws2 = AWS.new({ ..., region = 'us-east-1' }) -- fails
I am testing ecs api query on AWS EC2 where my IAM role has full permission to ECS api. But lua-aws is not able to use the IAM role. How to configure lua-aws to use IAM role?
local AWS = require ('lua-aws.init')
local Region = os.getenv('AWS_REGION') or 'us-east-1'
local aws = AWS.new({
region = Region,
endpoint = "https://ecs." .. Region .. ".amazonaws.com"
})
print("https://ecs." .. Region .. ".amazonaws.com")
local api = aws.ECS:api_by_version('2014-11-13')
ok, r = api:listClusters({
maxResults = 10,
})
if not ok then
assert(ok, r)
end
AWS Lambda just added support for Architectures in CreateFunction/UpdateFunction which can be x86_64
or arm64
.
Lua-aws has a current support for Lua 5.1 version. Can we get to work with lua-5.3+
Hi,
I was trying to add Tags when executing RunInstances. On stepping through the code I notice that there are no rules for TagSpecification Array and the function serialize_Struct in request/query_string_serializer.lua prints the message "has no rule to handle. ignored". How are these rules populated? How can we get the rule for TagSpecification?
Thanks,
Milind
latest version of nodejs aws-sdk support s3 select. Can you add support for s3 select in lua-aws?
Please bind Kinesis: https://aws.amazon.com/documentation/kinesis/
When i try to send params for the request...
params = {
QueueUrl = "DEV_email-one2one",
MessageBody = "testing"
}
res = AWS.SQS:api_by_version('2012-11-05'):sendMessage(params)
criztianix@blacker:~$ lua test-aws.lua
sqs:v[2012-11-05]: sendMessage:error:/usr/lib64/lua/5.1/lua-aws/class.lua:34: no such method: QueueUrl
stack traceback:
/usr/lib64/lua/5.1/lua-aws/class.lua:34: in function </usr/lib64/lua/5.1/lua-aws/class.lua:31>
...lua/5.1/lua-aws/requests/query_string_serializer.lua:16: in function 'serialize_struct'
...lua/5.1/lua-aws/requests/query_string_serializer.lua:11: in function 'serialize'
/usr/lib64/lua/5.1/lua-aws/requests/query.lua:13: in function 'serialize_query'
/usr/lib64/lua/5.1/lua-aws/requests/query.lua:27: in function 'build_request'
/usr/lib64/lua/5.1/lua-aws/requests/base.lua:23: in function </usr/lib64/lua/5.1/lua-aws/requests/base.lua:21>
(tail call): ?
[C]: in function 'pcall'
/usr/lib64/lua/5.1/lua-aws/api.lua:79: in function 'sendMessage'
test-aws.lua:19: in main chunk
[C]: ?
local aws = AWS.new({
accessKeyId = os.getenv('AWS_ACCESS_KEY'),
secretAccessKey = os.getenv('AWS_SECRET_KEY'),
})
aws.EC2:api({ --specific config for ec2. if omitted, default config passed to AWS.new will be used
accessKeyId = os.getenv('EC2_AWS_ACCESS_KEY'),
secretAccessKey = os.getenv('EC2_AWS_SECRET_KEY'),
}):describeInstances()
local aws = AWS.new({
accessKeyId = os.getenv('AWS_ACCESS_KEY'),
secretAccessKey = os.getenv('AWS_SECRET_KEY'),
}, {
ec2 = "2016-11-15" -- indicate preload 2016-11-15 version of API on creation
lambda = { -- indicate preload 2015-03-31 version of API with specific config
"2015-03-31", {
accessKeyId = os.getenv('LAMBDA_AWS_ACCESS_KEY'),
secretAccessKey = os.getenv('LAMBDA_AWS_SECRET_KEY'),
}
}
}
})
This is because it always descends on .value, whereas lists don't have that parameter. Will send PR, but not sure it'll behave correctly in all cases. :D
aws-sdk-js seems to change its service definition json files at v2.x, lua-aws should follow it to get along with new service addition.
I am planning to use lua-aws module under Openresty environment. How to leverage the openresty http engine for aws api calls?
is there any plan to support AWS ECS API?
In SQS 's response, when there are only one message, an object is returned.
But when there are many messages it returns a table with a key "list=true".
This is normal? It should not be a list always?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.