<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Haonan Yu on Medium]]></title>
        <description><![CDATA[Stories by Haonan Yu on Medium]]></description>
        <link>https://medium.com/@travisyu?source=rss-96cb2259c56e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4OKzl25JgL-Du2I0NpWphA.jpeg</url>
            <title>Stories by Haonan Yu on Medium</title>
            <link>https://medium.com/@travisyu?source=rss-96cb2259c56e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 11:06:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@travisyu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Self-Hosting ZITADEL on AWS ECS Fargate: A Practical Minimum Working Setup]]></title>
            <link>https://medium.com/@travisyu/self-hosting-zitadel-on-aws-ecs-fargate-a-practical-minimum-working-setup-97100e766fdf?source=rss-96cb2259c56e------2</link>
            <guid isPermaLink="false">https://medium.com/p/97100e766fdf</guid>
            <category><![CDATA[idp]]></category>
            <category><![CDATA[zitadel]]></category>
            <category><![CDATA[aws-ecs]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Haonan Yu]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 10:23:33 GMT</pubDate>
            <atom:updated>2026-11-05T10:23:33.999Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How to handle bootstrapping, one-time credentials, service dependencies, and routing when Kubernetes is not part of your stack.</em></p><p>ZITADEL provides good documentation for self-hosting.</p><p>For local environments, Docker Compose is the obvious option. For Kubernetes, there is an official Helm chart.</p><p>But what if your platform runs on AWS ECS Fargate?</p><p>There is no Kubernetes control plane. No Jobs. No Helm lifecycle. No init containers in the Kubernetes sense.</p><p>You get ECS task definitions, container dependencies, task volumes, IAM roles, target groups, and health checks.</p><p>That sounds straightforward until you hit one particular problem:</p><p><strong>ZITADEL generates some of the credentials it needs only during the first successful startup, and writes them to local files.</strong></p><p>On Fargate, local storage belongs to the task.</p><p>Replace the task, and that filesystem disappears.</p><p>So deploying ZITADEL on ECS is not simply a matter of translating a Docker Compose file into an ECS task definition.</p><p>The interesting part is managing the application lifecycle around that first startup.</p><p><strong>The architecture</strong></p><p>At a high level, we need two application components:</p><ul><li><strong>ZITADEL Core</strong> — the API and OIDC server, backed by PostgreSQL</li><li><strong>Login v2</strong> — the hosted login UI, which communicates with Core</li></ul><p>The public request flow looks roughly like this:</p><pre>Internet<br>                        |<br>                        v<br>                 +-------------+<br>                 |     ALB     |<br>                 +------+------+<br>                        |<br>              +---------+---------+<br>              |                   |<br>       /ui/v2/login/*            /*<br>              |                   |<br>              v                   v<br>      +---------------+   +---------------+<br>      | ZITADEL Login |   | ZITADEL Core  |<br>      |  ECS Service  |--&gt;|  ECS Service  |<br>      +---------------+   +-------+-------+<br>                                  |<br>                                  v<br>                           +-------------+<br>                           | PostgreSQL  |<br>                           +-------------+</pre><p>The networking is not particularly unusual.</p><p>The real challenge is what happens during initialization.</p><p><strong>The bootstrap problem</strong></p><p>ZITADEL’s start-from-init command initializes the first instance.</p><p>During that process, it generates credentials including Personal Access Tokens used for administrative access and communication between Login and Core.</p><p>The important detail is that these credentials are created only when first-instance initialization actually happens.</p><p>And they are written to files.</p><p>Conceptually:</p><pre>ZITADEL starts<br>      |<br>      v<br>a new instance?<br>      |<br>      +---- No ----&gt; Start normally<br>      |<br>      +---- Yes<br>             |<br>             v<br>      Initialize database<br>             |<br>             v<br>      Generate credentials<br>             |<br>             v<br>        Write PAT files</pre><p>That is perfectly reasonable on a traditional server.</p><p>On Fargate, it creates a lifecycle problem.</p><p>A task’s local filesystem is temporary. If the generated credential only exists inside one task and that task is replaced, the file is gone.</p><p>So the real problem becomes:</p><p><strong>How do we capture a credential that is generated inside a container, exactly once, during startup, and move it into durable infrastructure?</strong></p><p>The solution is to treat the ECS task as a small workflow.</p><p><strong>What you need</strong></p><p>I will assume you already understand the AWS basics involved here:</p><ul><li>VPCs and subnets</li><li>ECS and Fargate</li><li>ECS task definitions</li><li>Application Load Balancers</li><li>IAM task roles</li><li>Security groups</li></ul><p>You will also need:</p><ul><li>private subnets for the ECS services</li><li>public connectivity for the load balancer</li><li>a PostgreSQL-compatible managed database</li><li>an ECS cluster</li><li>a public DNS name</li><li>a TLS certificate</li><li>a durable secret store such as AWS Systems Manager Parameter Store or AWS Secrets Manager</li></ul><p>It is also worth reading ZITADEL’s official Docker deployment documentation before starting.</p><p>The approach here does not replace ZITADEL’s documented container behavior.</p><p>It adapts that behavior to ECS.</p><p><strong>Step 1: Provision PostgreSQL</strong></p><p>The database layer itself is straightforward.</p><p>Use a managed PostgreSQL-compatible database that your ECS tasks can reach from the private subnets.</p><p>One thing is worth checking early:</p><p><strong>Does your database require certificate-verified TLS?</strong></p><p>For example, if the connection uses:</p><pre>sslmode=verify-full</pre><p>then ZITADEL also needs access to the appropriate CA certificate as a file.</p><p>That becomes relevant in the next step.</p><p><strong>Step 2: Make the Core task a small workflow</strong></p><p>Instead of running only one container, define three containers inside the Core task:</p><pre>init-shared<br>     |<br>     v<br>zitadel-core<br>     |<br>     v<br>bootstrap</pre><p>All three containers share a task-scoped volume.</p><p>For example:</p><pre>volumes = [<br>  {<br>    name = &quot;shared&quot;<br>  }<br>]</pre><p>Each container has exactly one responsibility.</p><p><strong>Container 1: Prepare the shared volume</strong></p><p>The first container runs briefly and exits.</p><p>Its job is to prepare /shared before ZITADEL starts.</p><p>For example:</p><pre>container &quot;init-shared&quot; {<br>  image     = &quot;&lt;minimal-shell-image&gt;&quot;<br>  essential = false</pre><pre>  command = [<br>    &quot;sh&quot;,<br>    &quot;-c&quot;,<br>    &quot;mkdir -p /shared &amp;&amp; chmod 777 /shared&quot;<br>  ]</pre><pre>  mountPoints = [<br>    {<br>      sourceVolume  = &quot;shared&quot;<br>      containerPath = &quot;/shared&quot;<br>    }<br>  ]<br>}</pre><p>The permissions matter.</p><p>Containers inside the same ECS task do not necessarily run as the same Unix user.</p><p>Without suitable permissions, one container may successfully mount the volume while another cannot write to it.</p><p>The result is often nothing more exciting than:</p><pre>permission denied</pre><p>buried somewhere in the logs.</p><p>For a small task-local bootstrap directory, making the shared path writable keeps the mechanism simple.</p><p>If your PostgreSQL connection requires a CA bundle, this initialization container is also a convenient place to prepare it.</p><p>The container can retrieve the certificate from your secret or parameter store and write it into the shared volume:</p><pre>/shared/postgres-ca.pem</pre><p>Core can then reference that file when connecting to PostgreSQL.</p><p>This also avoids requiring the application task to download certificates from the public internet during startup.</p><p><strong>Step 3: Configure ZITADEL Core</strong></p><p>Most ZITADEL settings map cleanly to environment variables.</p><p>A few are especially important for this deployment.</p><p><strong>ZITADEL_MASTERKEY</strong></p><p>This protects encrypted data generated internally by ZITADEL.</p><p>It must come from a secure store and remain stable across deployments.</p><p>Changing or losing it can make existing encrypted data unreadable.</p><p><strong>ZITADEL_EXTERNALDOMAIN and </strong><strong>ZITADEL_EXTERNALSECURE</strong></p><p>These define the external identity of the ZITADEL instance.</p><p>For an identity provider, this is not merely cosmetic configuration.</p><p>The external URL becomes part of the issuer identity used in OIDC.</p><p>If a token contains:</p><pre>iss = https://auth.example.com</pre><p>but the relying application expects another issuer, validation will fail.</p><p><strong>ZITADEL_FIRSTINSTANCE_PATPATH</strong></p><p>This controls where the first-instance administrative PAT is written.</p><p><strong>ZITADEL_FIRSTINSTANCE_LOGINCLIENTPATPATH</strong></p><p>This controls where the Login client’s PAT is written.</p><p>These two settings are the key to the bootstrap approach.</p><p>Instead of allowing ZITADEL to write the files somewhere inside its own container filesystem, point both paths to the shared task volume.</p><p>For example:</p><pre>container &quot;zitadel-core&quot; {<br>  command = [<br>    &quot;start-from-init&quot;,<br>    &quot;--masterkeyFromEnv&quot;<br>  ]</pre><pre>  environment = [<br>    {<br>      name  = &quot;ZITADEL_FIRSTINSTANCE_PATPATH&quot;<br>      value = &quot;/shared/admin-pat&quot;<br>    },<br>    {<br>      name  = &quot;ZITADEL_FIRSTINSTANCE_LOGINCLIENTPATPATH&quot;<br>      value = &quot;/shared/login-pat&quot;<br>    },<br>    {<br>      name  = &quot;ZITADEL_EXTERNALDOMAIN&quot;<br>      value = &quot;auth.example.com&quot;<br>    },<br>    {<br>      name  = &quot;ZITADEL_EXTERNALSECURE&quot;<br>      value = &quot;true&quot;<br>    }<br>  ]</pre><pre>  secrets = [<br>    {<br>      name = &quot;ZITADEL_MASTERKEY&quot;<br>      from = &quot;&lt;master-key-secret&gt;&quot;<br>    }<br>  ]</pre><pre>  mountPoints = [<br>    {<br>      sourceVolume  = &quot;shared&quot;<br>      containerPath = &quot;/shared&quot;<br>    }<br>  ]</pre><pre>  dependsOn = [<br>    {<br>      containerName = &quot;init-shared&quot;<br>      condition     = &quot;COMPLETE&quot;<br>    }<br>  ]<br>}</pre><p>The lifecycle now looks like this:</p><pre>init-shared completes<br>        |<br>        v<br>ZITADEL Core starts<br>        |<br>        v<br>Database is initialized<br>        |<br>        v<br>PAT files appear in /shared</pre><p>At this point, however, the credentials still exist only on ephemeral storage.</p><p>We need one more step.</p><p><strong>Step 4: Capture the credentials with a bootstrap container</strong></p><p>The third container starts after Core is ready.</p><p>Its responsibility is very small:</p><ol><li>Check whether the generated files exist.</li><li>Read their contents.</li><li>Normalize the values.</li><li>Write them into durable secret storage.</li><li>Exit.</li></ol><p>Conceptually:</p><pre>container &quot;bootstrap&quot; {<br>  essential  = false<br>  entryPoint = [&quot;sh&quot;, &quot;-c&quot;]</pre><pre>  command = [&lt;&lt;-EOT<br>    if [ -s /shared/admin-pat ]; then<br>      ADMIN_PAT=&quot;$(tr -d &#39;[:space:]&#39; &lt; /shared/admin-pat)&quot;</pre><pre>      if [ -n &quot;$ADMIN_PAT&quot; ]; then<br>        put-parameter \<br>          --name &lt;admin-pat-param&gt; \<br>          --value &quot;$ADMIN_PAT&quot; \<br>          --overwrite<br>      fi<br>    fi</pre><pre>    if [ -s /shared/login-pat ]; then<br>      LOGIN_PAT=&quot;$(tr -d &#39;[:space:]&#39; &lt; /shared/login-pat)&quot;</pre><pre>      if [ -n &quot;$LOGIN_PAT&quot; ]; then<br>        put-parameter \<br>          --name &lt;login-pat-param&gt; \<br>          --value &quot;$LOGIN_PAT&quot; \<br>          --overwrite<br>      fi<br>    fi<br>  EOT<br>  ]</pre><pre>  mountPoints = [<br>    {<br>      sourceVolume  = &quot;shared&quot;<br>      containerPath = &quot;/shared&quot;<br>    }<br>  ]</pre><pre>  dependsOn = [<br>    {<br>      containerName = &quot;zitadel-core&quot;<br>      condition     = &quot;HEALTHY&quot;<br>    }<br>  ]<br>}</pre><p>The exact CLI or SDK used to write the values is not the important part.</p><p>The pattern is:</p><pre>ZITADEL<br>    |<br>    | generates<br>    v<br>PAT file<br>    |<br>    | shared task volume<br>    v<br>Bootstrap container<br>    |<br>    | IAM-authorized write<br>    v<br>Durable secret store</pre><p>Once the value has been copied into the secret store, the Fargate task is no longer the only place where it exists.</p><p><strong>Why the tiny shell checks matter</strong></p><p>There are several small details in the bootstrap script that are easy to overlook.</p><p>They are worth keeping.</p><p>[ -s file ] checks that the file both exists and contains data.</p><p>That matters because the PAT files are expected only during true first-instance initialization.</p><p>When a later ECS task starts, its task-scoped volume is empty again.</p><p>That is normal.</p><p>So this:</p><pre>if [ -s /shared/login-pat ]; then</pre><p>allows the bootstrap container to quietly do nothing after the original initialization.</p><p>There is also another subtle issue: whitespace.</p><p>Credential files often end with a newline.</p><p>That newline looks harmless when you inspect the file manually, but if it is stored literally, it becomes part of the token.</p><p>A bearer token containing an invisible trailing newline can cause authentication requests to fail in a way that is surprisingly difficult to spot.</p><p>So normalize the value before storing it:</p><pre>tr -d &#39;[:space:]&#39;</pre><p>Then check again that the result is not empty:</p><pre>if [ -n &quot;$LOGIN_PAT&quot; ]; then</pre><p>That extra guard prevents a malformed or empty file from overwriting a known-good credential.</p><p><strong>Use a placeholder before the first deployment</strong></p><p>There is still one infrastructure-as-code problem to solve.</p><p>The parameter needs to exist before the ECS task starts, but its real value does not exist until ZITADEL initializes itself.</p><p>A simple solution is to create it with an obvious placeholder:</p><pre>pending-bootstrap</pre><p>The lifecycle becomes:</p><pre>Infrastructure as Code<br>        |<br>        v<br>pending-bootstrap<br>        |<br>        | first successful initialization<br>        v<br>real generated PAT</pre><p>Your bootstrap container replaces the placeholder with the generated value.</p><p>Your infrastructure tool should then be configured so it does not try to replace the runtime value with the placeholder during every future deployment.</p><p>This creates a useful ownership boundary:</p><p><strong>Infrastructure as Code owns the parameter itself.</strong></p><p><strong>The bootstrap process owns its runtime-generated value.</strong></p><p><strong>Keep the bootstrap permissions narrow</strong></p><p>The bootstrap container does not need broad access to your secret store.</p><p>Its task role should be able to modify only the specific parameters involved in the bootstrap process.</p><p>Conceptually:</p><pre>Allow:<br>  zitadel/admin-pat<br>  zitadel/login-pat</pre><pre>Nothing else.</pre><p>The sidecar exists only to move two values from ephemeral storage into durable storage.</p><p>Its IAM permissions should reflect that responsibility.</p><p><strong>Checkpoint: stop here and verify Core</strong></p><p>Before deploying Login, verify the Core service independently.</p><p>You want to confirm that:</p><ul><li>init-shared completed successfully</li><li>ZITADEL Core is healthy</li><li>the database initialization succeeded</li><li>the bootstrap container completed</li><li>the admin PAT is no longer pending-bootstrap</li><li>the login PAT is no longer pending-bootstrap</li></ul><p>Do not move on until this works.</p><p>Debugging one lifecycle at a time is much easier than debugging Core, Login, networking, DNS, database connectivity, load balancing, and credentials simultaneously.</p><p><strong>Step 5: Do not start Login too early</strong></p><p>The Login application needs its PAT to authenticate to Core.</p><p>It is tempting to simply inject the parameter into the container:</p><pre>secrets = [<br>  {<br>    name = &quot;ZITADEL_SERVICE_USER_TOKEN&quot;<br>    from = &quot;&lt;login-pat-param&gt;&quot;<br>  }<br>]</pre><p>But there is a race condition during the first deployment.</p><p>Initially, that parameter contains:</p><pre>pending-bootstrap</pre><p>If Login starts before Core finishes initialization, the container receives the placeholder instead of the real PAT.</p><p>Everything may technically be running, but every request from Login to Core will fail authentication.</p><p>So the Login task also needs a small initialization step.</p><p><strong>Step 6: Wait until the credential is ready</strong></p><p>The Login task can contain two containers:</p><pre>wait-for-pat<br>     |<br>     v<br>zitadel-login</pre><p>The first one waits until the parameter no longer contains the placeholder.</p><p>For example:</p><pre>container &quot;wait-for-pat&quot; {<br>  essential = false</pre><pre>  command = [<br>    &quot;sh&quot;,<br>    &quot;-c&quot;,<br>    &quot;until [ \&quot;$(get-parameter &lt;login-pat-param&gt;)\&quot; != \&quot;pending-bootstrap\&quot; ]; do sleep 5; done&quot;<br>  ]<br>}</pre><p>The actual Login container then depends on that container completing successfully:</p><pre>container &quot;zitadel-login&quot; {<br>  environment = [<br>    {<br>      name  = &quot;ZITADEL_API_URL&quot;<br>      value = &quot;http://zitadel-core.&lt;internal-namespace&gt;:8080&quot;<br>    }<br>  ]</pre><pre>  secrets = [<br>    {<br>      name = &quot;ZITADEL_SERVICE_USER_TOKEN&quot;<br>      from = &quot;&lt;login-pat-param&gt;&quot;<br>    }<br>  ]</pre><pre>  dependsOn = [<br>    {<br>      containerName = &quot;wait-for-pat&quot;<br>      condition     = &quot;SUCCESS&quot;<br>    }<br>  ]<br>}</pre><p>Now the complete startup sequence looks like this:</p><pre>Core task</pre><pre>init-shared<br>     |<br>     v<br>zitadel-core<br>     |<br>     v<br>bootstrap<br>     |<br>     v<br>PAT stored durably<br></pre><pre>Login task</pre><pre>wait-for-pat<br>     |<br>     | real PAT detected<br>     v<br>zitadel-login</pre><p>The important property here is determinism.</p><p>Login cannot start with a credential that does not exist yet.</p><p><strong>Keep Login-to-Core traffic internal</strong></p><p>Login needs to communicate with Core.</p><p>There is usually no reason for that request to travel through the public load balancer.</p><p>Use whichever internal service-discovery mechanism already fits your ECS environment:</p><ul><li>AWS Cloud Map</li><li>ECS Service Connect</li><li>internal DNS</li></ul><p>The flow should look more like this:</p><pre>ZITADEL Login<br>      |<br>      | private VPC traffic<br>      v<br>ZITADEL Core</pre><p>Keeping this traffic internal avoids unnecessary routing dependencies and makes the architecture easier to reason about.</p><p><strong>Checkpoint: verify Login</strong></p><p>Once Login is deployed, check that:</p><ul><li>wait-for-pat exits successfully</li><li>the Login container starts</li><li>the Login health check succeeds</li><li>Login can connect to Core</li><li>Core accepts the Login credential</li></ul><p>It is useful to distinguish two common failures here.</p><p>A connection error usually points toward networking or service discovery.</p><p>A 401 Unauthorized usually points toward credentials or authentication configuration.</p><p>Those are different problems and should be debugged separately.</p><p><strong>Step 7: Put an ALB in front</strong></p><p>Once both services work internally, exposing ZITADEL is relatively simple.</p><p>A single internet-facing Application Load Balancer can route requests based on path.</p><p>For example:</p><pre>listener_rule &quot;login_ui&quot; {<br>  priority = 20<br>  path     = &quot;/ui/v2/login/*&quot;</pre><pre>  action = forward(target_group.zitadel_login)<br>}</pre><pre>listener_rule &quot;default&quot; {<br>  priority = 30<br>  path     = &quot;/*&quot;</pre><pre>  action = forward(target_group.zitadel_core)<br>}</pre><p>The resulting routing is roughly:</p><pre>https://auth.example.com/ui/v2/login/*<br>                |<br>                v<br>          Login service<br></pre><pre>https://auth.example.com/*<br>                |<br>                v<br>           Core service</pre><p>Your public DNS record should point to the load balancer.</p><p>The hostname should also match the value configured in ZITADEL_EXTERNALDOMAIN.</p><p>That consistency is especially important because this is an OIDC identity provider.</p><p><strong>Keep the network boundaries simple</strong></p><p>The security-group model can remain quite small.</p><pre>Internet<br>   |<br>   | HTTPS<br>   v<br>ALB<br>   |<br>   +----&gt; ZITADEL Core<br>   |<br>   +----&gt; ZITADEL Login<br></pre><pre>ZITADEL Login<br>   |<br>   +----&gt; ZITADEL Core<br></pre><pre>ZITADEL Core<br>   |<br>   +----&gt; PostgreSQL</pre><p>The useful rule of thumb is:</p><ul><li>the internet talks only to the ALB</li><li>the ALB talks to Core and Login</li><li>Login talks to Core</li><li>Core talks to PostgreSQL</li><li>Login does not need direct database access</li></ul><p>The fewer unnecessary paths you introduce, the easier both security review and debugging become.</p><p><strong>Final checkpoint: test a real login</strong></p><p>Infrastructure health checks are useful, but they do not prove that the complete authentication flow works.</p><p>Open the public hostname and perform an actual login.</p><p>You want the entire chain to succeed:</p><pre>Browser<br>   |<br>   v<br>ALB<br>   |<br>   v<br>Login<br>   |<br>   v<br>Core<br>   |<br>   v<br>PostgreSQL<br>   |<br>   v<br>OIDC flow completes</pre><p>Once that works, you have a minimal functional ZITADEL deployment on ECS Fargate.</p><p><strong>The more interesting pattern behind this setup</strong></p><p>The useful part of this architecture is not actually specific to ZITADEL.</p><p>The application behaves like this:</p><pre>Application generates runtime state<br>              |<br>              v<br>       writes local file</pre><p>But the infrastructure needs this:</p><pre>Runtime state<br>      |<br>      v<br>Durable managed service</pre><p>The application itself does not know how to bridge those two worlds.</p><p>So another container does it:</p><pre>Application<br>    |<br>    v<br>Shared volume<br>    |<br>    v<br>Sidecar<br>    |<br>    v<br>Cloud-managed storage</pre><p>That is a useful pattern whenever software generates certificates, credentials, configuration files, or other initialization artifacts only during startup.</p><p>A short-lived sidecar can act as the adapter between the application’s lifecycle and the cloud platform.</p><p><strong>A note on production readiness</strong></p><p>This is intentionally a <strong>minimum working setup</strong>, not a complete production architecture.</p><p>A production deployment would usually add further hardening around areas such as credential rotation, API exposure, observability, backup and recovery, availability, deployment strategy, and network isolation.</p><p>Those concerns are important, but they are separate from the core problem this article is trying to solve: getting ZITADEL’s bootstrap lifecycle to work reliably on ECS Fargate.</p><p><strong>The main lesson</strong></p><p>Running software on ECS instead of Kubernetes is rarely difficult because ECS cannot run the containers.</p><p>Running the containers is usually the easy part.</p><p>The difficult part is translating the lifecycle assumptions made by the original deployment model.</p><p>In this case, ZITADEL expects to generate credentials during initialization and leave them on disk.</p><p>On Kubernetes, orchestration primitives can hide much of that complexity.</p><p>On Fargate, we need to make the lifecycle explicit:</p><pre>prepare<br>   |<br>   v<br>initialize<br>   |<br>   v<br>capture<br>   |<br>   v<br>persist<br>   |<br>   v<br>wait<br>   |<br>   v<br>consume</pre><p>Once you model the deployment that way, the architecture becomes much easier to reason about.</p><p>The final system is still relatively small:</p><ul><li>two ECS services</li><li>a few short-lived helper containers</li><li>one shared task volume</li><li>PostgreSQL</li><li>a durable secret store</li><li>internal service discovery</li><li>an Application Load Balancer</li></ul><p>No Kubernetes cluster required.</p><p>And, more importantly, no critical credential disappears the next time Fargate replaces a task.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97100e766fdf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>