# How to Set Up Row-Level Security in Postgres Using AWS Cognito

DevFeed: [How to Set Up Row-Level Security in Postgres Using AWS Cognito](<https://devfeed.tech/articles/how-to-set-up-row-level-security-in-postgres-using-aws-cognito-5402.md>)

Original publisher: [Read original article](<https://neon.com/blog/how-to-set-up-row-level-security-in-postgres-using-aws-cognito>)

Author: Brian Holt

Published: 2024-12-04T17:26:16Z

Content type: tutorial

Language: en

Sources: [Blog -- Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [Authorization](<https://devfeed.tech/topics/authorization.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [JSON Web Tokens](<https://devfeed.tech/topics/jwt.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Express](<https://devfeed.tech/topics/express.md>), [htmx](<https://devfeed.tech/topics/htmx.md>), [MFA](<https://devfeed.tech/topics/mfa.md>), [Serverless](<https://devfeed.tech/topics/serverless.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [authentication](<https://devfeed.tech/tags/authentication.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [community](<https://devfeed.tech/tags/community.md>), [database](<https://devfeed.tech/tags/database.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [htmx](<https://devfeed.tech/tags/htmx.md>), [http](<https://devfeed.tech/tags/http.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [product](<https://devfeed.tech/tags/product.md>), [security](<https://devfeed.tech/tags/security.md>), [serverless](<https://devfeed.tech/tags/serverless.md>)

## AI overview

A tutorial for implementing Postgres row-level security with AWS Cognito authorization. It demonstrates a serverless app using Neon, Neon Authorize, Express.js, and HTMX, including JWT-based fine-grained access controls and RLS policy setup.

## Source excerpt

This blog post teaches you an easy method to implement row-level security in your Postgres database when using AWS Cognito for authorization. To demonstrate everything, we'll be using an app with Neon as the Postgres provider, Neon Authorize, Express.js, and HTMX. All the code in...