# 事象
Cloudfront -> API Gateway -> Lambda という構成でセットアップを行ったところ、Missing Authentication Token が返された。
解決方法
behaviorのパスパターンとAPI Gatewayのリソースを一致させる必要があった。
## API Gatewayのリソース
POST https://xxxx.execute-api.ap-northeast-1.amazonaws.com/api/users/comments/relations
Originパス
/api
behavior
間違えていたところ
users/comments/relations に一致した場合は API Gateway の / にリダイレクトされるような処理をイメージしていたので、API Gatewayのリソース設定 が誤っていた。
/ -> /users/comments/relationsに修正したことで解決した。
# 参考記事
https://lukemillerdev.medium.com/missing-authentication-token-cloudfront-apig-troubleshooting-252d8a33c412