admin管理员组

文章数量:1122846

I have a nginx-S3-gateway (NS3G) as frontend that pass the request for encrypted files to AWS REST API Gateway which then send the requests to a Lambda function. I'm trying to get the URI from NS3G to the Lambda function but having no luck. NS3G won't allow headers to be passed to the API Gateway. I tried the HEADER_PREFIXES_ALLOWED environment variable but it still won't pass it to the API. It just shown as empty. I guess the only other option left is to use some rewriting rule. I wrote something like this but I'm getting a 403 error on NS3G logs. Any help would be appreciated.

location ~ \.(gpg|pgp)$ {

   rewrite ^/(.*)$ /dev/api_name/$1 break;

   proxy_pass ;
   proxy_set_header Host $host;
   proxy_intercept_errors off;
   proxy_set_header Authorization $s3auth;
   proxy_set_header X-Amz-Security-Token $awsSessionToken;
}

本文标签: amazon web servicesNginxS3Gateway with AWS API Gateway backendStack Overflow