I'm trying to deploy and configure N8N in my AWS account. Now, I'm facing two challenges since but it was somehow tricky to run and configure its Docker image. However, I'll focus on the greatest one, I can reach the website via its IP:
However, I cannot reach it by the domain I configured that is linked to my Application Load Balancer via the Route 53:
And I know the domain is working fine since I got issued a certificate:
This is the Task Definition JSON, you will need an EFS to configure it:
{
"family": "n8n",
"containerDefinitions": [
{
"name": "n8n",
"image": "n8nio/n8n:latest",
"cpu": 0,
"portMappings": [
{
"name": "n8n-80-tcp",
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp",
"appProtocol": "http"
},
{
"name": "n8n-5678-tcp",
"containerPort": 5678,
"hostPort": 5678,
"protocol": "tcp"
},
{
"name": "n8n-443-tcp",
"containerPort": 443,
"hostPort": 443,
"protocol": "tcp"
}
],
"essential": true,
"environment": [],
"environmentFiles": [],
"mountPoints": [
{
"sourceVolume": "n8n_data",
"containerPath": "/data",
"readOnly": false
}
],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-create-group": "true",
"awslogs-group": "/ecs/n8n",
"awslogs-region": "eu-west-1",
"awslogs-stream-prefix": "ecs"
},
"secretOptions": []
},
"systemControls": []
}
],
"taskRoleArn": "arn:aws:iam::YOUR_ID:role/ecsTaskExecutionRole",
"executionRoleArn": "arn:aws:iam::YOUR_ID:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"volumes": [
{
"name": "n8n_data",
"efsVolumeConfiguration": {
"fileSystemId": "fs-YOUR_EFS",
"rootDirectory": "/db"
}
}
],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "256",
"memory": "2048",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
}
}
As you can see the issue is quite strange since I cannot reach the URL I configured in Route 53 that is an alias to my ALB that is the same that is running my ECS Service. Oddly, I can reach the task IP without any issues as I showed before.
These are some pictures of my current configuration:
ALB:
Security Group:
Target Group:
Service configuration:
ECS Service:
Any idea what I could be doing wrong?