<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cognito on Lonfo Blog</title><link>https://blog.lonfo.fr/tags/cognito/</link><description>Recent content in Cognito on Lonfo Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 20 Oct 2026 09:00:00 +0200</lastBuildDate><atom:link href="https://blog.lonfo.fr/tags/cognito/index.xml" rel="self" type="application/rss+xml"/><item><title>Daily Actions: Read your data back with a DynamoDB Query behind GET /actions</title><link>https://blog.lonfo.fr/posts/daily-actions-list-dynamodb-query-api-gateway-lambda/</link><pubDate>Tue, 20 Oct 2026 09:00:00 +0200</pubDate><guid>https://blog.lonfo.fr/posts/daily-actions-list-dynamodb-query-api-gateway-lambda/</guid><description>&lt;h1 id="daily-actions-read-your-data-back-with-a-dynamodb-query-behind-get-actions">Daily Actions: Read your data back with a DynamoDB Query behind GET /actions&lt;/h1>
&lt;p>In the previous article, our users learned to &lt;strong>write&lt;/strong>: a signed-in user sends an action to &lt;code>POST /actions&lt;/code>, a Lambda stores it in DynamoDB, and anonymous requests are rejected. But if you add a task and refresh the &lt;code>/todo&lt;/code> page, the list stays empty. Nothing reads the data back.&lt;/p>
&lt;p>In this article we add the missing half: a &lt;code>GET /actions&lt;/code> endpoint that returns &lt;strong>only the actions of the signed-in user&lt;/strong>, using a DynamoDB &lt;code>Query&lt;/code>.&lt;/p></description></item><item><title>Daily Actions: Save data in DynamoDB through an API Gateway and Lambda secured by Cognito</title><link>https://blog.lonfo.fr/posts/daily-actions-secure-api-gateway-lambda-dynamodb-with-cognito/</link><pubDate>Tue, 13 Oct 2026 09:00:00 +0200</pubDate><guid>https://blog.lonfo.fr/posts/daily-actions-secure-api-gateway-lambda-dynamodb-with-cognito/</guid><description>&lt;h1 id="daily-actions-save-data-in-dynamodb-through-an-api-gateway-and-lambda-secured-by-cognito">Daily Actions: Save data in DynamoDB through an API Gateway and Lambda secured by Cognito&lt;/h1>
&lt;p>In the previous article, our static Next.js application learned to authenticate users with Amazon Cognito. But a login page protects nothing by itself: as long as our backend accepts anonymous requests, anyone can write into our database.&lt;/p>
&lt;p>In this article we connect the pieces. The signed-in user will send a new action to an API Gateway endpoint, a Lambda function will insert it into DynamoDB, and &lt;strong>only requests carrying a valid Cognito token will get through&lt;/strong>.&lt;/p></description></item><item><title>Daily Actions: Secure your Next.js application with AWS Cognito and CDK</title><link>https://blog.lonfo.fr/posts/daily-actions-secure-your-next.js-application-with-aws-cognito-and-cdk/</link><pubDate>Fri, 25 Sep 2026 08:15:36 +0200</pubDate><guid>https://blog.lonfo.fr/posts/daily-actions-secure-your-next.js-application-with-aws-cognito-and-cdk/</guid><description>&lt;h1 id="daily-actions-secure-your-nextjs-application-with-aws-cognito-and-cdk">Daily Actions: Secure your Next.js application with AWS Cognito and CDK&lt;/h1>
&lt;p>Now that our Next.js application is live on S3 and CloudFront, it&amp;rsquo;s time to add an essential component: authentication. With a static export architecture, traditional server-based solutions (like NextAuth.js with Node.js API routes) do not work directly.&lt;/p>
&lt;p>We will use AWS Cognito to manage our users (User Pool) and integrate the AWS SDK (or Amplify) on the front-end to connect our static application securely. CDK handles all the infrastructure configuration.&lt;/p></description></item></channel></rss>