【以下的问题经过翻译处理】 我已设置了lambda函数url和cloudfront系统。
- Lambda函数Url很简单,是返回一个图像或一个json值的函数。
- Cloudfront使用以下设置:
- Origins:
- Origin Domain:{LAMBDA函数的URL}
- Protocol:HTTPS only - TLSv1
- Enable Origin Shield:No
- Behavior:
- Viewer:
Redirect HTTP to HTTPS
- Allowed HTTP Method:
GET, HEAD
- Restrict Viewer Access:
No
- Cache Policy:
Managed-CachingDisabled
- Origin Request Policy:
AllViewer
然而,结果始终返回403 Forbidden,以及以下body:
{"Message":null}
和以下header:
X-cache: Error from cloudfront
x-amzn-ErrorType: AccessDeniedException
我是否错过了任何导致此错误的设置?我已经测试过使用postman和浏览器直接命中函数url,它可以正常工作。