Hi, I'm trying to get the example application working with axum (0.3.4, although I've tried with the latest as well). I'm use CodeBuild using the same buildspec.yml file recommended, and everything seems to be building correctly. I push the build to the lambda and then create the API Gateway HTTP proxy as recommended. When I try to hit the generated endpoint, the response is:
{"message":"Not Found"}
API Gateway Logs:
START RequestId: f2682bf7-17cd-4cc6-aa0d-e9f192a991b7 Version: $LATEST
[2m2022-01-04T04:38:51.734927Z[0m [34mDEBUG[0m [2mmusofile_api[0m[2m:[0m start!
[2m2022-01-04T04:38:51.739864Z[0m [34mDEBUG[0m [2mmusofile_api[0m[2m:[0m running on lambda!
[2m2022-01-04T04:38:51.743546Z[0m [34mDEBUG[0m [2mhyper::client::connect::http[0m[2m:[0m connecting to 127.0.0.1:9001
[2m2022-01-04T04:38:51.745134Z[0m [34mDEBUG[0m [2mhyper::client::connect::http[0m[2m:[0m connected to 127.0.0.1:9001
[2m2022-01-04T04:38:51.745407Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m flushed 74 bytes
[2m2022-01-04T04:38:51.747265Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m parsed 7 headers
[2m2022-01-04T04:38:51.747291Z[0m [34mDEBUG[0m [2mhyper::proto::h1::conn[0m[2m:[0m incoming body is chunked encoding
[2m2022-01-04T04:38:51.747350Z[0m [34mDEBUG[0m [2mhyper::proto::h1::decode[0m[2m:[0m incoming chunked header: 0x9CD (2509 bytes)
[2m2022-01-04T04:38:51.747424Z[0m [34mDEBUG[0m [2mhyper::proto::h1::conn[0m[2m:[0m incoming body completed
[2m2022-01-04T04:38:51.747492Z[0m [34mDEBUG[0m [2mhyper::client::pool[0m[2m:[0m pooling idle connection for ("http", 127.0.0.1:9001)
[2m2022-01-04T04:38:51.748952Z[0m [34mDEBUG[0m [1mrequest[0m[1m{[0m[3mmethod[0m[2m=[0mGET [3muri[0m[2m=[0mhttps://localhost/?foo=bar [3mversion[0m[2m=[0mHTTP/1.1[1m}[0m[2m:[0m [2mtower_http::trace::on_request[0m[2m:[0m started processing request
[2m2022-01-04T04:38:51.748976Z[0m [34mDEBUG[0m [1mrequest[0m[1m{[0m[3mmethod[0m[2m=[0mGET [3muri[0m[2m=[0mhttps://localhost/?foo=bar [3mversion[0m[2m=[0mHTTP/1.1[1m}[0m[2m:[0m [2mmusofile_api[0m[2m:[0m root!
[2m2022-01-04T04:38:51.748986Z[0m [34mDEBUG[0m [1mrequest[0m[1m{[0m[3mmethod[0m[2m=[0mGET [3muri[0m[2m=[0mhttps://localhost/?foo=bar [3mversion[0m[2m=[0mHTTP/1.1[1m}[0m[2m:[0m [2mtower_http::trace::on_response[0m[2m:[0m finished processing request [3mlatency[0m[2m=[0m0 ms [3mstatus[0m[2m=[0m200
[2m2022-01-04T04:38:51.749018Z[0m [34mDEBUG[0m [2mhyper::client::pool[0m[2m:[0m reuse idle connection for ("http", 127.0.0.1:9001)
[2m2022-01-04T04:38:51.749085Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m flushed 260 bytes
[2m2022-01-04T04:38:51.757924Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m parsed 3 headers
[2m2022-01-04T04:38:51.757964Z[0m [34mDEBUG[0m [2mhyper::proto::h1::conn[0m[2m:[0m incoming body is content-length (16 bytes)
[2m2022-01-04T04:38:51.757978Z[0m [34mDEBUG[0m [2mhyper::proto::h1::conn[0m[2m:[0m incoming body completed
[2m2022-01-04T04:38:51.758008Z[0m [34mDEBUG[0m [2mhyper::client::pool[0m[2m:[0m pooling idle connection for ("http", 127.0.0.1:9001)
[2m2022-01-04T04:38:51.777303Z[0m [34mDEBUG[0m [2mhyper::client::pool[0m[2m:[0m reuse idle connection for ("http", 127.0.0.1:9001)
[2m2022-01-04T04:38:51.777475Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m flushed 74 bytes
END RequestId: f2682bf7-17cd-4cc6-aa0d-e9f192a991b7
REPORT RequestId: f2682bf7-17cd-4cc6-aa0d-e9f192a991b7 Duration: 30.98 ms Billed Duration: 90 ms Memory Size: 128 MB Max Memory Used: 22 MB Init Duration: 58.53 ms
Interestingly, if I use the Test functionality in the lambda, it seems like the code is flowing correctly:
START RequestId: f2682bf7-17cd-4cc6-aa0d-e9f192a991b7 Version: $LATEST
[2m2022-01-04T04:38:51.734927Z[0m [34mDEBUG[0m [2mmusofile_api[0m[2m:[0m start!
[2m2022-01-04T04:38:51.739864Z[0m [34mDEBUG[0m [2mmusofile_api[0m[2m:[0m running on lambda!
[2m2022-01-04T04:38:51.743546Z[0m [34mDEBUG[0m [2mhyper::client::connect::http[0m[2m:[0m connecting to 127.0.0.1:9001
[2m2022-01-04T04:38:51.745134Z[0m [34mDEBUG[0m [2mhyper::client::connect::http[0m[2m:[0m connected to 127.0.0.1:9001
[2m2022-01-04T04:38:51.745407Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m flushed 74 bytes
[2m2022-01-04T04:38:51.747265Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m parsed 7 headers
[2m2022-01-04T04:38:51.747291Z[0m [34mDEBUG[0m [2mhyper::proto::h1::conn[0m[2m:[0m incoming body is chunked encoding
[2m2022-01-04T04:38:51.747350Z[0m [34mDEBUG[0m [2mhyper::proto::h1::decode[0m[2m:[0m incoming chunked header: 0x9CD (2509 bytes)
[2m2022-01-04T04:38:51.747424Z[0m [34mDEBUG[0m [2mhyper::proto::h1::conn[0m[2m:[0m incoming body completed
[2m2022-01-04T04:38:51.747492Z[0m [34mDEBUG[0m [2mhyper::client::pool[0m[2m:[0m pooling idle connection for ("http", 127.0.0.1:9001)
[2m2022-01-04T04:38:51.748952Z[0m [34mDEBUG[0m [1mrequest[0m[1m{[0m[3mmethod[0m[2m=[0mGET [3muri[0m[2m=[0mhttps://localhost/?foo=bar [3mversion[0m[2m=[0mHTTP/1.1[1m}[0m[2m:[0m [2mtower_http::trace::on_request[0m[2m:[0m started processing request
[2m2022-01-04T04:38:51.748976Z[0m [34mDEBUG[0m [1mrequest[0m[1m{[0m[3mmethod[0m[2m=[0mGET [3muri[0m[2m=[0mhttps://localhost/?foo=bar [3mversion[0m[2m=[0mHTTP/1.1[1m}[0m[2m:[0m [2mmusofile_api[0m[2m:[0m root!
[2m2022-01-04T04:38:51.748986Z[0m [34mDEBUG[0m [1mrequest[0m[1m{[0m[3mmethod[0m[2m=[0mGET [3muri[0m[2m=[0mhttps://localhost/?foo=bar [3mversion[0m[2m=[0mHTTP/1.1[1m}[0m[2m:[0m [2mtower_http::trace::on_response[0m[2m:[0m finished processing request [3mlatency[0m[2m=[0m0 ms [3mstatus[0m[2m=[0m200
[2m2022-01-04T04:38:51.749018Z[0m [34mDEBUG[0m [2mhyper::client::pool[0m[2m:[0m reuse idle connection for ("http", 127.0.0.1:9001)
[2m2022-01-04T04:38:51.749085Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m flushed 260 bytes
[2m2022-01-04T04:38:51.757924Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m parsed 3 headers
[2m2022-01-04T04:38:51.757964Z[0m [34mDEBUG[0m [2mhyper::proto::h1::conn[0m[2m:[0m incoming body is content-length (16 bytes)
[2m2022-01-04T04:38:51.757978Z[0m [34mDEBUG[0m [2mhyper::proto::h1::conn[0m[2m:[0m incoming body completed
[2m2022-01-04T04:38:51.758008Z[0m [34mDEBUG[0m [2mhyper::client::pool[0m[2m:[0m pooling idle connection for ("http", 127.0.0.1:9001)
[2m2022-01-04T04:38:51.777303Z[0m [34mDEBUG[0m [2mhyper::client::pool[0m[2m:[0m reuse idle connection for ("http", 127.0.0.1:9001)
[2m2022-01-04T04:38:51.777475Z[0m [34mDEBUG[0m [2mhyper::proto::h1::io[0m[2m:[0m flushed 74 bytes
END RequestId: f2682bf7-17cd-4cc6-aa0d-e9f192a991b7
REPORT RequestId: f2682bf7-17cd-4cc6-aa0d-e9f192a991b7 Duration: 30.98 ms Billed Duration: 90 ms Memory Size: 128 MB Max Memory Used: 22 MB Init Duration: 58.53 ms
Any ideas? I think I've followed the instructions well and have only added some logging to the code.
Hi, I'm trying to get the example application working with axum (0.3.4, although I've tried with the latest as well). I'm use CodeBuild using the same buildspec.yml file recommended, and everything seems to be building correctly. I push the build to the lambda and then create the API Gateway HTTP proxy as recommended. When I try to hit the generated endpoint, the response is:
API Gateway Logs:
Interestingly, if I use the Test functionality in the lambda, it seems like the code is flowing correctly:
Any ideas? I think I've followed the instructions well and have only added some logging to the code.
Thanks!