Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

smiba/lua-resty-aws

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

lua-resty-aws

AWS signature V4 library for OpenResty + Lua.

Overview

This library implements request signing using the AWS Signature Version 4 specification. This signature scheme is used by nearly all AWS services.

Example

#You're limited by your max_body_size (and memory it may take up)
client_max_body_size 1G;
client_body_buffer_size 1024M;
client_body_in_single_buffer on;

map $request_uri $request_uri_no_parameters {
    "~^(?P<path>.*?)(\?.*)*$"  $path;
}

location / {
    set $s3_host s3.amazonaws.com;
    set $s3_uri $request_uri_no_parameters;
    access_by_lua "local aws = require 'resty.aws'; aws.s3_set_headers(ngx.var.access_key, ngx.var.secret_key, ngx.var.s3_host, ngx.var.s3_uri)";
    proxy_pass https://$s3_host$s3_uri;
}

About

AWS signature V4 library for OpenResty + Lua

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.