{"id":13778619,"url":"https://github.com/kiddkai/lua-resty-aws-sdk","last_synced_at":"2026-01-14T11:17:00.740Z","repository":{"id":83083261,"uuid":"73674016","full_name":"kiddkai/lua-resty-aws-sdk","owner":"kiddkai","description":"make api call to aws services :)","archived":false,"fork":false,"pushed_at":"2016-12-01T07:04:28.000Z","size":82,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T16:20:10.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiddkai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-11-14T06:31:54.000Z","updated_at":"2024-03-25T15:04:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"83d7a0b0-aebf-4cc5-9cf1-2949e6d7f6c2","html_url":"https://github.com/kiddkai/lua-resty-aws-sdk","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kiddkai/lua-resty-aws-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiddkai%2Flua-resty-aws-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiddkai%2Flua-resty-aws-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiddkai%2Flua-resty-aws-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiddkai%2Flua-resty-aws-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiddkai","download_url":"https://codeload.github.com/kiddkai/lua-resty-aws-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiddkai%2Flua-resty-aws-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28418087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:00:55.407Z","updated_at":"2026-01-14T11:17:00.714Z","avatar_url":"https://github.com/kiddkai.png","language":"Lua","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"# Name\n\nlua-resty-aws-sdk - a raw aws sdk generated from API specification\n\n## Table of Contents\n\n* [Name](#Name)\n* [Status](#Status)\n\n## Status\n\nThis library is not ready for production.\n\n## Description\n\nThis Lua library provides basic aws request signing and creating feature. You can use this module\nwith `proxy_pass`, or `lua-resty-http` or any other library you want.\n\n## Synopsis\n\n```lua\nlocal lambda = require 'resty.aws.lambda'\nlocal cred = require 'resty.aws.cred'\nlocal json = require 'cjson'\n\nlocal c = cred.from_env()\nlocal l = lambda:new()\nlocal body = json.encode({\n  foo = 'bar'\n})\n\nlocal req = l:Invoke(c, {\n    FunctionName = 'test',\n    ['X-Amz-Client-Context'] = '\u003csome_base64_json_context\u003e'\n}, body)\n\n-- do something with req\n```\n\n## Request Structure\n\nThe `req` variable in the code above is just a data object which includes the following informations:\n\n* headers - headers as a `{ { k, v } }` list\n* hostname - the hostname which you can send the api request to\n* port - the port, 443 only\n* pathname - the pathname for the api\n* method - the request method you can use to send the api request\n* query - the query string as string\n* body - the request body\n\nBecause the aws sdk api only provides you data. You can build your own APIs on top of them. It doesn't\ncare about which `http` library you use.\n\n## Credentials\n\nAWS credentials is a very important in the API request. So make sure you choose the right way to read\nand pass your credential to the request.\n\nIn this library. It provides a module called `resty.aws.cred`. Which allows you get your credential from\ndifferent places.\n\nThe credential table will have a data structure which looks like this:\n\n```\n{\n  key = String,\n  secret = String,\n  session_token = ?String\n}\n```\n\nThe session token is widly used in different places `iam/sts`. But is not a required field.\n\n### `from_env`\n\nThis function will help you create a new credential table using `AWS_` related environment variables, the name\nof the variables are consist with `aws-cli`. \n\n- AWS_ACCESS_KEY_ID\n- AWS_SECRET_ACCESS_KEY\n- AWS_SESSION_TOKEN\n\n```lua\nlocal c = require 'resty.aws.cred'\nlocal credential = c.from_env()\n```\n\n### `from_iam`\n\nThis function will help you create a new credential table using `iam` role which your related to the resource(ec2/ecs/..)\nyou use. It simply sends http request to `169.254.169.254` to get the metadata informations. For more information about\n`iam` role and metadata. You need to check the [AWS Document](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)\nabout it.\n\n\n```lua\nlocal c = require 'resty.aws.cred'\nlocal credential = c.from_iam('lambdainvoke')\n```\n\n\n## Contribute\n\nService source files are generated using the `codegen/main.lua` file to create. All service file share the same format. And\n`botocore` as a submodule provides a nice API specification. We don't need to do the busywork to create lua api for every\nservice manually. Instead, once we finish the code generation script. The `api-spec` + `codegen` will generate the code for\nus. So, don't change the code manually in the `lib/resty/aws` directory.\n\n## Support signature methods\n\n- [v4](http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html)\n\n## Implemented Services\n\n- `resty.aws.lambda`\n- `resty.aws.sqs`\n- `resty.aws.sns`\n\n## Todo\n\n- `resty.aws.s3`\n- `resty.aws.cloudwatch`\n- `resty.aws.elb`\n- `resty.aws.kinesis`\n- `resty.aws.logs`\n- `resty.aws.kms`\n- `resty.aws.cognito-identity`\n\n\n## Not Yet Implemented\n\n- [s3 signigure](http://docs.aws.amazon.com/AmazonS3/latest/API/bucket-policy-s3-sigv4-conditions.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiddkai%2Flua-resty-aws-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiddkai%2Flua-resty-aws-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiddkai%2Flua-resty-aws-sdk/lists"}