Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to host a static s3 website with cloudfront that uses cognito built in login pages

I am beginner to aws. I want to host a static S3 website with cloudfront distribution but I want to add the cognito built in login page first when user hit the website url.I am not sure how to do that. I am seeing multiple solutions for S3 + cloudfront or cognito but I am not getting any solution as to how to integrate S3 website + cloudfront + cognito bult in page. Can someone please suggest how to do that? Thanks in advance!

like image 210
Idea Ideas Avatar asked Jan 26 '23 01:01

Idea Ideas


1 Answers

I would recommend looking into AWS Amplify (https://aws-amplify.github.io/) which is very much like AWS's answer to Firebase. It allows you to very quickly spin up AWS resources such as Cognito, Storage (including for websites) with S3, apis, databases and much more.

AWS Amplify has a ready-made and configurable Authenticator component for both React and Angular projects that integrates with Cognito and will immediately handle sign ups, log ins, password reset etc.

  • For Angular (https://aws-amplify.github.io/docs/js/angular) see the Authenticator component.
  • For React (https://aws-amplify.github.io/docs/js/react) see Add Auth.

I hope that helps.

like image 196
lemming Avatar answered Jan 29 '23 21:01

lemming