Troubleshooting 404 Issues Connecting Next.js to Node.js on AWS Fargate

Deploying Dockerized Next.js and Node.js services on AWS Fargate results in unexpected 404 errors during API communication despite ALB settings.

const express = require('express');
const serverApp = express();
serverApp.get('/greet', (req, res) => res.send('Hello!'));
serverApp.listen(9090);

How can the network configuration be fixed?

hey, have u tried double-checking the target group port mapping? sometimes a small misconfig can lead to that pesky 404 error. also curious if the ALb listeners are fully aligned with your service port. anyone experimenting with slight healthcheck tweaks?

hey, check your secuirty groups and actual listener rules too. i saw a similar 404 error when the path rewrite was off in ALB. might be worth double checking the forwarding path for api calls