AWS ECS image vs. EKS Image

Is there a separate image for ECS – I see in the docs that there is a EKS-specific image.

hello @SaintPatrick
For ECS you can use the regular docker image

@SaintPatrick what’s the url for the docs? sounds like something that we need to update.

All n8n container deployments, irrespective of the container runtime, should use the regular docker image.

1 Like

Here you go: Amazon Web Services | n8n Docs

Thank you.
Right now I’m running n8n with docker on top of EC2 but I want to get it with ECS (I’m a glutton for punishment).

For those of you who are new like me – it looks like to get this to work you need to create a local n8n Docker image and then push that up to ECS. Then you can connect your ECS container to this image. (You can’t "login to the ECS container and roll docker as yo would via the linux command line).

Note that the above advice is from a newbie as well, so if I messed anything up please do feel free to correct me.

Generally, yes. You will need CodeBuild to create a dockerfile with the n8n spec and commands to store in the ECR. Then you can use the ECS with the container from the ECR

Here are the steps so far (work in progress).

  1. Install the AWS CLI. (this helped for getting auth: (How to Setup Your Development Environment for AWS | Module 3)

  2. Create an ECS container and a ECR custom repo.

Here’s where it get tricky (for me) but here’s what I did next (about to see if I can get the container to run)

  1. install docker desktop

  2. pull the docker image for n8n to local

  3. go to ECR and do this: Creating a private repository - Amazon ECR

  4. then do this: Pushing a Docker image - Amazon ECR. (you’ll get your own list of push instructions).

  5. ** the auth comand will fail:

"docker push

so you need to add the profile parameter so you can login with the CLI profile you created in step 1.

`aws ecr get-login-password --profile $localadminprofile | docker login --username AWS --password-stdin $pass

So it’s now pushed to AWS and let’s see if I can make this thing work!


Update – I can’t get the cluster up and running (getting the circuit breaker) so I’m troubleshooting. Will update here as I make progress.

If you are looking for a reference architecture on how to deploy to ECS, I have this repo for easy deployments to ECS+Fargate.

1 Like

Will check it out. Thank you!!!

Thank you. I had a chance to check it out!

  1. Why did you use yarn instead of npm?
  2. And where can we find the options for the command?
 command: ['n8n', 'start', '--tunnel'],
  1. and for the enthronement variables - is there a list of possible options?
 environment: {
        DB_TYPE: 'postgresdb',
  1. Lastly, if I screw up a variable, how do you get back into edit it?

Thank so much!!! My goal is to document this for everyone else once I figure it out!

Making more progress re: ECS/Fargate.

Once we’ve created the cluster, I go to create the task.
So far so good.

Where I’m stuck is how to get the environment variables (the .env file in the docs) into the container and to then to run the n8n setup

Do I need to create a local docker file that’s preconfigured with my .env file and then push that to ECR as a private repo to use as a task with the ECS cluster?

Just not sure what the proper steps are.
Thanks for any advice!

No, you define ENVs in the task definition in ECS. From ECR you only need an image.