<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: László Tóth</title>
    <description>The latest articles on Forem by László Tóth (@tothl74).</description>
    <link>https://forem.com/tothl74</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3386895%2Fac9d100c-5174-41d4-b891-482756559761.jpg</url>
      <title>Forem: László Tóth</title>
      <link>https://forem.com/tothl74</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tothl74"/>
    <language>en</language>
    <item>
      <title>Scaling Carmen Cloud: From Containers to Lambda SnapStart</title>
      <dc:creator>László Tóth</dc:creator>
      <pubDate>Mon, 15 Sep 2025 14:40:59 +0000</pubDate>
      <link>https://forem.com/tothl74/scaling-carmen-cloud-from-containers-to-lambda-snapstart-57n2</link>
      <guid>https://forem.com/tothl74/scaling-carmen-cloud-from-containers-to-lambda-snapstart-57n2</guid>
      <description>&lt;p&gt;At Adaptive Recognition, we run &lt;strong&gt;Carmen Cloud&lt;/strong&gt; for ANPR &amp;amp; MMR recognition. Our neural-network engines have been evolving for 30+ years – for us, "AI" is business as usual.  &lt;/p&gt;

&lt;p&gt;The real challenge: &lt;strong&gt;scaling&lt;/strong&gt;. On ECS Fargate + EC2, startup + engine init took ~60 seconds. Not acceptable.  &lt;/p&gt;




&lt;h2&gt;
  
  
  The Fargate/ECS Approach
&lt;/h2&gt;

&lt;p&gt;Our first deployment ran on &lt;strong&gt;ECS Fargate&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;predictable workloads&lt;/strong&gt;, this is often good enough. You can define scaling rules or even schedule tasks so that capacity matches traffic (e.g. higher during business hours, lower at night).  &lt;/p&gt;

&lt;p&gt;But our workload is the opposite of predictable. Recognition requests come from &lt;strong&gt;many customers, across multiple regions&lt;/strong&gt;, at almost random times. Bursts can hit at 2 a.m. from one continent and spike again an hour later from another.  &lt;/p&gt;

&lt;p&gt;With that traffic pattern, Fargate's trade-offs became painful:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scale-up lag:&lt;/strong&gt; EC2 boot + engine init ~60s.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Idle cost:&lt;/strong&gt; keeping containers pre-warmed all the time.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ops overhead:&lt;/strong&gt; building/pushing images, patching, managing ECR.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's when we started looking for a new approach.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Early Adoption of SnapStart
&lt;/h2&gt;

&lt;p&gt;When &lt;strong&gt;AWS Lambda SnapStart (Java 21)&lt;/strong&gt; was released, we migrated &lt;strong&gt;immediately&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;That made us among the first to see just how well it scales – and how much money it saves.  &lt;/p&gt;

&lt;p&gt;Years later, those benefits are still holding true.  &lt;/p&gt;




&lt;h2&gt;
  
  
  The Shift: API Gateway + Lambda SnapStart + CRaC
&lt;/h2&gt;

&lt;p&gt;Key trick: &lt;strong&gt;CRaC (Coordinated Restore at Checkpoint)&lt;/strong&gt; pre-initializes our engines at checkpoint time.  &lt;/p&gt;

&lt;p&gt;But SnapStart has a serious limitation: it doesn't support &lt;strong&gt;&amp;gt;512 MB of ephemeral storage, nor EFS&lt;/strong&gt;. Our recognition engines for a single region (EUR, NAM) are much larger than that.  &lt;/p&gt;

&lt;p&gt;So we built a &lt;strong&gt;staged engine loading mechanism&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;During handler initialization, we download a batch of engine data from S3.
&lt;/li&gt;
&lt;li&gt;Engines are initialized into memory (via our &lt;code&gt;VehicleHandler&lt;/code&gt; class).
&lt;/li&gt;
&lt;li&gt;Temporary &lt;code&gt;.dat&lt;/code&gt; files are deleted to free up space.
&lt;/li&gt;
&lt;li&gt;The next batch is downloaded and initialized.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This keeps us under the 512 MB limit while still giving us full coverage. Initialization is more complex, but the scalability and cost benefits make it well worth it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;com.amazonaws.services.lambda.runtime.Context&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;com.amazonaws.services.lambda.runtime.RequestHandler&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;VehicleHandler&lt;/span&gt; &lt;span class="kd"&gt;implements&lt;/span&gt; &lt;span class="nc"&gt;RequestHandler&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;APIGatewayProxyRequestEvent&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;APIGatewayProxyResponseEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;,&lt;/span&gt; &lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;crac&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;Resource&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Load engines in batches at checkpoint time from S3&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@Override&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;beforeCheckpoint&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;crac&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;Context&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;crac&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;Resource&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Close network connections – CRaC cannot persist them&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@Override&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;afterRestore&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;crac&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;Context&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;crac&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;Resource&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Re-open connections on restore&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;@Override&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;APIGatewayProxyResponseEvent&lt;/span&gt; &lt;span class="nf"&gt;handleRequest&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;APIGatewayProxyRequestEvent&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Context&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Process image with the chosen engine&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;APIGatewayProxyResponseEvent&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Supporting AWS Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;API Gateway&lt;/strong&gt; – entry point
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lambda (SnapStart)&lt;/strong&gt; – recognition engines
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognito&lt;/strong&gt; – user auth
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DynamoDB&lt;/strong&gt; – API keys, billing records
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SNS/EventBridge&lt;/strong&gt; – async billing + subscription events
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3, SSM, CloudFront, WAF, Route53&lt;/strong&gt; – storage, config, delivery, security
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Even heavy neural engines can scale serverless.
&lt;/li&gt;
&lt;li&gt;CRaC makes SnapStart viable by restoring pre-initialized state.
&lt;/li&gt;
&lt;li&gt;Closing &amp;amp; reopening network connections is essential.
&lt;/li&gt;
&lt;li&gt;Staged loading solves ephemeral storage/EFS limits.
&lt;/li&gt;
&lt;li&gt;Being an &lt;strong&gt;early adopter&lt;/strong&gt; of SnapStart saved us both &lt;strong&gt;time and cost&lt;/strong&gt; from day one.
&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/eIU-TlzeVBA"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;👉 More about Carmen Cloud: &lt;a href="https://carmencloud.com" rel="noopener noreferrer"&gt;carmencloud.com&lt;/a&gt;&lt;br&gt;
👉 Corporate homepage: &lt;a href="https://adaptiverecognition.com" rel="noopener noreferrer"&gt;adaptiverecognition.com&lt;/a&gt;&lt;br&gt;
👉 My side project for WordPress + Cognito login: &lt;a href="https://wpsuite.io" rel="noopener noreferrer"&gt;Gatey&lt;/a&gt;  &lt;/p&gt;

</description>
      <category>aws</category>
      <category>lambda</category>
      <category>snapstart</category>
      <category>saas</category>
    </item>
    <item>
      <title>Add Social &amp; Enterprise SSO to WordPress (Even on Static Sites) with Amazon Cognito + Gatey</title>
      <dc:creator>László Tóth</dc:creator>
      <pubDate>Sun, 14 Sep 2025 12:38:17 +0000</pubDate>
      <link>https://forem.com/tothl74/add-social-enterprise-sso-to-wordpress-even-on-static-sites-with-amazon-cognito-gatey-1ja3</link>
      <guid>https://forem.com/tothl74/add-social-enterprise-sso-to-wordpress-even-on-static-sites-with-amazon-cognito-gatey-1ja3</guid>
      <description>&lt;p&gt;WordPress was never built for OIDC or SAML. Export it as a static site to S3 + CloudFront and the built-in login system stops working completely.&lt;/p&gt;

&lt;p&gt;The fix? &lt;strong&gt;Amazon Cognito + Gatey&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure Cognito User Pools &amp;amp; Hosted UI (no client secret needed, SPA app type)&lt;/li&gt;
&lt;li&gt;Connect Social IdPs (Google, Facebook, Apple, Amazon)&lt;/li&gt;
&lt;li&gt;Add Enterprise IdPs (OIDC, SAML: Okta, Azure AD, Auth0, Ping)&lt;/li&gt;
&lt;li&gt;Wire it into WordPress with Gatey (User Pools, General, Custom Providers)&lt;/li&gt;
&lt;li&gt;(Optional) Enable IAM so authenticated users can call your AWS APIs directly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 Full guide with screenshots on &lt;a href="https://wpsuite.io/blog/social-enterprise-sso/" rel="noopener noreferrer"&gt;wpsuite.io&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Static-friendly, secure, and no secrets stored in WordPress.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>aws</category>
      <category>cognito</category>
      <category>sso</category>
    </item>
    <item>
      <title>Behind the Scenes: Building WordPress Static Site Guardian with Kiro</title>
      <dc:creator>László Tóth</dc:creator>
      <pubDate>Wed, 10 Sep 2025 12:00:00 +0000</pubDate>
      <link>https://forem.com/tothl74/behind-the-scenes-building-wordpress-static-site-guardian-with-kiro-4onh</link>
      <guid>https://forem.com/tothl74/behind-the-scenes-building-wordpress-static-site-guardian-with-kiro-4onh</guid>
      <description>&lt;p&gt;In a recent post I explained how to secure static WordPress exports on AWS with Cognito, CloudFront, and signed cookies. This is the follow-up: a look at how the project itself came together with the help of Kiro.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting point
&lt;/h2&gt;

&lt;p&gt;I'm comfortable working with AWS architecture, but I had little hands-on experience with CloudFormation. Writing a full stack by hand would have been slow and error-prone. For the hackathon I wanted to see how far I could get by asking Kiro to generate the stack for me.&lt;/p&gt;

&lt;p&gt;The initial prompt described the core idea:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;S3 bucket for the static export&lt;/li&gt;
&lt;li&gt;CloudFront with signed cookies for protection&lt;/li&gt;
&lt;li&gt;API Gateway + Lambda to issue cookies&lt;/li&gt;
&lt;li&gt;integration points for Cognito through the Gatey plugin&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first generated template wasn't perfect, but it was good enough to get the stack running within a few hours. I only needed to fix some details and adjust resource lifecycles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reverse specification
&lt;/h2&gt;

&lt;p&gt;Once the implementation was working, I asked Kiro to generate a "reverse spec" of the actual system. This produced requirements, design, and task lists that matched what I had already built. It might sound redundant, but it was valuable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it confirmed the design was consistent,&lt;/li&gt;
&lt;li&gt;it gave me a checklist of remaining tasks,&lt;/li&gt;
&lt;li&gt;and it created documentation that I could share later.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Extra features and validation
&lt;/h2&gt;

&lt;p&gt;Using the spec as a guide, I added missing pieces: cache policies, end-to-end tests, and deployment cleanup checks. I also asked Kiro to validate the system against the spec, which helped catch a few oversights.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I took away
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Kiro didn't magically solve everything, but it accelerated the boring parts - large CloudFormation scaffolds that I wasn't used to writing.&lt;/li&gt;
&lt;li&gt;Having a generated spec after the fact turned out to be a useful way to organize and document the project.&lt;/li&gt;
&lt;li&gt;With only limited CloudFormation background, I could still publish a complete SAR template in a short amount of time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're curious about the solution itself, see my earlier post: &lt;a href="https://dev.to/tothl74/static-wordpress-authentication-with-amazon-cognito-and-aws-sar-template-2j5j"&gt;Static WordPress authentication with Amazon Cognito and AWS SAR template&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>kirodotdev</category>
      <category>kiro</category>
      <category>aws</category>
      <category>wordpress</category>
    </item>
    <item>
      <title>Static WordPress Authentication with Amazon Cognito and AWS SAR Template</title>
      <dc:creator>László Tóth</dc:creator>
      <pubDate>Fri, 05 Sep 2025 10:13:32 +0000</pubDate>
      <link>https://forem.com/tothl74/static-wordpress-authentication-with-amazon-cognito-and-aws-sar-template-2j5j</link>
      <guid>https://forem.com/tothl74/static-wordpress-authentication-with-amazon-cognito-and-aws-sar-template-2j5j</guid>
      <description>&lt;p&gt;Static sites are great. They're &lt;strong&gt;fast, cheap, and secure by default&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
But if you've ever tried to add &lt;strong&gt;login or user-only content&lt;/strong&gt; to a static WordPress export… you know the pain.  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;/wp-login.php&lt;/code&gt; doesn't exist anymore. PHP is gone. And yet, users still expect a sign-in flow that feels smooth and professional.  &lt;/p&gt;

&lt;p&gt;That's exactly the challenge we faced - and here's how we solved it with &lt;strong&gt;Amazon Cognito + API Gateway + Lambda + CloudFront signed cookies&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Even Bother With Static WordPress?
&lt;/h2&gt;

&lt;p&gt;Static WordPress exports (via plugins, S3 + CloudFront, or Netlify) are becoming popular because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Speed&lt;/strong&gt;: HTML served directly from a CDN
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost&lt;/strong&gt;: no dynamic servers to manage
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security&lt;/strong&gt;: surface area is tiny
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But the trade-off is obvious: all the built-in WP authentication features vanish.  &lt;/p&gt;

&lt;p&gt;We wanted the best of both worlds: keep WordPress &lt;strong&gt;static and fast&lt;/strong&gt;, but add &lt;strong&gt;real authentication&lt;/strong&gt; powered by AWS.&lt;/p&gt;




&lt;h2&gt;
  
  
  The AWS Approach
&lt;/h2&gt;

&lt;p&gt;Instead of bending WordPress to handle login, we let AWS handle it at the edge.  &lt;/p&gt;

&lt;p&gt;Here's the high-level design:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Cognito&lt;/strong&gt; handles user sign-up, login, MFA, and tokens.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Gateway + Lambda&lt;/strong&gt; exchange Cognito tokens for &lt;strong&gt;CloudFront signed cookies&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CloudFront&lt;/strong&gt; enforces access, serving protected resources only to users with valid cookies.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No PHP callbacks, no secrets stored in WordPress. Just clean, serverless authentication.  &lt;/p&gt;




&lt;h2&gt;
  
  
  How It Feels for Users
&lt;/h2&gt;

&lt;p&gt;From the user's perspective:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They click &lt;strong&gt;Sign In&lt;/strong&gt; on the WordPress site.
&lt;/li&gt;
&lt;li&gt;They see a branded Cognito-powered login (integrated with &lt;a href="https://wordpress.org/plugins/gatey/" rel="noopener noreferrer"&gt;Gatey&lt;/a&gt; blocks).
&lt;/li&gt;
&lt;li&gt;On success, they get signed cookies behind the scenes.
&lt;/li&gt;
&lt;li&gt;CloudFront now lets them access members-only pages, media, or even entire routes.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It feels just like a "normal" site, but under the hood it's 100% serverless.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Quick Architecture Sketch
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ User ] → [ WordPress (static) ]
       ↘ Sign-In → [ Amazon Cognito ]
                    ↘ Tokens → [ API Gateway + Lambda ]
                                  ↘ Issue Signed Cookies → [ CloudFront ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CloudFront becomes the gatekeeper. If your cookies are valid, you're in. If not, you're redirected to login.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Rocks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt; - static WordPress stays lightning-fast
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security&lt;/strong&gt; - Cognito &amp;amp; signed cookies &amp;gt; old-school PHP sessions
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt; - runs natively on AWS infra
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility&lt;/strong&gt; - protect full sites or just specific routes
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And most importantly: it keeps your &lt;strong&gt;WordPress database completely out of the authentication loop&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-World Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Membership sites hosted statically
&lt;/li&gt;
&lt;li&gt;Documentation portals with role-based access
&lt;/li&gt;
&lt;li&gt;Hybrid sites where only certain routes need login
&lt;/li&gt;
&lt;li&gt;SaaS dashboards powered by WordPress as the frontend
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're already using CloudFront, this pattern feels very natural.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Full Tutorial with Code &amp;amp; Screenshots
&lt;/h2&gt;

&lt;p&gt;This post was just the overview.&lt;br&gt;&lt;br&gt;
We wrote up the &lt;strong&gt;step-by-step guide with SAR template, Lambda code, and WordPress integration&lt;/strong&gt; here:  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://wpsuite.io/blog/static-wordpress-authentication-made-simple-deploy-with-the-aws-sar-template/" rel="noopener noreferrer"&gt;Static WordPress Authentication Made Simple - Deploy with the AWS SAR Template&lt;/a&gt;  &lt;/p&gt;




&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;Static WordPress doesn't mean static functionality.&lt;br&gt;&lt;br&gt;
With Cognito + CloudFront signed cookies, you can have &lt;strong&gt;speed, security, and scalability&lt;/strong&gt; - without giving up authentication.  &lt;/p&gt;

&lt;p&gt;Curious what you think: would you ever run WordPress in static mode if authentication "just worked"? Drop your thoughts below.  &lt;/p&gt;




</description>
      <category>aws</category>
      <category>cognito</category>
      <category>wordpress</category>
      <category>cloudfront</category>
    </item>
  </channel>
</rss>
