Nov. 18, 2023, 5:02 p.m.

Deploying Keycloak on ECS is technically pretty simple. Create a task definition and click the deploy button. There is no third step. But things are never as easy as they should be.

ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: URL format error; must be "jdbc:h2:{ {.|mem:}[name] | [file:]fileName | {tcp|ssl}:[//]server[:port][,server2[:port]]/name }[;key=value...]" but is "postgres://..." [90046-214]

Knowing JDBC for a very long time I was fairly certain the value Keycloak complaining about actually being a valid JDBC URL.

If you follow the documentation you see a custom build step. As I was still in the proof of concept phase I did not bother as I did not care about health, metrics or token exchange features. What this step also seems to enable is PostgreSQL support. Something I am still not 100% convinced the documentation conveys properly.

Starting your container with --optimized without the build step results in the above error. Which means you either have to run a build or drop the parameter. I am not going to lie, this one took me some time...

posted on Nov. 18, 2023, 5:02 p.m. in TIL, infrastructure