Hi, I have deployed n8n to AWS AppRunner. Everything works fine unless the service restarts (which happens often, as the app runner stops the service on idle to save money).
Unfortunately, App Runner does not support any persistent storage, like EFS.
That means the ./n8n is empty on every start, and the n8n deployment ID is changing.
And my free licence is not working as my fingerprint is changing.
Is it possible to move those data to the database? That will allow n8n to run with no persistent storage available, which is a good thing regarding 12-factor app.
Or use some other storage for secrets, like parameter store or s3.
you can set the envs in the AppRuner for n8n to use the external database plus set the encryption key with N8N_ENCRYPTION_KEY env to be able to encrypt and decrypt the data within the database.
App Runner does not support websocket connection as it works on top of API Gateway.
WebSocket is also required for the workflow editor.
Another issue is that services in Apprunner are suspended when no API requirements are coming. This means that my workflows will not be executed by n8n, and service will be suspended.
So, the easy and cheap solution AppRunner is not suitable for n8n.
The other options are:
ECS + ALB (as API gateway options do not work), but it is hard for people who are not experts in AWS