I am new to the aws environment and I need your help.
I'm working on a project with:
-on the frontend: an angular app deployed on S3 and accessible via cloudfront
-on the backend: a monolithic application with spring boot and deployed on beanstalk
-authentication: aws cognito
-a database on RDS to store some informations about the user as the username and the role,
the other informations are kept in aws cognito as user attributes like name, email, tel...
So my questions are:
-Where shoud we make a call to cognito to authenticate the user? in the frontend or make a rest call to the backend and it will call itself aws?
-Do we need api gateway with this configuration?
Please help me!