So, man, I’m gonna answer around here because I can’t comment.
You will not be able to store session via API (ajax requests, etc). This is because these requests are completely independent of each other and usually the backend treats each of them as independent sessions.
There are a few ways you can get around it. What I usually do is use a JWT (Json Web Token). With it you can store information about the user within it and recover them within your backend. These tokens are often used in session form, you can send an expiration date within it and renew that expiration with each call to the backend, for example, causing, if the user stays more than 20min without calling the backend, the token becomes invalid and it needs to log in again. You can store this token in sessionStorage, localStorage or even use cookies.
Through S3, because it’s static, you won’t be able to work with sessions, since sessions usually work well on sites that are rendered by the backend itself (Django, Pyramid, among other frameworks) do this, but, you will not be able to use S3 to publish this type of site.
In short, I suggest you use JWT to work with sessions (simulate them, in case)