🧩 Big Picture

There are two types of sessions in a web app:

  1. Authentication session (Cognito, tokens)
  2. Application session (DynamoDB, Redis, etc.) They interact, but they serve different layers of your application.

🔹 1️⃣ Authentication session — “Who is this user?”

  • Managed by Amazon Cognito (or another identity provider).
  • Exists to prove the user’s identity.
  • Represented by JWT tokens (ID, access, refresh).
  • Has a limited lifetime (e.g., 1 hour access token, 30-day refresh token).
  • Stored on the client (browser/app), usually in cookies or local storage. 💡 Purpose: Security and authorization.

🔹 2️⃣ Application session — “What is this user doing?”

  • Managed by your application backend.
  • Stored i…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help