You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用ngx_aws_auth模块配置Nginx反向代理S3私有桶时签名不匹配问题求助

使用ngx_aws_auth模块配置Nginx反向代理S3私有桶时签名不匹配问题求助

我最近在尝试用ngx_aws_auth模块给S3私有桶做身份验证,用的是AWS Signature V4,但卡在签名不匹配的问题上好几天了,实在不知道该怎么办,来求助大家!

我先用Python脚本生成了scope和签名,然后把它们硬编码到Nginx配置里测试,但AWS返回的错误一直是:

The request signature we calculated does not match the signature you provided. Check your key and signing method

我运行脚本的命令是./script -k my-aws-secret-key -r my-aws-region -s my-aws-service,它返回的scope和签名看起来是对的,我直接复制粘贴到Nginx配置里了,我的配置片段是这样的:

location /test {
    aws_access_key AKIAEXAMPLETEST;
    aws_s3_bucket my-test-bucket;
    aws_key_scope 20230630/us-east-1/s3/aws4_request;
    aws_signing_key SOMERANDOMVALUE=;
    aws_sign;
    proxy_pass http://my-test-bucket/my-test-file.mp4;
}

有没有大佬能给点排查方向或者解决思路呀?

备注:内容来源于stack exchange,提问作者Henrique

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 11:14:34