有什么方法可以查找apigateway端点的区域并使用它来用sigv4对请求进行签名吗?
我正在使用aws进行签名,如下所示
let req = new AWS.HttpRequest( endpoint );
req.method = 'POST';
req.path = endpoint.path;
req.region = QueryApi.getBaseUrlRegion( this._baseUrl );
req.body = JSON.stringify( body );
req.headers[ 'Host' ] = endpoint.host
req.headers[ 'presigned-expires' ] = false
req.headers[ 'Content-Type' ] = 'application/json'
let signer = new AWS.Signers.V4( req, 'execute-api' )
signer.addAuthorization( this._awsCreds, new Date() )现在,我正在从内部aws execute url解析该区域,但这不能与自定义dns名称一起工作。
唯一的选项是使用配置,还是进行DNS查找?
发布于 2016-04-21 22:46:00
不幸的是,当使用自定义域名时,目前还没有查找该区域的方法。使用DNS查找也不能工作,因为API是CloudFront发行版的前端。
https://stackoverflow.com/questions/36758200
复制相似问题