How to build a login using AWS IAM with javascript SDK?

139 Views Asked by At

need to use

  • AWS IAM
  • nodejs
  • AWS STS service

need to

  • register user
  • authenticate user
  • authorize user

and also need to know what are the best ways to do that using AWS services.is it better to use aws cognito?

expected- sample codes

1

There are 1 best solutions below

0
smac2020 On

We have this use case documented in the Photo Asset Manager (PAM) example app. In this example, the client is a REACT app that performs user authenication with Cognito. See this high level illustration:

enter image description here

Sample client app with a sign in button:

enter image description here

You can deploy the entire solution following the instructions located in the AWS Code Library topic here:

Create a photo asset management application that lets users manage photos using labels

See this Github location for the sample REACT client:

https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/resources/clients/react/elros